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 条
  • [41] Transferring GANs: Generating Images from Limited Data
    Wang, Yaxing
    Wu, Chenshen
    Herranz, Luis
    van de Weijer, Joost
    Gonzalez-Garcia, Abel
    Raducanu, Bogdan
    [J]. COMPUTER VISION - ECCV 2018, PT VI, 2018, 11210 : 220 - 236
  • [42] Automatically Finding Patches Using Genetic Programming
    Weimer, Westley
    Nguyen, ThanhVu
    Le Goues, Claire
    Forrest, Stephanie
    [J]. 2009 31ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2009, : 364 - +
  • [43] Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-Shot Learning
    Xia, Chunqiu Steven
    Zhang, Lingming
    [J]. PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 959 - 971
  • [44] Precise Condition Synthesis for Program Repair
    Xiong, Yingfei
    Wang, Jie
    Yan, Runfa
    Zhang, Jiachen
    Han, Shi
    Huang, Gang
    Zhang, Lu
    [J]. 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2017, : 416 - 426
  • [45] Nopol: Automatic Repair of Conditional Statement Bugs in Java']Java Programs
    Xuan, Jifeng
    Martinez, Matias
    DeMarco, Favio
    Clement, Maxime
    Lamelas Marcote, Sebastian
    Durieux, Thomas
    Le Berre, Daniel
    Monperrus, Martin
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2017, 43 (01) : 34 - 55
  • [46] Ye H, 2022, Arxiv, DOI [arXiv:2203.12755, 10.48550/arXiv.2203.12755]
  • [47] Neural Program Repair with Execution-based Backpropagation
    Ye, He
    Martinez, Matias
    Monperrus, Martin
    [J]. 2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022), 2022, : 1506 - 1518
  • [48] Automated Classification of Overfitting Patches With Statically Extracted Code Features
    Ye, He
    Gu, Jian
    Martinez, Matias
    Durieux, Thomas
    Monperrus, Martin
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (08) : 2920 - 2938
  • [49] Yu LT, 2017, AAAI CONF ARTIF INTE, P2852
  • [50] DeepRoad: GAN-Based Metamorphic Testing and Input Validation Framework for Autonomous Driving Systems
    Zhang, Mengshi
    Zhang, Yuqun
    Zhang, Lingming
    Liu, Cong
    Khurshid, Sarfraz
    [J]. PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18), 2018, : 132 - 142