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.
翻译:错误本地化是一个长期的研究课题。尽管在过去几十年中提出了许多方法,但大多数现有研究在粗粗粗的语句或方法层次上进行,对如何修复错误(突变问题)的洞察力非常有限,但很少有研究针对细细的错误本地化。在本论文中,我们针对颗粒问题,并提议一种新型微小的差分本地化方法。具体地说,我们设计了一个程序依赖性强化决策树模型,通过根据变量值区分失败和通过测试案例,促进识别与错误相关的变量。为了评估我们的方法的有效性,我们用一个名为 VARDT 的工具实施了这一方法,并对Derfectrations4J 基准进行了广泛的研究。结果显示,VARDT 超越了最先进的本地本地化方法,在位于Top-1的错误思维上至少改进了247.8%,平均改进了310.5 %。此外,我们用一个叫做VARDS的本地化方法改进了我们本地化方法的本地化方法,从而改进了我们本地化的结果。