Many existing fault localisation techniques become less effective or even inapplicable when not adequately supported by a rich test suite. To overcome this challenge, we present a human-in-the-loop fault localisation technique, QFiD, that works with only a small number of initial failing test cases. We augment the failing test cases with automatically generated test data and elicit oracles from a human developer to label the test cases. A new result-aware test prioritisation metric allows us to significantly reduce the labelling effort by prioritising the test cases to achieve maximum localisation accuracy. An evaluation with EvoSuite and our test prioritisation metric shows that QFiD can significantly increase the localisation accuracy. After only ten human labellings, QFiD can localise 27% and 66% of real-world faults in Defects4J at the top and within the top ten, respectively. This is a 13 and 2 times higher performance than when using the initial test cases. QFiD is also resilient to human errors, retaining 80% of its acc@1 performance on average when we introduce a 30% error rate to the simulated human oracle.
翻译:许多现有的故障定位技术在没有得到丰富测试套件充分支持的情况下变得不那么有效,甚至无法适用。为了克服这一挑战,我们展示了只使用少量初始失败测试案例的“在行错误定位技术”QFiD。我们用自动生成的测试数据来增加失败的测试案例,并从人类开发者那里获取用于标注测试案例的神器。一个新的“有效果测试优先度标准”使我们能够通过优先考虑测试案例来大幅降低标签工作,以达到最大本地化准确性。用“EvoSite”和“我们测试优先度指标”进行的评估表明,“在行错误定位”可以大大提高本地化的准确性。在只贴了十个“人”标签之后,“QFiD”可以分别将顶部和前十位内部的“Deffects4J”中真实世界缺陷的27%和66%本地化为本地化。这比使用初始测试案例的绩效高13倍和2倍。QFiD还能够适应人类错误,同时保留其“cc@1”性80 %的平均性。