Improving Automated Program Repair with Domain Adaptation

12/21/2022
by   Armin Zirak, et al.
0

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 23.4 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 CodeXGLUE, respectively.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/13/2018

Attention Please: Consider Mockito when Evaluating Newly Proposed Automated Program Repair Techniques

Automated program repair (APR) has attracted widespread attention in rec...
research
12/13/2018

Attention Please: Consider Mockito when Evaluating Newly Released Automated Program Repair Techniques

Automated program repair (APR) has caused widespread concern in recent y...
research
01/20/2023

An Analysis of the Automatic Bug Fixing Performance of ChatGPT

To support software developers in finding and fixing software bugs, seve...
research
09/15/2023

Practical Program Repair via Preference-based Ensemble Strategy

To date, over 40 Automated Program Repair (APR) tools have been designed...
research
12/18/2018

Learning to Generate Corrective Patches using Neural Machine Translation

Bug fixing is generally a manually-intensive task. However, recent work ...
research
02/10/2020

E-APR: Mapping the Effectiveness of Automated Program Repair

Automated Program Repair (APR) is a fast growing area with many new tech...
research
03/18/2023

Revisiting the Plastic Surgery Hypothesis via Large Language Models

Automated Program Repair (APR) aspires to automatically generate patches...

Please sign up or login with your details

Forgot password? Click here to reset