SelfAPR:基于测试执行诊断的自监督程序修复
SelfAPR: Self-supervised Program Repair with Test Execution Diagnostics
AI总结:
SelfAPR提出自监督程序修复方法,通过扰动项目历史版本生成训练样本并编码测试执行诊断,在Defects4J上修复110个缺陷,优于监督学习方法。
摘要:
基于学习的程序修复在最近一系列论文中取得了良好结果。然而,我们观察到相关工作未能修复某些缺陷,原因是缺乏关于1)被修复程序的应用领域,以及2)被修复的故障类型的知识。在本文中,我们通过将学习范式从监督训练转变为自监督训练,在名为SelfAPR的方法中解决了这两个问题。首先,SelfAPR通过扰动被修复程序的先前版本在磁盘上生成训练样本,迫使神经模型捕获项目特定的知识。这与之前基于挖掘历史提交的工作不同。其次,SelfAPR执行所有训练样本,并将测试执行诊断提取并编码到输入表示中,引导神经模型修复相应类型的故障。这与现有仅将静态源代码作为输入的研究不同。我们实现了SelfAPR并对其进行了系统性评估。我们通过扰动17个开源项目生成了1 039 873个训练样本。我们在Defects4J的818个缺陷上评估SelfAPR,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 projectspecific 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。