Skip to main content
QUICK REVIEW

[论文解读] Program Repair: Automated vs. Manual

Quanjun Zhang, Yuan Zhao|arXiv (Cornell University)|Mar 10, 2022
Software Engineering Research被引用 12
一句话总结

本研究通过一项大规模的人工实验,对比了自动化程序修复(APR)工具与人工调试,实验涉及20名开发人员和160个修复任务。结果表明,尽管APR工具能缩短调试时间并提高正确修复的错误数量,但其生成的补丁质量往往较低,且报告具有误导性,提示在报告清晰度和反馈机制方面进行改进,对实际应用至关重要。

ABSTRACT

Various automated program repair (APR) techniques have been proposed to fix bugs automatically in the last decade. Although recent researches have made significant progress on the effectiveness and efficiency, it is still unclear how APR techniques perform with human intervention in a real debugging scenario. To bridge this gap, we conduct an extensive study to compare three state-of-the-art APR tools with manual program repair, and further investigate whether the assistance of APR tools (i.e., repair reports) can improve manual program repair. To that end, we recruit 20 participants for a controlled experiment, resulting in a total of 160 manual repair tasks and a questionnaire survey. The experiment reveals several notable observations that (1) manual program repair may be influenced by the frequency of repair actions sometimes; (2) APR tools are more efficient in terms of debugging time, while manual program repair tends to generate a correct patch with fewer attempts; (3) APR tools can further improve manual program repair regarding the number of correctly-fixed bugs, while there exists a negative impact on the patch correctness; (4) participants are used to consuming more time to identify incorrect patches, while they are still misguided easily; (5) participants are positive about the tools' repair performance, while they generally lack confidence about the usability in practice. Besides, we provide some guidelines for improving the usability of APR tools (e.g., the misleading information in reports and the observation of feedback).

研究动机与目标

  • 评估最先进的自动化程序修复(APR)工具与人工程序修复在真实世界调试场景中的有效性与效率。
  • 探究APR生成的修复报告在多大程度上能提升人工调试的表现。
  • 从开发人员的视角,识别APR工具在补丁质量和报告清晰度等方面的可用性挑战。
  • 为提升APR工具在真实开发工作流中的实用性与采纳率,提出可操作的改进建议。

提出的方法

  • 在Defects4J基准测试的8个真实错误上,对20名参与者执行了160次人工修复任务,开展受控实验。
  • 选取了三款代表不同修复类别的最新APR工具,并将其修复报告用作调试辅助。
  • 开发了定制平台MoocTest,以自动化分配错误与报告,并确保实验条件的一致性。
  • 收集了修复时间、尝试次数和补丁正确性的定量数据,并通过问卷收集定性反馈。
  • 分析了修复频率、补丁质量与报告可用性对开发人员表现的影响。
  • 基于观察到的可用性问题(如误导性补丁和非结构化日志反馈),提出了实用化建议。

实验结果

研究问题

  • RQ1在调试时间、尝试次数和补丁正确性方面,自动化与人工程序修复有何差异?
  • RQ2在真实世界环境中,APR工具在多大程度上能提升人工程序修复的有效性?
  • RQ3开发人员在使用APR生成的修复报告时面临哪些可用性问题?
  • RQ4APR报告中误导性或低质量的补丁如何影响开发人员的调试行为?
  • RQ5对修复报告和反馈机制进行哪些改进,可增强开发人员的信任度与生产力?

主要发现

  • 人工程序修复受代码修改操作频率的影响,较高频率可能表明调试策略效率较低。
  • APR工具显著快于人工修复,大幅缩短平均调试时间,但人工修复在更少尝试次数下能获得更高的正确率。
  • 当用作辅助工具时,APR工具能提高正确修复的错误数量,但也增加了生成错误或低质量补丁的风险。
  • 开发人员需花费大量时间验证可能存在错误的补丁,且常被APR工具提供的看似合理但错误的建议误导。
  • 尽管对APR工具性能有积极评价,开发人员在实际使用中仍对修复报告的可用性与可靠性缺乏信心。
  • 日志输出中的反馈常因结构不佳且缺乏可操作的调试提示而被忽视,表明需更好地整合执行日志与补丁建议。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。