Evaluating Representation Learning of Code Changes for Predicting Patch Correctness in Program Repair

08/07/2020
by   Haoye Tian, et al.
0

A large body of the literature of automated program repair develops approaches where patches are generated to be validated against an oracle (e.g., a test suite). Because such an oracle can be imperfect, the generated patches, although validated by the oracle, may actually be incorrect. While the state of the art explore research directions that require dynamic information or rely on manually-crafted heuristics, we study the benefit of learning code representations to learn deep features that may encode the properties of patch correctness. Our work mainly investigates different representation learning approaches for code changes to derive embeddings that are amenable to similarity computations. We report on findings based on embeddings produced by pre-trained and re-trained neural networks. Experimental results demonstrate the potential of embeddings to empower learning algorithms in reasoning about patch correctness: a machine learning predictor with BERT transformer-based embeddings associated with logistic regression yielded an AUC value of about 0.8 in predicting patch correctness on a deduplicated dataset of 1000 labeled patches. Our study shows that learned representations can lead to reasonable performance when comparing against the state-of-the-art, PATCH-SIM, which relies on dynamic information. These representations may further be complementary to features that were carefully (manually) engineered in the literature.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/30/2019

Automated Patch Assessment for Program Repair at Scale

In this paper, we do automatic correctness assessment for patches genera...
research
01/29/2023

Boosting Automated Patch Correctness Prediction via Pre-trained Language Model

Automated program repair (APR) aims to fix software bugs automatically w...
research
03/31/2021

Exploring Plausible Patches Using Source Code Embeddings in JavaScript

Despite the immense popularity of the Automated Program Repair (APR) fie...
research
03/01/2023

PatchZero: Zero-Shot Automatic Patch Correctness Assessment

Automated Program Repair (APR) techniques have shown more and more promi...
research
07/28/2021

Checking Patch Behaviour against Test Specification

Towards predicting patch correctness in APR, we propose a simple, but no...
research
08/08/2022

Is this Change the Answer to that Problem? Correlating Descriptions of Bug and Code Changes for Evaluating Patch Correctness

In this work, we propose a novel perspective to the problem of patch cor...
research
05/15/2018

On Reliability of Patch Correctness Assessment

Current state-of-the-art automatic software repair (ASR) techniques rely...

Please sign up or login with your details

Forgot password? Click here to reset