Logo image
TransRepair: Context-aware Program Repair for Compilation Errors
Conference proceeding   Open access

TransRepair: Context-aware Program Repair for Compilation Errors

Xueyang Li, Shangqing Liu, Ruitao Feng, Guozhu Meng, Xiaofei Xie, Kai Chen and Yang Liu
Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineerin, ASE 2022, pp.1-13
IEEE ACM International Conference on Automated Software Engineering
ASE '22: 37th IEEE/ACM International Conference on Automated Software Engineering, 37 (Rochester, MI, United States, 10/10/2022–14/10/2022)
05/01/2023
pdf
TransRepair: Context-aware Program Repair1.17 MBDownloadView
Published (Version of record) Open Access CC BY V4.0
url
https://doi.org/10.1145/3551349.3560422View
Published (Version of record) Open

Related links

Metrics

Abstract

Automation & Control Systems Computer Science Computer Science, Software Engineering Computer Science, Theory & Methods Science & Technology Technology
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.

Details

Logo image