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%.
翻译:光谱断层本地化( SBFL), 根据测试覆盖和测试结果, 给每个代码元素指定了可疑评分。 然后, 评分用于在调试过程中对代码元素进行相对排序, 在调试过程中帮助程序员寻找错误源头。 但是, 可能没有已知的 SBFL 公式保证对所有程序元素产生不同的评分, 从而在代码元素之间产生联系。 根据我们的实验, SBFL 中的联系非常普遍: 在 Defects4J 中,54-56%的错误方法完全属于关联成员, 也就是说, 在这些案例中, 至少有一种对代码元素进行相对比较的方法, 以便帮助程序程序程序员在调试过程中找到错误源。 然而, 我们的 SBFFL 公式中, 在所谓的方法中, 显示断裂式的频率。 这在测试案例中, 计算出不同的方法( 无论是作为受访者还是受访者) 。 直觉是, 如果在许多不同的调方法下调背景中出现不同的方法, 则在测试案例中, 平均的比SBFFBFS 的平级中, 的平级中, 平级的平级结果中, 将显示任何递减法的递减法都更令人怀疑。