Semantic Code Repair using Neuro-Symbolic Transformation Networks

10/30/2017
by   Jacob Devlin, et al.
0

We study the problem of semantic code repair, which can be broadly defined as automatically fixing non-syntactic bugs in source code. The majority of past work in semantic code repair assumed access to unit tests against which candidate repairs could be validated. In contrast, the goal here is to develop a strong statistical model to accurately predict both bug locations and exact fixes without access to information about the intended correct behavior of the program. Achieving such a goal requires a robust contextual repair model, which we train on a large corpus of real-world source code that has been augmented with synthetically injected bugs. Our framework adopts a two-stage approach where first a large set of repair candidates are generated by rule-based processors, and then these candidates are scored by a statistical model using a novel neural network architecture which we refer to as Share, Specialize, and Compete. Specifically, the architecture (1) generates a shared encoding of the source code using an RNN over the abstract syntax tree, (2) scores each candidate repair using specialized network modules, and (3) then normalizes these scores together so they can compete against one another in comparable probability space. We evaluate our model on a real-world test set gathered from GitHub containing four common categories of bugs. Our model is able to predict the exact correct repair 41% of the time with a single guess, compared to 13% accuracy for an attentional sequence-to-sequence model.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/24/2018

SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair

This paper presents a novel end-to-end approach to program repair based ...
research
04/25/2023

TraceFixer: Execution Trace-Driven Program Repair

When debugging unintended program behavior, developers can often identif...
research
04/20/2023

Leveraging Static Analysis for Bug Repair

We propose a method combining machine learning with a static analysis to...
research
02/03/2023

KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair

Automated Program Repair (APR) improves software reliability by generati...
research
04/16/2021

Generating Bug-Fixes Using Pretrained Transformers

Detecting and fixing bugs are two of the most important yet frustrating ...
research
10/30/2019

Stryker: Scaling Specification-Based Program Repair by Pruning Infeasible Mutants with SAT

Many techniques for automated program repair involve syntactic program t...
research
04/13/2022

Fix Bugs with Transformer through a Neural-Symbolic Edit Grammar

We introduce NSEdit (neural-symbolic edit), a novel Transformer-based co...

Please sign up or login with your details

Forgot password? Click here to reset