arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.12015cs.SEcs.LG
收藏

ITER: 面向多位置补丁的迭代式神经修复

ITER: Iterative Neural Repair for Multi-Location Patches

Carnegie Mellon University(卡内基梅隆大学);KTH Royal Institute of Technology(KTH皇家理工学院)

He Ye, Martin Monperrus

AI总结:

针对现有自动化程序修复工具多局限于单位置补丁、忽视部分补丁潜力的问题,提出迭代式神经修复范式ITER,通过迭代优化部分补丁生成多位置修复方案,在Defects4J 2.0基准上实现15.5%的修复率并修复9个独有多位置缺陷。

摘要:

自动化程序修复(APR)已取得可观成果,尤其是采用神经网络的方法。然而,APR工具生成的绝大多数补丁都局限于单个位置。审视神经修复生成的补丁时,其中大部分无法通过编译,少数不可编译的补丁则方向正确。两种情形下的核心问题都是忽视了部分补丁的潜力。本文提出一种名为ITER的迭代式程序修复范式,其核心思想是逐步优化部分补丁,直至其具备合理性与正确性。首先,ITER通过修正编译错误并进一步优化先前生成的代码,迭代优化单位置的部分补丁。其次,ITER通过重新执行故障定位,迭代优化部分补丁以构建多位置补丁。ITER基于经过实战检验的深度神经网络与代码表示实现,面向Java语言。我们在Defects4J 2.0中10个开源项目的476个缺陷上对ITER进行了评估,ITER成功修复了其中15.5%的缺陷,包括9个仅由其修复的多位置缺陷。

英文摘要:

Automated program repair (APR) has achieved promising results, especially using neural networks. Yet, the overwhelming majority of patches produced by APR tools are confined to one single location. When looking at the patches produced with neural repair, most of them fail to compile, while a few uncompilable ones go in the right direction. In both cases, the fundamental problem is to ignore the potential of partial patches. In this paper, we propose an iterative program repair paradigm called ITER founded on the concept of improving partial patches until they become plausible and correct. First, ITER iteratively improves partial single-location patches by fixing compilation errors and further refining the previously generated code. Second, ITER iteratively improves partial patches to construct multi-location patches, with fault localization re-execution. ITER is implemented for Java based on battle-proven deep neural networks and code representation. ITER is evaluated on 476 bugs from 10 open-source projects in Defects4J 2.0. ITER succeeds in repairing 15.5% of them, including 9 uniquely repaired multi-location bugs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑