Improving Automated Program Repair with Domain Adaptation
- URL: http://arxiv.org/abs/2212.11414v1
- Date: Wed, 21 Dec 2022 23:52:09 GMT
- Title: Improving Automated Program Repair with Domain Adaptation
- Authors: Armin Zirak and Hadi Hemati
- Abstract summary: 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.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: 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.
Related papers
- Failing Forward: Improving Generative Error Correction for ASR with Synthetic Data and Retrieval Augmentation [73.9145653659403]
We show that Generative Error Correction models struggle to generalize beyond the specific types of errors encountered during training.
We propose DARAG, a novel approach designed to improve GEC for ASR in in-domain (ID) and OOD scenarios.
Our approach is simple, scalable, and both domain- and language-agnostic.
arXiv Detail & Related papers (2024-10-17T04:00:29Z) - NARRepair: Non-Autoregressive Code Generation Model for Automatic Program Repair [8.77021401961262]
Non-Autoregressive(NAR) method can output target code in a parallel manner to avoid huge inference delays.
We propose NARRepair, the first customized NAR code generation model for the APR task.
The NARRepair features three major novelties, including 1) using repair actions to alleviate the over-correction issue, 2) extracting dependency information from AST to alleviate the issue of lacking inter-word dependency information, and 3) employing two-stage decoding to alleviate the issue of lacking contextual information.
arXiv Detail & Related papers (2024-06-24T11:04:28Z) - Hybrid Automated Program Repair by Combining Large Language Models and Program Analysis [12.7034916462208]
Automated Program Repair (APR) has garnered significant attention due to its potential to streamline the bug repair process for human developers.
This paper introduces an innovative APR approach called GIANTREPAIR.
Based on this insight, GIANTREPAIR first constructs patch skeletons from LLM-generated patches to confine the patch space, and then generates high-quality patches tailored to specific programs.
arXiv Detail & Related papers (2024-06-03T05:05:12Z) - Revisiting Unnaturalness for Automated Program Repair in the Era of Large Language Models [9.454475517867817]
We propose a patch-naturalness measurement, entropy-delta, to improve the efficiency of template-based repair techniques.
Our proposed method can rank correct patches more effectively than state-of-the-art machine learning tools.
arXiv Detail & Related papers (2024-04-23T17:12:45Z) - A Novel Approach for Automatic Program Repair using Round-Trip
Translation with Large Language Models [50.86686630756207]
Research shows that grammatical mistakes in a sentence can be corrected by translating it to another language and back.
Current generative models for Automatic Program Repair (APR) are pre-trained on source code and fine-tuned for repair.
This paper proposes bypassing the fine-tuning step and using Round-Trip Translation (RTT): translation of code from one programming language to another programming or natural language, and back.
arXiv Detail & Related papers (2024-01-15T22:36:31Z) - Practical Program Repair via Preference-based Ensemble Strategy [28.176710503313895]
We propose a Preference-based Ensemble Program Repair framework (P-EPR) to rank APR tools for repairing different bugs.
P-EPR is the first non-learning-based APR ensemble method that is novel in its exploitation of repair patterns.
Experimental results show that P-EPR outperforms existing strategies significantly both in flexibility and effectiveness.
arXiv Detail & Related papers (2023-09-15T07:23:04Z) - RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic
Program Repair [75.40584530380589]
We propose a novel Retrieval-Augmented Patch Generation framework (RAP-Gen)
RAP-Gen explicitly leveraging relevant fix patterns retrieved from a list of previous bug-fix pairs.
We evaluate RAP-Gen on three benchmarks in two programming languages, including the TFix benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java.
arXiv Detail & Related papers (2023-09-12T08:52:56Z) - APPT: Boosting Automated Patch Correctness Prediction via Fine-tuning
Pre-trained Models [15.179895484968476]
We propose APPT, a pre-trained model-based automated patch correctness assessment technique by both pre-training and fine-tuning.
We conduct an experiment on 1,183 Defects4J patches and the experimental results show that APPT achieves prediction accuracy of 79.7% and recall of 83.2%.
arXiv Detail & Related papers (2023-01-29T14:28:26Z) - CHAPTER: Exploiting Convolutional Neural Network Adapters for
Self-supervised Speech Models [62.60723685118747]
Self-supervised learning (SSL) is a powerful technique for learning representations from unlabeled data.
We propose an efficient tuning method specifically designed for SSL speech model, by applying CNN adapters at the feature extractor.
We empirically found that adding CNN to the feature extractor can help the adaptation on emotion and speaker tasks.
arXiv Detail & Related papers (2022-12-01T08:50:12Z) - BigIssue: A Realistic Bug Localization Benchmark [89.8240118116093]
BigIssue is a benchmark for realistic bug localization.
We provide a general benchmark with a diversity of real and synthetic Java bugs.
We hope to advance the state of the art in bug localization, in turn improving APR performance and increasing its applicability to the modern development cycle.
arXiv Detail & Related papers (2022-07-21T20:17:53Z) - Efficient pre-training objectives for Transformers [84.64393460397471]
We study several efficient pre-training objectives for Transformers-based models.
We prove that eliminating the MASK token and considering the whole output during the loss are essential choices to improve performance.
arXiv Detail & Related papers (2021-04-20T00:09:37Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.