TransRepair: Context-aware program repair for compilation errors

Automatically fixing compilation errors can greatly raise the productivity of software development, by guiding the novice or AI programmers to write and debug code. Recently, learning-based program repair has gained extensive attention and became the state of-the-art in practice. But it still leaves...

Full description

Saved in:
Bibliographic Details
Main Authors: LI, Xueyang, LIU, Shangqing, FENG, Ruitao, MENG, Guozhu, XIE, Xiaofei, CHEN, Kai, LIU, Yang
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2022
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/7649
https://ink.library.smu.edu.sg/context/sis_research/article/8652/viewcontent/3551349.3560422_pvoa_cc_by.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-8652
record_format dspace
spelling sg-smu-ink.sis_research-86522024-07-19T07:22:09Z TransRepair: Context-aware program repair for compilation errors LI, Xueyang LIU, Shangqing FENG, Ruitao MENG, Guozhu XIE, Xiaofei CHEN, Kai LIU, Yang Automatically fixing compilation errors can greatly raise the productivity of software development, by guiding the novice or AI programmers to write and debug code. Recently, learning-based program repair has gained extensive attention and became the state of-the-art in practice. But it still leaves plenty of space for improvement. In this paper, we propose an end-to-end solution TransRepair to locate the error lines and create the correct substitute for a C program simultaneously. Superior to the counterpart, our approach takes into account the context of erroneous code and diagnostic compilation feedback. Then we devise a Transformer-based neural network to learn the ways of repair from the erroneous code as well as its context and the diagnostic feedback. To increase the effectiveness of TransRepair, we summarize 5 types and 74 fine-grained sub-types of compilations errors from two real-world program datasets and the Internet. Then a program corruption technique is developed to synthesize a large dataset with 1,821,275 erroneous C programs. Through the extensive experiments, we demonstrate that TransRepair outperforms the state-of-the-art in both single repair accuracy and full repair accuracy. Further analysis sheds light on the strengths and weaknesses in the contemporary solutions for future improvement. 2022-10-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/7649 info:doi/10.1145/3551349.3560422 https://ink.library.smu.edu.sg/context/sis_research/article/8652/viewcontent/3551349.3560422_pvoa_cc_by.pdf http://creativecommons.org/licenses/by/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Program repair compilation error deep learning context-aware Artificial Intelligence and Robotics Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Program repair
compilation error
deep learning
context-aware
Artificial Intelligence and Robotics
Software Engineering
spellingShingle Program repair
compilation error
deep learning
context-aware
Artificial Intelligence and Robotics
Software Engineering
LI, Xueyang
LIU, Shangqing
FENG, Ruitao
MENG, Guozhu
XIE, Xiaofei
CHEN, Kai
LIU, Yang
TransRepair: Context-aware program repair for compilation errors
description Automatically fixing compilation errors can greatly raise the productivity of software development, by guiding the novice or AI programmers to write and debug code. Recently, learning-based program repair has gained extensive attention and became the state of-the-art in practice. But it still leaves plenty of space for improvement. In this paper, we propose an end-to-end solution TransRepair to locate the error lines and create the correct substitute for a C program simultaneously. Superior to the counterpart, our approach takes into account the context of erroneous code and diagnostic compilation feedback. Then we devise a Transformer-based neural network to learn the ways of repair from the erroneous code as well as its context and the diagnostic feedback. To increase the effectiveness of TransRepair, we summarize 5 types and 74 fine-grained sub-types of compilations errors from two real-world program datasets and the Internet. Then a program corruption technique is developed to synthesize a large dataset with 1,821,275 erroneous C programs. Through the extensive experiments, we demonstrate that TransRepair outperforms the state-of-the-art in both single repair accuracy and full repair accuracy. Further analysis sheds light on the strengths and weaknesses in the contemporary solutions for future improvement.
format text
author LI, Xueyang
LIU, Shangqing
FENG, Ruitao
MENG, Guozhu
XIE, Xiaofei
CHEN, Kai
LIU, Yang
author_facet LI, Xueyang
LIU, Shangqing
FENG, Ruitao
MENG, Guozhu
XIE, Xiaofei
CHEN, Kai
LIU, Yang
author_sort LI, Xueyang
title TransRepair: Context-aware program repair for compilation errors
title_short TransRepair: Context-aware program repair for compilation errors
title_full TransRepair: Context-aware program repair for compilation errors
title_fullStr TransRepair: Context-aware program repair for compilation errors
title_full_unstemmed TransRepair: Context-aware program repair for compilation errors
title_sort transrepair: context-aware program repair for compilation errors
publisher Institutional Knowledge at Singapore Management University
publishDate 2022
url https://ink.library.smu.edu.sg/sis_research/7649
https://ink.library.smu.edu.sg/context/sis_research/article/8652/viewcontent/3551349.3560422_pvoa_cc_by.pdf
_version_ 1814047695790145536