How Different Is It Between Machine-Generated and Developer-Provided Patches? An Empirical Study on The Correct Patches Generated by Automated Program Repair Techniques

06/08/2019
by   Shangwen Wang, et al.
0

Background: Over the years, Automated Program Repair (APR) has attracted much attention from both academia and industry since it can reduce the costs in fixing bugs. However, how to assess the patch correctness remains to be an open challenge. Two widely adopted ways to approach this challenge, including manually checking and validating using automated generated tests, are biased (i.e., suffering from subjectivity and low precision respectively). Aim: To address this concern, we propose to conduct an empirical study towards understanding the correct patches that are generated by existing state-of-the-art APR techniques, aiming at providing guidelines for future assessment of patches. Method: To this end, we first present a Literature Review (LR) on the reported correct patches generated by recent techniques on the Defects4J benchmark and collect 177 correct patches after a process of sanity check. We investigate how these machine-generated correct patches achieve semantic equivalence, but syntactic difference compared with developer-provided ones, how these patches distribute in different projects and APR techniques, and how the characteristics of a bug affect the patches generated for it. Results: Our main findings include 1) we do not need to fix bugs exactly like how developers do since we observe that 25.4 correct patches generated by APR techniques are syntactically different from developer-provided ones; 2) the distribution of machine-generated correct patches diverges for the aspects of Defects4J projects and APR techniques; and 3) APR techniques tend to generate patches that are different from those by developers for bugs with large patch sizes. Conclusion: Our study not only verifies the conclusions from previous studies but also highlights implications for future study towards assessing patch correctness.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/25/2022

Practical Program Repair in the Era of Large Pre-trained Language Models

Automated Program Repair (APR) aims to help developers automatically pat...
research
04/19/2020

Interactive Patch Filtering as Debugging Aid

It is widely recognized that program repair tools need to have a high pr...
research
07/14/2022

Attention: Not Just Another Dataset for Patch-Correctness Checking

Automated Program Repair (APR) techniques have drawn wide attention from...
research
05/15/2021

How Does Regression Test Selection Affect Program Repair? An Extensive Study on 2 Million Patches

APR techniques can be extremely time consuming since (1) a large number ...
research
07/15/2019

Characterizing Developer Use of Automatically Generated Patches

We present a study that characterizes the way developers use automatical...
research
02/07/2023

Impact of Combining Syntactic and Semantic Similarities on Patch Prioritization while using the Insertion Mutation Operators

Patch prioritization ranks candidate patches based on their likelihood o...
research
12/28/2022

A Bayesian Framework for Automated Debugging

Debugging takes up a significant portion of developer time. As a result,...

Please sign up or login with your details

Forgot password? Click here to reset