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 条
  • [1] Adler J, 2018, ADV NEUR IN, V31
  • [2] [Anonymous], 2014, P INT S SOFTW TEST A, DOI DOI 10.1145/2610384.2628058
  • [3] Anvik J., 2005, Proceedings of the 2005 OOPSLA Workshop on Eclipse Technology EXchange. eclipse'05, P35, DOI [DOI 10.1145/1117696, 10.1145/1117696, DOI 10.1145/1117696.1117704]
  • [4] Getafix: Learning to Fix Bugs Automatically
    Bader, Johannes
    Scott, Andrew
    Pradel, Michael
    Chandra, Satish
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA):
  • [5] Bahdanau D, 2016, Arxiv, DOI [arXiv:1409.0473, 10.48550/arXiv.1409.0473, DOI 10.48550/ARXIV.1409.0473]
  • [6] SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair
    Chen, Zimin
    Kommrusch, Steve
    Tufano, Michele
    Pouchet, Louis-Noel
    Poshyvanyk, Denys
    Monperrus, Martin
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (09) : 1943 - 1959
  • [7] Editing in Style: Uncovering the Local Semantics of GANs
    Collins, Edo
    Bala, Raja
    Price, Bob
    Susstrunk, Sabine
    [J]. 2020 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), 2020, : 5770 - 5779
  • [8] Engström E, 2010, LECT NOTES COMPUT SC, V6156, P3, DOI 10.1007/978-3-642-13792-1_3
  • [9] Gal Y, 2016, ADV NEUR IN, V29
  • [10] GitHub, 2023, Lets build from here