Yi Li bio photo

Yi Li

Associate Professor

College of Computing and Data Science (CCDS)
Nanyang Technological University (NTU)

Address: Block N4-02b-63
50 Nanyang Avenue, Singapore 639798
Phone: +65 6790 4287

Email Twitter LinkedIn GitHub Bitbucket Google Scholar ORCID

RATCHET: Retrieval Augmented Transformer for Program Repair

Jian Wang, Shangqing Liu, Xiaofei Xie, Jing Kai Siow, Kui Liu, and Yi Li

In Proceedings of the 35th International Symposium on Software Reliability Engineering (ISSRE), 2024

Abstract: Automated Program Repair (APR) presents the promising momentum of releasing developers from the burden of manual debugging tasks by automatically fixing bugs in various ways. Recent advances in deep learning inspire many works in employing deep learning techniques to fixing buggy programs. However, several challenges remain unaddressed: (1) state-of-the-art fault localization techniques often require additional artifacts, such as bug-triggering test cases or bug reports. These artifacts are not always available in the early development phases; (2) Sequence-to-Sequence model-based APR often requires additional contexts with high quality to generate patches. Yet, it is challenging to identify high-quality contexts that are not common in programs. In this paper, with the redundancy assumption in program repair, we propose a dual deeplearning-based APR tool, Ratchet-FL, for localizing (Ratchet-FL) and repairing (Ratchet-PG) buggy programs. Ratchet-FL localizes buggy statements based on the feature learned by a simple BiLSTM model from the code, without any bug-triggering test cases or bug reports. Ratchet-PG relies on our proposed retrieval augmented transformer to learn the historical patches and generate patches for fixing bugs. We evaluate the effectiveness of Ratchet with in-the-lab DrRepair dataset and in-the-wild dataset Ratchet-DS(curated in this work). Our experimental results show that Ratchet outperforms state-of-the-art deep learning approaches on fault localization with 39.8-96.4% accuracy and patch generation with 18.4-46.4% repair accuracy.

Cite:

@inproceedings{Wang2024RAT,
  author = {Wang, Jian and Liu, Shangqing and Xie, Xiaofei and Siow, Jing Kai and Liu, Kui and Li, Yi},
  booktitle = {Proceedings of the 35th International Symposium on Software Reliability Engineering (ISSRE)},
  month = oct,
  title = {{RATCHET}: Retrieval Augmented Transformer for Program Repair},
  year = {2024}
}