一种基于调用频度的Tie Breaking软件故障定位方法
Method Calls Frequency-Based Tie-Breaking Strategy For Software Fault Localization
摘要:
在基于频谱的故障定位(SBFL)中,基于测试覆盖率和测试结果为每个代码元素分配可疑性分数。然后,分数被用于相对于彼此对代码元素进行排名,以便在调试过程期间当寻找故障源时帮助程序员。然而,可能没有一个已知的SBFL公式能够保证为所有程序元素产生不同的分数,因此在代码元素之间出现联系。根据我们的实验,SBFL中的关系是普遍的:在Defects 4J中,54-56%的错误方法是关系的成员,即,在这些情况下,至少有一种其他方法具有相同的得分(但通常更多,平均为6),这不可避免地降低了任何SBFL方法的有效性。在这项工作中,我们提出了一种技术来打破这种情况下的关系,根据所谓的方法调用频率。这计算了失败测试用例中方法调用(作为被调用者和调用者)的不同上下文的数量。直觉是,如果一个方法在失败的测试用例中出现在许多不同的调用上下文中,那么与具有相同分数的其他方法相比,它将更加可疑并获得更高的排名。这种方法可以应用于任何潜在的SBFL公式,并在许多情况下,可以有利地打破发生在领带的行列。实验结果表明,我们的新的平局打破战略取得了显着减少的大小和数量的关键关系在我们的基准。在72-73%的病例中,领带完全消除,平均减少率超过80%。
英文摘要:
In Spectrum-Based Fault Localization (SBFL), a suspiciousness score is assigned to each code element based on test coverage and test outcomes. The scores are then used to rank the code elements relative to each other in order to aid the programmer during the debugging process when seeking the source of a fault. However, probably none of the known SBFL formulae are guaranteed to produce different scores for all the program elements, hence ties emerge between the code elements. Based on our experiments, ties in SBFL are prevalent: in Defects4J, 54-56% of buggy methods are members of ties, i.e., there is at least one other method with the same score in these cases (but typically much more, on average 6), and this inevitably reduces the effectiveness of any SBFL approach. In this work, we present a technique to break ties in such cases based on the so-called method calls frequencies. This counts the number of different contexts of method calls (both as callees and as callers) in failing test cases. The intuition is that if a method appears in many different calling contexts during a failing test case, it will be more suspicious and get a higher rank position compared to other methods with the same scores. This method can be applied to any underlying SBFL formula, and can favourably break the occurring ranks in the ties in many cases. The experimental results show that our novel tie-breaking strategy achieved a significant reduction in both size and number of critical ties in our benchmark. In 72-73% of the cases, the ties were completely eliminated and the average reduction rate was more than 80%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。