A fault localization approach based on fault propagation context
Yue Yan,Shujuan Jiang,Yanmei Zhang,Shenggang Zhang,Cheng Zhang
DOI: https://doi.org/10.1016/j.infsof.2023.107245
IF: 3.9
2023-05-05
Information and Software Technology
Abstract:Context: Spectrum-based fault localization (SBFL) performs statistical analysis on the coverage information of failed or passed test cases. It provides the programmer with a guide for fault localization by generating a sorted list of suspicious elements. Unfortunately, the SBFL technology has a tie problem. Many elements in the list have the same suspicious values, which seriously affects the developer finding faults. Objective: Therefore, we aim to solve the tie problem of SBFL techniques by applying the fault propagation context. In this paper, we propose an approach to boost the performance of fault localization by applying inter-class and intra-class fault propagation context to weight the suspicious elements. Methods: We first apply the SBFL techniques to calculate the initial suspicious values of the statements. Then, we analyze the fault propagation context of the suspicious statements. Finally, we weight the initial suspicious values of the statements to solve the tie problem of SBFL techniques. The weighted suspicious values are sorted in descending order to generate a list, which is provided to developers for fault localization. Results: To evaluate our approach, we experiment on Defects4J, a real-world software fault benchmark. Experimental results show that the proposed approach outperforms existing fault context-based methods that only use intra-class context and traditional SBFL methods. For example, our approach can locate 129 faults in Top-1, which is 94 more than Ochiai method. Moreover, we provide programmers with the fault propagation context for accurate fault localization. Conclusion: Applying fault propagation context can effectively solve the tie problem in SBFL. It is valuable to study how to efficiently utilize the fault propagation context for fault localization.
computer science, information systems, software engineering