Graph Neural Network Based Two-Phase Fault Localization Approach

Zhengmin Li,Enyi Tang,Xin Chen,Linzhang Wang,Xuandong Li
DOI: https://doi.org/10.1145/3545258.3545266
2022-01-01
Abstract:Spectrum-based fault localization(SBFL) has become one of the most widely studied localization techniques by its effectiveness and lightweightness. However, existing simple SBFL techniques are still not accurate enough for they are not able to distinguish specific locations in the same basic block. To address this problem, techniques that combine SBFL and MBFL(Mutation-based fault localization) have been proposed with the cost of introducing huge overhead from mutants. This paper proposes a graph neural network (GNN) based two-phase localization approach that localizes statements in blocks accurately and efficiently. The graph neural network introduced from our approach extracts the information from both the control flow graph and data flow graph, which includes the dependencies that distinguish the specific locations and further increase the localization accuracy. Our localization process is divided into two phases: Phase-I computes the suspiciousness score of each method and generates a ranking list, and phase-II further highlights the potential faulty locations inside a method by a fine-grained GNN with graphs in the method. We conduct experiments on 357 real bugs of 5 projects in the Defects4j benchmark. The results show that with a small overhead in our approach, the number of our successfully localized faults within the top-1, top-3, and top-5 positions is obviously higher than other SBFL techniques.
What problem does this paper attempt to address?