Skip to main content
QUICK REVIEW

[Paper Review] Variable-Based Fault Localization via Enhanced Decision Tree

Jiajun Jiang, Yumeng Wang|arXiv (Cornell University)|Nov 21, 2022
Software Engineering ResearchComputer Science5 citations
TL;DR

This paper proposes VarDT, a novel variable-level fault localization technique that uses a program-dependency-enhanced decision tree to identify fault-relevant variables by discriminating failed and passed test runs based on variable values. Evaluated on Defects4J, VarDT achieves at least 247.8% and on average 330.5% improvement in locating bugs at Top-1 compared to state-of-the-art methods, and enhances patch filtering by outperforming PATCH-SIM by 26.0% in incorrect patch removal.

ABSTRACT

Fault localization, aiming at localizing the root cause of the bug under repair, has been a longstanding research topic. Although many approaches have been proposed in the last decades, most of the existing studies work at coarse-grained statement or method levels with very limited insights about how to repair the bug (granularity problem), but few studies target the finer-grained fault localization. In this paper, we target the granularity problem and propose a novel finer-grained variable-level fault localization technique. Specifically, we design a program-dependency-enhanced decision tree model to boost the identification of fault-relevant variables via discriminating failed and passed test cases based on the variable values. To evaluate the effectiveness of our approach, we have implemented it in a tool called VARDT and conducted an extensive study over the Defects4J benchmark. The results show that VARDT outperforms the state-of-the-art fault localization approaches with at least 247.8% improvements in terms of bugs located at Top-1, and the average improvements are 330.5%. Besides, to investigate whether our finer-grained fault localization result can further improve the effectiveness of downstream APR techniques, we have adapted VARDT to the application of patch filtering, where VARDT outperforms the state-of-the-art PATCH-SIM by filtering 26.0% more incorrect patches. The results demonstrate the effectiveness of our approach and it also provides a new way of thinking for improving automatic program repair techniques.

Motivation & Objective

  • Address the granularity problem in fault localization by targeting variable-level fault identification instead of coarse-grained statement or method levels.
  • Improve the precision and effectiveness of automatic program repair (APR) by providing finer-grained fault localization results.
  • Develop a fully automatic, scalable technique that leverages program dependencies and decision trees to identify fault-relevant variables without developer intervention.
  • Evaluate VarDT’s effectiveness in both fault localization and downstream patch filtering applications.

Proposed method

  • Construct a decision tree model that discriminates between failed and passed test runs based on variable values to identify fault-relevant variables.
  • Enhance the decision tree with static program analysis, including program slicing and dependency analysis, to improve scalability and accuracy.
  • Use variable value patterns across test executions as input features to train the decision tree for distinguishing failure-inducing variable states.
  • Integrate program dependencies to guide feature selection and reduce the search space, focusing on variables with strong causal links to failures.
  • Implement the approach in a tool called VarDT for end-to-end evaluation on the Defects4J benchmark.
  • Adapt VarDT for patch filtering by using fault-relevant variable profiles to assess patch correctness.

Experimental results

Research questions

  • RQ1Can a decision tree model effectively identify fault-relevant variables by analyzing variable value differences between passed and failed test runs?
  • RQ2To what extent does incorporating program dependencies improve the scalability and accuracy of variable-level fault localization?
  • RQ3How does VarDT compare to state-of-the-art fault localization techniques in terms of Top-1 fault localization accuracy?
  • RQ4Can VarDT’s finer-grained fault localization results improve the effectiveness of downstream patch filtering in automatic program repair?

Key findings

  • VarDT achieved at least 247.8% improvement in locating the correct fault-relevant variable at Top-1 compared to state-of-the-art approaches on the Defects4J benchmark.
  • On average, VarDT improved Top-1 fault localization accuracy by 330.5% across all evaluated bugs.
  • When adapted for patch filtering, VarDT successfully filtered out 69.4% of incorrect patches, outperforming the state-of-the-art PATCH-SIM by 26.0%.
  • The integration of program dependency analysis significantly enhanced the model’s ability to focus on relevant variables and reduce noise from irrelevant ones.
  • The results demonstrate that variable-level fault localization provides meaningful insights that can directly improve the precision of downstream APR techniques.
  • VarDT is fully automatic and does not require developer intervention, unlike prior variable-level fault localization methods.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.