Program Repair with Minimal Edits Using CodeT5

Atsushi Shirafuji, Md. Mostafizer Rahman, Md Faizul Ibne Amin, Yutaka Watanobe
9/26/2023
cs.CLcs.AIcs.SE

No confident code implementation found for this paper.

Abstract

Programmers often struggle to identify and fix bugs in their programs. In recent years, many language models (LMs) have been proposed to fix erroneous programs and support error recovery. However, the LMs tend to generate solutions that differ from the original input programs. This leads to potential comprehension difficulties for users. In this paper, we propose an approach to suggest a correct program with minimal repair edits using CodeT5. We fine-tune a pre-trained CodeT5 on code pairs of wrong and correct programs and evaluate its performance with several baseline models. The experimental results show that the fine-tuned CodeT5 achieves a pass@100 of 91.95% and an average edit distance of the most similar correct program of 6.84, which indicates that at least one correct program can be suggested by generating 100 candidate programs. We demonstrate the effectiveness of LMs in suggesting program repair with minimal edits for solving introductory programming problems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shirafuji2023program,
  title  = {Program Repair with Minimal Edits Using CodeT5},
  author = {Atsushi Shirafuji and Md. Mostafizer Rahman and Md Faizul Ibne Amin and Yutaka Watanobe},
  year   = {2023},
  eprint = {2309.14760},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.14760v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.14760.svg)](https://codeofpaper.com/paper/2309.14760)

Discussion