arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.06376cs.SE
收藏

Fonte:查找导致失败提交的错误

Fonte: Finding Bug Inducing Commits from Failures

Gabin An, Jingun Hong, Naryeong Kim, Shin Yoo

摘要:

Bug Inducing Commit(BIC)是将软件bug引入代码库的提交。了解给定bug的相关BIC可以为调试和bug分类提供有价值的信息。然而,现有的BIC识别技术要么太昂贵(因为它们需要针对先前版本执行失败的测试以进行二分),要么在调试时不适用(因为它们需要诸如错误报告或错误修复的事后人工制品)。我们提出了Fonte,一个高效和准确的BIC识别技术,只需要测试覆盖率。Fonte将故障定位(FL)与BIC识别相结合,并根据提交修改的代码元素的可疑性对提交进行排名。Fonte使用故障覆盖率和一个过滤器来减少BIC的搜索空间,该过滤器可以检测仅仅是样式更改的提交。我们使用130个真实世界的BIC进行的实证评估表明,Fonte的性能明显优于基于信息检索和神经代码嵌入模型的最新BIC识别技术,MRR至少高出39%。我们还报告说,Fonte产生的排名分数可用于执行加权二分法,进一步降低BIC识别的成本。最后,我们将Fonte应用于一个拥有超过1000万行代码的大型工业项目,并表明它可以将实际BIC排在前五名提交中,占所研究的真实批测试失败的87%,并平均节省32%的BIC检查成本。

英文摘要:

A Bug Inducing Commit (BIC) is a commit that introduces a software bug into the codebase. Knowing the relevant BIC for a given bug can provide valuable information for debugging as well as bug triaging. However, existing BIC identification techniques are either too expensive (because they require the failing tests to be executed against previous versions for bisection) or inapplicable at the debugging time (because they require post hoc artefacts such as bug reports or bug fixes). We propose Fonte, an efficient and accurate BIC identification technique that only requires test coverage. Fonte combines Fault Localisation (FL) with BIC identification and ranks commits based on the suspiciousness of the code elements that they modified. Fonte reduces the search space of BICs using failure coverage as well as a filter that detects commits that are merely style changes. Our empirical evaluation using 130 real-world BICs shows that Fonte significantly outperforms state-of-the-art BIC identification techniques based on Information Retrieval as well as neural code embedding models, achieving at least 39% higher MRR. We also report that the ranking scores produced by Fonte can be used to perform weighted bisection, further reducing the cost of BIC identification. Finally, we apply Fonte to a large-scale industry project with over 10M lines of code, and show that it can rank the actual BIC within the top five commits for 87% of the studied real batch-testing failures, and save the BIC inspection cost by 32% on average.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑