一句话:提出 Rete,通过学习项目无关的变量命名空间表示并联合排序变量与补丁模板,提升自动程序修复的效果。
自动程序修复的核心难题是在庞大的候选补丁空间中定位正确补丁。真实程序定义的大型变量命名空间会显著加剧搜索空间爆炸,而现有修复方法忽略程序命名空间信息,导致效率低下且容易过拟合测试。为此,论文提出 Rete:它使用神经网络提取项目无关的变量 CDU 链(即带控制流的定义-使用链)信息,并据此联合对变量与容纳变量的补丁模板进行排序,从而在搜索空间中导航。作者在从 ManyBugs 和 BugsInPy 两个数据集抽取的 142 个缺陷上评估 Rete,结果表明它新生成 6 个正确补丁,修复了此前工具未能修复的缺陷,相较现有最优方法分别提升 31% 和 59%。
A key challenge of automated program repair is finding correct patches in the vast search space of candidate patches. Real-world programs define large namespaces of variables that considerably contributes to the search space explosion. Existing program repair approaches neglect information about the program namespace, which makes them inefficient and increases the chance of test-overfitting. We propose Rete, a new program repair technique, that learns project-independent information about program namespace and uses it to navigate the search space of patches. Rete uses a neural network to extract project-independent information about variable CDU chains, def-use chains augmented with control flow. Then, it ranks patches by jointly ranking variables and the patch templates into which the variables are inserted. We evaluated Rete on 142 bugs extracted from two datasets, ManyBugs and BugsInPy. Our experiments demonstrate that ReTe generates six new correct patches that fix bugs that previous tools did not repair, an improvement of 31% and 59% over the existing state of the art.