Adversarial patch generation for automated program repair

被引:0
作者
Alhefdhi, Abdulaziz [1 ]
Dam, Hoa Khanh [2 ]
Le-Cong, Thanh [3 ]
Le, Bach [3 ]
Ghose, Aditya [2 ]
机构
[1] Prince Sattam Bin Abdulaziz Univ, Dept Comp Engn & Informat, Riyadh 18510, Saudi Arabia
[2] Univ Wollongong, Sch Comp & Informat Technol, Northfields Ave, Wollongong, NSW 2522, Australia
[3] Univ Melbourne, Sch Comp & Informat Syst, Grattan St, Parkville, Vic 3010, Australia
关键词
Automated program repair; Generative adversarial networks; Software analytics; Software quality; Software defects; Patch generation;
D O I
10.1007/s11219-025-09709-4
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Automated Program Repair has attracted significant research in recent years, leading to diverse techniques which 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.
引用
收藏
页数:23
相关论文
共 53 条
  • [31] Regression testing in an industrial environment
    Onoma, AK
    Tsai, WT
    Poonawala, MH
    Suganuma, H
    [J]. COMMUNICATIONS OF THE ACM, 1998, 41 (05) : 81 - 86
  • [32] Rete: Learning Namespace Representation for Program Repair
    Parasaram, Nikhil
    Barr, Earl T.
    Mechtaev, Sergey
    [J]. 2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 1264 - 1276
  • [33] Online GANs for Automatic Performance Testing
    Porres, Ivan
    Rexha, Hergys
    Lafond, Sebastien
    [J]. 2021 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION WORKSHOPS (ICSTW 2021), 2021, : 95 - 100
  • [34] Qi Z., 2015, Proceedings of the 2015 International Symposium on Software Testing and Analysis ISSTA 2015, P24
  • [35] See Abigail, 2017, arXiv, DOI DOI 10.48550/ARXIV.1704.04368
  • [36] Sutskever I, 2014, ADV NEUR IN, V27
  • [37] Usability and Aesthetics: Better Together for Automated Repair of Web Pages
    Thanh Le-Cong
    Le, Xuan Bach D.
    Quyet Thang Huynh
    Phi Le Nguyen
    [J]. 2021 IEEE 32ND INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE 2021), 2021, : 173 - 183
  • [38] Evaluating Representation Learning of Code Changes for Predicting Patch Correctness in Program Repair
    Tian, Haoye
    Liu, Kui
    Kabore, Abdoul Kader
    Koyuncu, Anil
    Li, Li
    Klein, Jacques
    Bissyande, Tegawende F.
    [J]. 2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 981 - 992
  • [39] An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
    Tufano, Michele
    Watson, Cody
    Bavota, Gabriele
    Di Penta, Massimiliano
    White, Martin
    Poshyvanyk, Denys
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2019, 28 (04)
  • [40] An Empirical Investigation into Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
    Tufano, Michele
    Watson, Cody
    Bavota, Gabriele
    Di Penta, Massimiliano
    White, Martin
    Poshyvanyk, Denys
    [J]. PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18), 2018, : 832 - 837