一句话:提出统一刻画故障定位与自动程序修复的贝叶斯框架,并据此实现利用程序中间值的补丁排序技术 BAPP。
调试占据了开发者大量时间,故障定位(FL)与自动程序修复(APR)因此备受关注。近期如 Unified Debugging 等技术将两者紧密耦合,但缺乏能同时形式化表达这两类任务、并对其方法及隐含假设进行形式分析的理论框架。本文提出一个理解自动化调试的贝叶斯框架,并给出自动化调试目标的精确表述;该框架能够还原前人工作中最大化的故障定位公式,也可用于分析现有 APR 技术及其基本假设。为实证验证,作者进一步提出 BAPP——一种贝叶斯补丁优先级排序技术,其核心方程由该框架推导得出,并引入程序中间值来推断可能的补丁位置与修复动作。实验表明,引入程序值使 BAPP 更精确地识别正确补丁:其排序将所需补丁评估次数减少 68%,修复时间平均减少 34 分钟。框架还提示了在程序修复中使用故障定位信息的若干改进方式,并在 BAPP 上验证其有效性,凸显了值感知自动化调试技术的潜力。
Debugging takes up a significant portion of developer time. As a result, automated debugging techniques including Fault Localization (FL) and Automated Program Repair (APR) have garnered significant attention due to their potential to aid developers in debugging tasks. With the recent advance in techniques that treat the two tasks as closely coupled, such as Unified Debugging, a framework to formally express these two tasks together would heighten our understanding of automated debugging and provide a way to formally analyze techniques and approaches. To this end, we propose a Bayesian framework of understanding automated debugging. We find that the Bayesian framework, along with a concrete statement of the objective of automated debugging, can recover maximal fault localization formulae from prior work, as well as analyze existing APR techniques and their underlying assumptions. As a means of empirically demonstrating our framework, we further propose BAPP, a Bayesian Patch Prioritization technique that incorporates intermediate program values to analyze likely patch locations and repair actions, with its core equations being derived by our Bayesian framework. We find that incorporating program values allows BAPP to identify correct patches more precisely: the rankings produced by BAPP reduced the number of required patch evaluations by 68% and consequently reduced the repair time by 34 minutes on average. Further, our Bayesian framework suggests a number of changes to the way fault localization information is used in program repair, which we validate is useful for BAPP. These results highlight the potential of value-cognizant automated debugging techniques, and further verifies our theoretical framework.