Improving Automated Program Repair with Domain Adaptation
Not on the map. Why?
Abstract (arXiv)
Automated Program Repair (APR) is defined as the process of fixing a bug/defect in the source code, by an automated tool. APR tools have recently experienced promising results by leveraging state-of-the-art Neural Language Processing (NLP) techniques. APR tools such as TFix and CodeXGLUE combine text-to-text transformers with software-specific techniques are outperforming alternatives, these days. However, in most APR studies the train and test sets are chosen from the same set of projects. In reality, however, APR models are meant to be generalizable to new and different projects. Therefore, there is a potential threat that reported APR models with high effectiveness perform poorly when the characteristics of the new project or its bugs are different than the training set's(Domain Shift). In this study, we first define and measure the domain shift problem in automated program repair. Then, we then propose a domain adaptation framework that can adapt an APR model for a given target project. We conduct an empirical study with three domain adaptation methods FullFineTuning, TuningWithLightWeightAdapterLayers, and CurriculumLearning using two state-of-the-art domain adaptation tools (TFix and CodeXGLUE) and two APR models on 611 bugs from 19 projects. The results show that our proposed framework can improve the effectiveness of TFix by 13.05% and CodeXGLUE by 23.4%. Another contribution of this study is the proposal of a data synthesis method to address the lack of labelled data in APR. We leverage transformers to create a bug generator model. We use the generated synthetic data to domain adapt TFix and CodeXGLUE on the projects with no data (Zero-shot learning), which results in an average improvement of 5.76% and 24.42% for TFix and CodeXGLUE, respectively.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 59 of its 118 references that are in the map. First posted on arXiv 21 Dec 2022.
Builds on
59 of 118 references.
References · 59
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2016Concrete Problems in AI Safetycited by 1,642
- 2017Adversarial Discriminative Domain Adaptationcited by 1,311
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2018Deep Visual Domain Adaptation: A Surveycited by 635
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2019Gradient based sample selection for online continual learningcited by 571
38 more
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2015Return of Frustratingly Easy Domain Adaptationcited by 391
- 2017Six Challenges for Neural Machine Translationcited by 335
- 2020A Brief Review of Domain Adaptationcited by 288
- 2020Improving Massively Multilingual Neural Machine Translation and Zero-Shot Translationcited by 277
- 2019Simple, Scalable Adaptation for Neural Machine Translationcited by 242
- 2017Learning to Represent Programs with Graphscited by 220
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 145
- 2020On Exposure Bias, Hallucination and Domain Shift in Neural Machine Translationcited by 127
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 108
- 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 94
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 86
- 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
- 2021Break-It-Fix-It: Unsupervised Learning for Program Repaircited by 71
- 2018DeepBugs: A Learning Approach to Name-based Bug Detectioncited by 65
- 2021Self-Supervised Bug Detection and Repaircited by 59
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2019Code-Switching for Enhancing NMT with Pre-Specified Translationcited by 53
- 2021Neural Program Repair with Execution-based Backpropagationcited by 50
- 2021Domain Adaptation and Multi-Domain Adaptation for Neural Machine Translation: A Surveycited by 46
- 2018Denoising Neural Machine Translation Training with Trusted Data and Online Data Selectioncited by 43
- 2019Getafix: Learning to Fix Bugs Automaticallycited by 41
- 2019Neural Program Repair by Jointly Learning to Localize and Repaircited by 40
- 2017Zero-Shot Deep Domain Adaptationcited by 35
- 2019Non-Parametric Adaptation for Neural Machine Translationcited by 34
- 2017Dynamic Data Selection for Neural Machine Translationcited by 33
- 2022SelfAPR: Self-supervised Program Repair with Test Execution Diagnosticscited by 33
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2017Sorting and Transforming Program Repair Ingredients via Deep Learning Code Similaritiescited by 26
- 2018Automatic Software Repair: a Bibliographycited by 24
- 2017Dynamic Neural Program Embedding for Program Repaircited by 23
- 2019Cross-lingual Pre-training Based Transfer for Zero-shot Neural Machine Translationcited by 23
- 2022DEAR: A Novel Deep Learning-based Approach for Automated Program Repaircited by 22
- 2020Reinforced Curriculum Learning on Pre-trained Neural Machine Translation Modelscited by 20
- 2019MetaMT,a MetaLearning Method Leveraging Multiple Domain Data for Low Resource Machine Translationcited by 17
- 2022On Distribution Shift in Learning-based Bug Detectorscited by 15
- 2018Dissection of a Bug Dataset: Anatomy of 395 Patches from Defects4Jcited by 14
- 2018Learning How to Mutate Source Code from Bug-Fixescited by 13
50 most cited of 59 All 59 (JSON)
Built on by
Citing papers per year: 2023: 2; 2024: 3; 2025: 3; 2026: 2.
10 papers.
- 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repaircited by 50
- 2024CigaR: Cost-efficient Program Repair with LLMscited by 15
- 2024Enhanced Automated Code Vulnerability Repair using Large Language Modelscited by 10
- 2023Domain Adaptation for Code Model-based Unit Test Case Generationcited by 7
- 2024AI for DevSecOps: A Landscape and Future Opportunitiescited by 4
- 2025AdaptiveLog: An Adaptive Log Analysis Framework with the Collaboration of Large and Small Language Modelcited by 4
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
- 2026Anchored Self-Play for Code Repaircited by 1
- 2025Software Vulnerability Management in the Era of Artificial Intelligence: An Industry Perspectivecited by 0
- 2026On the Impact of Code Comments for Automated Bug-Fixing: An Empirical Studycited by 0
- 2026Anchored Self-Play for Code Repair3 Jul 2026
- 2026On the Impact of Code Comments for Automated Bug-Fixing: An Empirical Study30 Jan 2026
- 2025Software Vulnerability Management in the Era of Artificial Intelligence: An Industry Perspective20 Dec 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025AdaptiveLog: An Adaptive Log Analysis Framework with the Collaboration of Large and Small Language Model19 Jan 2025
- 2024AI for DevSecOps: A Landscape and Future Opportunities7 Apr 2024
- 2024CigaR: Cost-efficient Program Repair with LLMs9 Feb 2024
- 2024Enhanced Automated Code Vulnerability Repair using Large Language Models8 Jan 2024
- 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repair25 Dec 2023
- 2023Domain Adaptation for Code Model-based Unit Test Case Generation15 Aug 2023