Learning Test-Mutant Relationship for Accurate Fault Localisation

Jinhan Kim,Gabin An,Robert Feldt,Shin Yoo
2023-06-04
Abstract:Context: Automated fault localisation aims to assist developers in the task of identifying the root cause of the fault by narrowing down the space of likely fault locations. Simulating variants of the faulty program called mutants, several Mutation Based Fault Localisation (MBFL) techniques have been proposed to automatically locate faults. Despite their success, existing MBFL techniques suffer from the cost of performing mutation analysis after the fault is observed. Method: To overcome this shortcoming, we propose a new MBFL technique named SIMFL (Statistical Inference for Mutation-based Fault Localisation). SIMFL localises faults based on the past results of mutation analysis that has been done on the earlier version in the project history, allowing developers to make predictions on the location of incoming faults in a just-in-time manner. Using several statistical inference methods, SIMFL models the relationship between test results of the mutants and their locations, and subsequently infers the location of the current faults. Results: The empirical study on Defects4J dataset shows that SIMFL can localise 113 faults on the first rank out of 224 faults, outperforming other MBFL techniques. Even when SIMFL is trained on the predicted kill matrix, SIMFL can still localise 95 faults on the first rank out of 194 faults. Moreover, removing redundant mutants significantly improves the localisation accuracy of SIMFL by the number of faults localised at the first rank up to 51. Conclusion: This paper proposes a new MBFL technique called SIMFL, which exploits ahead-of-time mutation analysis to localise current faults. SIMFL is not only cost-effective, as it does not need a mutation analysis after the fault is observed, but also capable of localising faults accurately.
Software Engineering
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the cost and efficiency issues in Automated Fault Localization (AFL), especially the high - cost problem existing in Mutation - Based Fault Localization (MBFL). Although the existing MBFL techniques have been successful in automatically locating software faults, these techniques require mutation analysis after observing the faults, which leads to high costs. For this reason, the paper proposes a new MBFL technique - SIMFL (Statistical Inference for Mutation - based Fault Localization). It predicts the location of the current fault by using the mutation analysis results of earlier versions in the project history, thus avoiding the cost of performing mutation analysis after observing the fault. SIMFL uses statistical inference methods to model the relationship between test results and mutant locations and infers the location of the current fault accordingly, aiming to provide an economical and accurate fault - location method.