Mutation analysis can effectively capture the dependency between source code and test results. This has been exploited by Mutation Based Fault Localisation (MBFL) techniques. However, MBFL techniques suffer from the need to expend the high cost of mutation analysis after the observation of failures, which may present a challenge for its practical adoption. We introduce SIMFL (Statistical Inference for Mutation-based Fault Localisation), an MBFL technique that allows users to perform the mutation analysis in advance before a failure is observed, allowing the amortisation of the analysis cost. SIMFL uses mutants as artificial faults and aims to learn the failure patterns among test cases against different locations of mutations. Once a failure is observed, SIMFL requires either almost no or very small additional cost for analysis, depending on the used inference model. An empirical evaluation using Defects4J shows that SIMFL can successfully localise up to 113 out of 203 studied faults (55%) at the top, and 159 (78%) faults within the top five, significantly outperforming existing MBFL techniques while using the results of mutation analysis that has been undertaken before the test failure. The amortised cost of mutation analysis can be further reduced by mutation sampling: SIMFL retains 80% of its localisation accuracy at the top rank when using only 10% of generated mutants, compared to results obtained without sampling.
翻译:突变分析可以有效地捕捉源代码和测试结果之间的依赖性。 这已被变异基础失灵定位技术(MBFL)所利用。 但是,MBFL技术在观察失败后需要花费高昂的突变分析成本,这可能会对其实际采用构成挑战。 我们采用了SIMFL(基于突变的错失定位统计推断)技术,即MBFL技术,使用户能够在观测失败之前提前进行突变分析,从而能够分摊分析费用。 SIMFL将变异技术用作人工故障,目的是了解不同变异地点测试案例的失败模式。一旦发现失败,SIMFL需要几乎不增加或很少的额外分析成本,这取决于所使用的推断模型。 使用变异模型4J的经验评估显示,SIMFL在观测203个研究错误中,顶部只有55%,顶部有113个,顶部有159个(78%)断层断层。 SIMFL技术大大超过现有的测试模式,同时使用变异模型分析结果进行80次的测试失败率,在SMOL之前可以进一步进行。