paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SelfAPR: Self-supervised Program Repair with Test Execution Diagnostics

SelfAPR:基于测试执行诊断的自监督程序修复
ASE Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering2022匹配度 3/10 · 该论文属于基于机器学习的程序修复,利用自监督训练和测试执行诊断,虽与“AI→软件工程”相关,但并未涉及用户核心关注的静态分析、形式化验证、LLM/Agent 交叉、浮点程序分析或贝叶斯程序分析。其方法也并非以 LLM/Agent 为基础,与画像中“PL→AI”和“AI→PL”的主线距离较远。引用 81 inbox
He Ye, Matias Martinez, Xiapu Luo, Tao Zhang, Martin Monperrus
crossref: 2026-09-12

AI 速览

一句话:提出自监督程序修复方法 SelfAPR,利用项目内扰动样本与测试执行诊断,在 Defects4J 上正确修复 110 个缺陷。

基于学习的程序修复虽已取得进展,但既有工作常因缺乏对目标程序应用领域和故障类型的知识而修复失败。SelfAPR 将学习范式从监督训练改为自监督训练:它通过扰动待修复程序的先前版本在磁盘上生成训练样本,使神经网络模型捕获项目特定知识,而非依赖挖掘历史提交;同时执行所有训练样本,提取并编码测试执行诊断到输入表示中,引导模型修复相应故障类型。作者实现了 SelfAPR,并用 17 个开源项目扰动生成 1,039,873 个训练样本。在 Defects4J 的 818 个缺陷上评估,SelfAPR 正确修复 110 个,优于所有监督学习修复方法。

问题
现有基于学习的程序修复缺少对待修复程序应用领域和故障类型的知识,且训练样本多来自挖掘历史提交、输入仅含静态源码,导致部分缺陷无法修复。
方法
SelfAPR 采用自监督训练:扰动程序先前版本生成项目内训练样本,并执行样本,将测试执行诊断编码进输入表示,以同时注入项目特定知识和故障类型信息。
评估
在 17 个开源项目上生成 1,039,873 个训练样本,并在 Defects4J 的 818 个缺陷上评估;正确修复 110 个,超过所有监督学习修复方法。
原文摘要(Abstract)

Learning-based program repair has achieved good results in a recent series of papers. Yet, we observe that the related work fails to repair some bugs because of a lack of knowledge about 1) the application domain of the program being repaired, and 2) the fault type being repaired. In this paper, we solve both problems by changing the learning paradigm from supervised training to self-supervised training in an approach called SelfAPR. First, SelfAPR generates training samples on disk by perturbing a previous version of the program being repaired, enforcing the neural model to capture project-specific knowledge. This is different from the previous work based on mined past commits. Second, SelfAPR executes all training samples and extracts and encodes test execution diagnostics into the input representation, steering the neural model to fix the kind of fault. This is different from the existing studies that only consider static source code as input. We implement SelfAPR and evaluate it in a systematic manner. We generate 1 039 873 training samples obtained by perturbing 17 open-source projects. We evaluate SelfAPR on 818 bugs from Defects4J, SelfAPR correctly repairs 110 of them, outperforming all the supervised learning repair approaches.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot7155,
  title = {SelfAPR: Self-supervised Program Repair with Test Execution Diagnostics},
  author = {He Ye and Matias Martinez and Xiapu Luo and Tao Zhang and Martin Monperrus},
  booktitle = {ASE},
  year = {2022},
  doi = {10.1145/3551349.3556926}
}