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