一句话:系统整理修复模式并构建 TBar,在 Defects4J 上正确修复 43 个缺陷,刷新当时 APR 最佳成绩。
论文重新审视基于模板的自动程序修复(APR)的实际效果,旨在建立关于修复模式有效性的全面认识,并强调故障定位、供体代码检索等辅助步骤的重要性。作者首先调研文献,收集、归纳并标注了反复出现的修复模式;在此基础上构建了 TBar——一个直接系统化地将这些修复模式应用于程序缺陷的 APR 工具。论文在 Defects4J 基准上对 TBar 进行了充分评估,重点考察修复模式在定性与定量上的多样性,以及它们产生合理补丁或正确补丁的能力。结果显示:假设故障定位完美,TBar 可正确或合理地修复 74/101 个缺陷;在复现标准且实用的 APR 评估流水线时,TBar 正确修复了 Defects4J 中的 43 个缺陷,这一性能在文献中(涵盖模板式、随机变异式以及基于合成的所有 APR 方法)前所未有。
We revisit the performance of template-based APR to build comprehensive knowledge about the effectiveness of fix patterns, and to highlight the importance of complementary steps such as fault localization or donor code retrieval. To that end, we first investigate the literature to collect, summarize and label recurrently-used fix patterns. Based on the investigation, we build TBar, a straightforward APR tool that systematically attempts to apply these fix patterns to program bugs. We thoroughly evaluate TBar on the Defects4J benchmark. In particular, we assess the actual qualitative and quantitative diversity of fix patterns, as well as their effectiveness in yielding plausible or correct patches. Eventually, we find that, assuming a perfect fault localization, TBar correctly/plausibly fixes 74/101 bugs. Replicating a standard and practical pipeline of APR assessment, we demonstrate that TBar correctly fixes 43 bugs from Defects4J, an unprecedented performance in the literature (including all approaches, i.e., template-based, stochastic mutation-based or synthesis-based APR).