arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2012.11060cs.SE

对抗性补丁生成用于自动化程序修复

Adversarial Patch Generation for Automated Program Repair

Abdulaziz Alhefdhi, Hoa Khanh Dam, Thanh Le-Cong, Bach Le, Aditya Ghose

AI总结:

提出基于GAN的NEVERMORE模型,利用历史缺陷修复数据生成类人修复方案,在500个真实缺陷上21.2%匹配人类修复,并解决多个基线未修复的缺陷。

摘要:

自动化程序修复近年来吸引了大量研究,催生了多种技术,主要聚焦于两个方向:基于搜索的程序修复和基于语义的程序修复。前者常因搜索空间巨大而面临挑战,导致难以识别正确的解决方案;后者则受限于底层语义分析器的能力,限制了其可扩展性。在本文中,我们提出NEVERMORE,一种新颖的基于学习的机制,灵感来源于缺陷和修复的对抗性本质。NEVERMORE基于生成对抗网络架构构建,并在历史缺陷修复数据上进行训练,以生成与人类修复高度相似的修复方案。我们在500个真实世界缺陷上的实证评估证明了NEVERMORE在缺陷修复中的有效性,为21.2%的检查缺陷生成了与人类修复匹配的修复方案。此外,我们在Defects4J数据集上评估了NEVERMORE,我们的方法为4个未被最先进基线解决的缺陷生成了修复。NEVERMORE还修复了另外8个仅由部分基线解决的缺陷。最后,我们对输入和训练风格对NEVERMORE性能的影响进行了深入分析,揭示了所选风格在何处影响模型的缺陷修复能力。

英文摘要:

Automated Program Repair has attracted significant research in recent years, leading to diverse techniques that focus on two main directions: search-based and semantic-based program repair. The former techniques often face challenges due to the vast search space, resulting in difficulties in identifying correct solutions, while the latter approaches are constrained by the capabilities of the underlying semantic analyser, limiting their scalability. In this paper, we propose NEVERMORE, a novel learning-based mechanism inspired by the adversarial nature of bugs and fixes. NEVERMORE is built upon the Generative Adversarial Networks architecture and trained on historical bug fixes to generate repairs that closely mimic human-produced fixes. Our empirical evaluation on 500 real-world bugs demonstrates the effectiveness of NEVERMORE in bug-fixing, generating repairs that match human fixes for 21.2% of the examined bugs. Moreover, we evaluate NEVERMORE on the Defects4J dataset, where our approach generates repairs for 4 bugs that remained unresolved by state-of-the-art baselines. NEVERMORE also fixes another 8 bugs which were only resolved by a subset of these baselines. Finally, we conduct an in-depth analysis of the impact of input and training styles on NEVERMORE's performance, revealing where the chosen style influences the model's bug-fixing capabilities.

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

↑