Abstract
Traditional Coverage-Based Fault Localization (CBFL) techniques often struggle to distinguish between the root cause of a software bug and its downstream symptoms. By treating code statements as independent entities, these methods ignore critical execution dependencies. This paper proposes an Association Mining (AM) approach that identifies groups of statements consistently executed together during failures. By leveraging these associations, the proposed method significantly improves the accuracy of bug localization in complex software systems.
Introduction: The "Symptom" Problem in Fault Localization
Automated debugging tools primarily rely on Coverage-Based Fault Localization (CBFL). These tools calculate a "suspiciousness" score for each line of code by comparing its execution frequency in failed versus successful test runs. A statement frequently executed during failures but rarely during successes is flagged as a likely bug.
However, CBFL's fundamental assumption—that statements are independent—is often flawed. In practice, a bug in one statement often triggers a "ripple effect," causing subsequent, healthy statements to execute consistently before a crash. These "downstream" statements may receive higher suspiciousness scores than the actual fault, leading developers on a wild goose chase.
As shown in Figure 1, a bug in block $b_2$ might make block $b_3$ appear more suspicious because $b_3$ is always executed following the faulty logic in $b_2$ during failed runs.
Methods: Association Mining (AM)
The researchers introduced Association Mining (AM) into the fault localization process to capture the complex web of control and data dependencies within a program. Instead of evaluating statements in isolation, the AM approach identifies "frequent itemsets"—groups of statements that are consistently covered together in failed execution paths.
The process involves four key steps:
- Coverage Vector Construction: Program executions are represented as bit-vectors, indicating which code blocks were triggered.
- Initial Ranking: Standard CBFL metrics (e.g., Jaccard, Ochiai, Tarantula, or SBI) are used to generate a baseline list of suspicious statements.
- Mining Associations: For top-ranked "target" statements, an association mining algorithm identifies other statements that are invariably executed alongside the target in failed runs.
- Re-ranking and Inspection: If the top-ranked statement is not the bug, the developer is directed to its "associated" statements. This effectively traces the failure from the observed symptom back to the underlying cause.
The researchers evaluated "AM-" enhanced versions of four popular metrics: AM-Jaccard, AM-Ochiai, AM-Tarantula, and AM-SBI.
Experimental Evaluation
The method was tested using the Software Infrastructure Repository (SIR), focusing on two distinct datasets:
- Unix Utilities: Complex, real-world programs like
flex,grep, andgzip. - Siemens Suite: Smaller baseline programs such as
replaceandtcas.
The evaluation spanned 222 faulty versions of these programs.
Key Results
The Association Mining approach demonstrated a clear advantage, particularly in complex software environments. On the Unix dataset, at a 10% code inspection rate (meaning the developer only looks at the top 10% of suspicious code), AM-Jaccard successfully located 74.5% of bugs, a significant improvement over the 66.1% achieved by the standard Jaccard metric.
Statistical analysis (t-tests) confirmed that these improvements were significant (p < 0.05), suggesting that as software complexity increases, accounting for statement dependencies becomes increasingly vital for effective debugging.
Discussion and Future Work
The study highlights that high suspiciousness in traditional CBFL is often a symptom rather than a cause. Association mining provides the necessary context to bridge this gap by following "coverage consistency" in failed runs. However, some limitations remain:
- Inter-procedural Bugs: The current analysis is intra-procedural; bugs spanning multiple functions may be harder to capture.
- Noise and Coincidental Correctness: Factors like multiple independent bugs or "coincidental correctness" (where a bug executes but doesn't cause a visible failure) can still introduce noise into the coverage data.
Future research will focus on developing global coverage vectors and more robust noise-filtering techniques to further refine the localization process.
Summary updated