一句话:提出仅需测试覆盖率的 BIC 识别技术 Fonte,结合故障定位排序提交,显著优于现有方法并支持加权二分。
缺陷引入提交(BIC)的识别对调试和缺陷分派很有价值,但现有方法要么需要对历史版本反复执行失败测试进行二分,成本过高,要么依赖缺陷报告或修复等事后信息,在调试时不可用。Fonte 只需测试覆盖率,将故障定位与 BIC 识别结合,根据提交所修改代码元素的可疑度对提交排序,并利用失败覆盖和风格变更过滤缩小搜索空间。在 130 个真实 BIC 上,Fonte 的 MRR 至少比基于信息检索和神经代码嵌入的先进方法高 39%,其排序分数还可用于加权二分以进一步降低成本。在超过 1000 万行代码的工业项目中,Fonte 能将 87% 的真实批量测试失败的实际 BIC 排在前五,并平均节省 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.