论文标题
自动化程序维修的对抗贴片生成
Adversarial Patch Generation for Automated Program Repair
论文作者
论文摘要
近年来,自动化计划维修吸引了大量研究,导致了各种技术,这些技术集中在两个主要方向上:基于搜索和基于语义的程序维修。前者的技术通常由于巨大的搜索空间而面临挑战,从而导致难以识别正确的解决方案,而后一种方法受到基础语义分析仪的能力限制,从而限制了它们的可扩展性。在本文中,我们提出了Nevermore,这是一种受虫子和修复程序的对抗性启发的基于学习的新型机制。 Nevermore建立在生成的对抗网络体系结构上,并接受了历史错误修复的培训,以生成密切模仿人类生产的修复程序的维修。我们对500个现实世界错误的经验评估证明了Nevermore在固定错误中的有效性,从而生成了与人类修复相匹配的维修,该修复程序的21.2%是被检查的错误。此外,我们在缺陷4J数据集上评估了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.