Evaluating the Generalizability of LLMs in Automated Program Repair

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. 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.

Authors

Institutions

Publication Details

Published
2025-04-27
DOI
https://doi.org/10.1109/icse-nier66352.2025.00024
Citations
2
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
4.62

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Evaluating the Generalizability of LLMs in Automated Program Repair

Fengjie Li, Jiajun Jiang, Hongyu Zhang, Jiajun Sun
2 citations
Software Testing and Debugging Techniques
4.62
article

Evaluating the Generalizability of LLMs in Automated Program Repair

Fengjie Li, Jiajun Jiang, Hongyu Zhang, Jiajun Sun
article en
2 citations

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. 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.

Chongqing University (CN), Tianjin University (CN)
National Natural Science Foundation of China
Industry, innovation and infrastructure
Openalex Percentile: Top 6%
Software Testing and Debugging Techniques
4.62
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.