Evaluating the Generalizability of LLMs in Automated Program Repair

Fengjie Li, Jiajun Jiang, Jiajun Sun, Hongyu Zhang
3/12/2025
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

LLM-based automated program repair methods have attracted significant attention for their state-of-the-art performance. However, they were primarily evaluated on a few well known datasets like Defects4J, raising questions about their effectiveness on new datasets.

Show full abstract

In this study, we evaluate 11 top-performing LLMs on DEFECTS4J-TRANS, a new dataset derived from transforming Defects4J while maintaining the original semantics. Results from experiments on both Defects4J and DEFECTS4J-TRANS show that all studied LLMs have limited generalizability in APR tasks, with the average number of correct and plausible patches decreasing by 49.48% and 42.90%, respectively, on DEFECTS4J-TRANS. Further investigation into incorporating additional repair-relevant information in repair prompts reveals that, although this information significantly enhances the LLMs' capabilities (increasing the number of correct and plausible patches by up to 136.67% and 121.82%, respectively), performance still falls short of their original results. This indicates that prompt engineering alone is insufficient to substantially enhance LLMs' repair capabilities. Based on our study, we also offer several recommendations for future research.

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{li2025evaluating,
  title  = {Evaluating the Generalizability of LLMs in Automated Program Repair},
  author = {Fengjie Li and Jiajun Jiang and Jiajun Sun and Hongyu Zhang},
  year   = {2025},
  eprint = {2503.09217},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.09217v1}
}

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/2503.09217.svg)](https://codeofpaper.com/paper/2503.09217)

Discussion