[论文解读] Variable-Based Fault Localization via Enhanced Decision Tree
本文提出 VarDT,一种新颖的变量级故障定位技术,通过使用程序依赖增强的决策树,基于变量值区分失败和通过的测试运行,识别与故障相关的变量。在 Defects4J 上评估,VarDT 在 Top-1 故障定位上的表现相较于最先进方法至少提升 247.8%,平均提升 330.5%;在补丁过滤方面,通过优于 PATCH-SIM 26.0% 的表现,成功移除了更多错误补丁。
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.
研究动机与目标
- 通过聚焦于变量级故障识别而非粗粒度的语句或方法级别,解决故障定位中的粒度问题。
- 通过提供更细粒度的故障定位结果,提升自动程序修复(APR)的精度与有效性。
- 开发一种完全自动、可扩展的技术,利用程序依赖关系和决策树识别与故障相关的变量,无需开发者干预。
- 在故障定位和下游补丁过滤应用中评估 VarDT 的有效性。
提出的方法
- 构建一个决策树模型,基于变量值区分失败和通过的测试运行,以识别与故障相关的变量。
- 通过静态程序分析(包括程序切片和依赖分析)增强决策树,以提升可扩展性和准确性。
- 使用测试执行过程中变量值的模式作为输入特征,训练决策树以区分引发失败的变量状态。
- 引入程序依赖关系以指导特征选择并缩小搜索空间,聚焦于与失败具有强因果关联的变量。
- 实现该方法为名为 VarDT 的工具,用于在 Defects4J 基准上进行端到端评估。
- 通过使用与故障相关的变量特征图谱评估补丁正确性,将 VarDT 适配用于补丁过滤。
实验结果
研究问题
- RQ1通过分析通过和失败测试运行之间变量值的差异,决策树模型能否有效识别与故障相关的变量?
- RQ2在变量级故障定位中,引入程序依赖关系在多大程度上提升了可扩展性和准确性?
- RQ3与最先进故障定位技术相比,VarDT 在 Top-1 故障定位准确率方面表现如何?
- RQ4VarDT 更细粒度的故障定位结果能否提升自动程序修复中下游补丁过滤的有效性?
主要发现
- 在 Defects4J 基准上,与最先进方法相比,VarDT 在 Top-1 位置定位正确故障相关变量方面至少提升了 247.8%。
- 在所有评估的错误中,VarDT 平均将 Top-1 故障定位准确率提升了 330.5%。
- 在适配用于补丁过滤时,VarDT 有效移除了 69.4% 的错误补丁,优于最先进方法 PATCH-SIM 的 26.0%。
- 程序依赖分析的集成显著增强了模型聚焦于相关变量的能力,同时减少了无关变量带来的噪声。
- 结果表明,变量级故障定位提供了有意义的洞察,可直接提升下游 APR 技术的精度。
- VarDT 完全自动化,无需开发者干预,这与以往的变量级故障定位方法不同。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。