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.
翻译:语境:自动化故障定位旨在通过缩小可能的故障位置范围,协助开发者识别故障的根源。通过模拟称为变异体的故障程序变体,研究者提出了多种基于变异的故障定位(MBFL)技术来自动定位故障。尽管这些技术取得了成功,但现有MBFL技术在故障发生后执行变异分析时存在成本高昂的问题。方法:为克服这一不足,我们提出了一种新的MBFL技术——SIMFL(基于统计推断的变异故障定位)。SIMFL基于项目历史中早期版本已完成的变异分析结果来定位故障,使开发者能够以即时方式预测新故障的位置。通过使用多种统计推断方法,SIMFL对变异体测试结果与其位置之间的关系进行建模,进而推断当前故障的位置。结果:在Defects4J数据集上的实证研究表明,在总共224个故障中,SIMFL能在首位定位到113个故障,优于其他MBFL技术。即使SIMFL基于预测的杀灭矩阵进行训练,在194个故障中仍能在首位定位到95个。此外,去除冗余变异体显著提升了SIMFL的定位精度,首位定位的故障数量最多增加51个。结论:本文提出了一种名为SIMFL的新型MBFL技术,该技术利用提前进行的变异分析来定位当前故障。SIMFL不仅成本效益高(因无需在故障发生后进行变异分析),而且能够准确定位故障。