paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automated patch extraction via syntax- and semantics-aware Delta debugging on source code changes

基于语法与语义感知的 Delta 调试从源代码变更中自动提取补丁
FSE Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2018匹配度 2/10 · 该论文属于软件调试/自动程序修复中的 Delta debugging 与补丁提取,使用 AST 差分做变更分解,与用户核心关注的 LLM/Agent、静态分析(尤其 PL→AI、AI→PL)及浮点/Bayesian 程序分析无直接交集。虽然涉及程序分析和工程实现,但研究目标不在用户画像的主线方向上。引用 7 inbox
Masatomo Hashimoto, Akira Mori, Tomonori Izumida
crossref: 2026-09-12

AI 速览

一句话:提出规则化变更分解与 AST 差分,使 Delta 调试能自动提取更小补丁。

Delta 调试(DD)通过系统化测试最小化正常版本与故障版本间的变更来定位回归原因,但当变更集很大且没有配置管理系统时,避免产生不可测试的无效子集仍很困难。本文提出基于规则的语法与语义分解方法,将源代码变更拆为相互独立的组件,以支持 DD 并自动提取补丁;与纯文本差分不同,方法在抽象语法树(AST)上进行树差分。作者为 Java 实现原型,并在 Defects4J 的 194 个缺陷修复和 6 个开源 Java 项目的 8 个真实回归缺陷上评估。相比基于纯文本差分的 DD 工具,平均而言,前者提取的补丁大小减少 50%,测试执行增加 5%;后者补丁大小减少 73%,测试执行增加 40%。

问题
在缺乏配置管理系统时,如何对大规模源代码变更进行 Delta 调试,并避免无效或不可测试的变更子集,从而自动提取补丁。
方法
基于规则将变更分解为语法和语义独立的组件,并使用抽象语法树树差分而非纯文本差分来分析源代码变更。
评估
在 Defects4J 的 194 个 bug fix 与 6 个开源 Java 项目的 8 个真实回归 bug 上评估,并与纯文本差分 DD 工具比较补丁大小和测试执行代价。
原文摘要(Abstract)

Delta debugging (DD) is an approach to automating the debugging activities based on systematic testing. DD algorithms find the cause of a regression of a program by minimizing the changes applied between a working version and a faulty version of the program. However, it is still an open problem to minimize a huge set of changes while avoiding any invalid subsets that do not result in testable programs, especially in case that no software configuration management system is available. In this paper, we propose a rule-based approach to syntactic and semantic decomposition of changes into independent components to facilitate DD on source code changes, and hence to extract patches automatically. For analyzing changes, we make use of tree differencing on abstract syntax trees instead of common differencing on plain texts. We have developed an experimental implementation for Java programs and applied it to 194 bug fixes from Defects4J and 8 real-life regression bugs from 6 open source Java projects. Compared to a DD tool based on plain text differencing, it extracted patches whose size is reduced by 50% at the cost of 5% more test executions for the former dataset and by 73% at the cost of 40% more test executions for the latter, both on average.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4590,
  title = {Automated patch extraction via syntax- and semantics-aware Delta debugging on source code changes},
  author = {Masatomo Hashimoto and Akira Mori and Tomonori Izumida},
  booktitle = {FSE},
  year = {2018},
  doi = {10.1145/3236024.3236047}
}