Fix Bugs with Transformer through a Neural-Symbolic Edit Grammar

04/13/2022
by   Yaojie Hu, et al.
0

We introduce NSEdit (neural-symbolic edit), a novel Transformer-based code repair method. Given only the source code that contains bugs, NSEdit predicts an editing sequence that can fix the bugs. The edit grammar is formulated as a regular language, and the Transformer uses it as a neural-symbolic scripting interface to generate editing programs. We modify the Transformer and add a pointer network to select the edit locations. An ensemble of rerankers are trained to re-rank the editing sequences generated by beam search. We fine-tune the rerankers on the validation set to reduce over-fitting. NSEdit is evaluated on various code repair datasets and achieved a new state-of-the-art accuracy (24.04%) on the Tufano small dataset of the CodeXGLUE benchmark. NSEdit performs robustly when programs vary from packages to packages and when buggy programs are concrete. We conduct detailed analysis on our methods and demonstrate the effectiveness of each component.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/22/2021

Applying CodeBERT for Automated Program Repair of Java Simple Bugs

Software debugging, and program repair are among the most time-consuming...
research
07/20/2022

Explicit Image Caption Editing

Given an image and a reference caption, the image caption editing task a...
research
07/24/2022

Neurosymbolic Repair for Low-Code Formula Languages

Most users of low-code platforms, such as Excel and PowerApps, write pro...
research
08/15/2020

Graph Edit Distance Reward: Learning to Edit Scene Graph

Scene Graph, as a vital tool to bridge the gap between language domain a...
research
10/30/2017

Semantic Code Repair using Neuro-Symbolic Transformation Networks

We study the problem of semantic code repair, which can be broadly defin...
research
07/25/2022

Overwatch: Learning Patterns in Code Edit Sequences

Integrated Development Environments (IDEs) provide tool support to autom...
research
01/28/2021

Learning Structural Edits via Incremental Tree Transformations

While most neural generative models generate outputs in a single pass, t...

Please sign up or login with your details

Forgot password? Click here to reset