Boosting coverage-based fault localization via graph-based representation learning

Boosting coverage-based fault localization via graph-based representation learning
复制标题

DOI:
10.1145/3468264.3468580
复制
发表时间:
2021-08
期刊:
Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
影响因子:
--
通讯作者:
Yiling Lou;Qihao Zhu;Jinhao Dong;Xia Li;Zeyu Sun;Dan Hao;Lu Zhang;Lingming Zhang
Yiling Lou;Qihao Zhu;Jinhao Dong;Xia Li;Zeyu Sun;Dan Hao;Lu Zhang;Lingming Zhang
中科院分区:
其他
文献类型:
--
作者:
Yiling Lou;Qihao Zhu;Jinhao Dong;Xia Li;Zeyu Sun;Dan Hao;Lu Zhang;Lingming Zhang

文献摘要

相似文献

基于覆盖率的故障定位方法由于其对实际系统的有效性和轻便性而得到了广泛的研究。然而,现有的技术往往利用覆盖率在一个过于简单的方式抽象的详细覆盖到测试或布尔向量的数量,从而限制了他们在实践中的有效性。在这项工作中,我们提出了一种新的基于覆盖的故障定位技术,GRACE,它充分利用详细的覆盖信息与基于图的表示学习。我们的直觉是,覆盖率可以被视为测试和程序实体之间的连接关系,它可以内在地和完整地表示为一个图结构:测试和程序实体作为节点,而覆盖率和代码结构作为边缘。因此,我们首先提出了一种新的基于图的表示,以保留所有详细的覆盖信息和细粒度的代码结构到一个图。然后,我们利用门控图神经网络从基于图的覆盖表示中学习有价值的特征,并以列表方式对程序实体进行排名。我们对广泛使用的基准测试Defects 4J(V1.2.0)的评估表明,GRACE显着优于最先进的基于覆盖率的故障定位:GRACE在Top-1中定位了195个错误,而最好的比较技术最多可以在Top-1中定位166个错误。我们进一步研究了每个GRACE组件的影响,发现它们都对GRACE有积极的贡献。此外,我们的研究结果还表明,GRACE已经从覆盖率中学习到了基本特征,这些特征与现有基于学习的故障定位中使用的各种信息是互补的。最后,我们在跨项目预测场景中对Defects 4J(V2.0.0)中的额外226个错误进行了评估,发现GRACE始终优于最先进的基于覆盖率的技术。
Coverage-based fault localization has been extensively studied in the literature due to its effectiveness and lightweightness for real-world systems. However, existing techniques often utilize coverage in an oversimplified way by abstracting detailed coverage into numbers of tests or boolean vectors, thus limiting their effectiveness in practice. In this work, we present a novel coverage-based fault localization technique, GRACE, which fully utilizes detailed coverage information with graph-based representation learning. Our intuition is that coverage can be regarded as connective relationships between tests and program entities, which can be inherently and integrally represented by a graph structure: with tests and program entities as nodes, while with coverage and code structures as edges. Therefore, we first propose a novel graph-based representation to reserve all detailed coverage information and fine-grained code structures into one graph. Then we leverage Gated Graph Neural Network to learn valuable features from the graph-based coverage representation and rank program entities in a listwise way. Our evaluation on the widely used benchmark Defects4J (V1.2.0) shows that GRACE significantly outperforms state-of-the-art coverage-based fault localization: GRACE localizes 195 bugs within Top-1 whereas the best compared technique can at most localize 166 bugs within Top-1. We further investigate the impact of each GRACE component and find that they all positively contribute to GRACE. In addition, our results also demonstrate that GRACE has learnt essential features from coverage, which are complementary to various information used in existing learning-based fault localization. Finally, we evaluate GRACE in the cross-project prediction scenario on extra 226 bugs from Defects4J (V2.0.0), and find that GRACE consistently outperforms state-of-the-art coverage-based techniques.