一句话:提出GRACE,将测试与程序实体的覆盖率关系建模为图并用门控图神经网络排序,显著提升故障定位效果。
现有基于覆盖率的故障定位方法常将详细覆盖信息过度简化为测试数量或布尔向量,限制了实际有效性。本文提出GRACE,将覆盖率视为测试与程序实体之间的连接关系,统一建模为图结构:测试和程序实体作为节点,覆盖率与代码结构作为边,从而保留细粒度覆盖信息与代码结构。随后使用门控图神经网络(Gated Graph Neural Network)从图中学习有用特征,以listwise方式对程序实体排序。在Defects4J V1.2.0上的评估表明,GRACE在Top-1内定位195个缺陷,而最佳对比技术最多定位166个。消融实验显示各组件均有正贡献,且GRACE学到的特征与现有学习型故障定位所用信息互补。在Defects4J 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.
DOI 原文 ·
@inproceedings{paperbot6390,
title = {Boosting coverage-based fault localization via graph-based representation learning},
author = {Yiling Lou and Qihao Zhu and Jinhao Dong and Xia Li and Zeyu Sun and Dan Hao and Lu Zhang and Lingming Zhang},
booktitle = {FSE},
year = {2021},
doi = {10.1145/3468264.3468580}
}