---
title: "基于大语言模型的自动代码修复综述 — 许鹏宇 2025"
description: "This survey maps how large language models are changing automated program repair (APR), which aims to generate patches for faulty code without manual…"
authors: ["许鹏宇", "况博裕", "苏铓", "付安民"]
year: 2025
venue: "计算机研究与发展 (Journal of Computer Research and Development)"
source: "https://crad.ict.ac.cn/article/doi/10.7544/issn1000-1239.202440467"
doi: "10.7544/issn1000-1239.202440467"
licence: "Free access (crad.ict.ac.cn), no open licence stated — readonly; © 计算机研究与发展"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/papers/xu-2025-large-language-model/"
---
[Elamur Research](https://md.research.elamur.ai/) · [this page in HTML](https://research.elamur.ai/free/papers/xu-2025-large-language-model/)

[home](https://md.research.elamur.ai/) / [papers](https://md.research.elamur.ai/free/papers/) / [2025](https://md.research.elamur.ai/free/papers/2025/page/3/) / 基于大语言模型的自动代码修复综述

# 基于大语言模型的自动代码修复综述

**Authors:** 许鹏宇, 况博裕, 苏铓, 付安民 · **Year:** 2025 · **Venue:** 计算机研究与发展 (Journal of Computer Research and Development) · **Licence:** Free access (crad.ict.ac.cn), no open licence stated — readonly; © 计算机研究与发展

**Links:** [Publisher's page](https://doi.org/10.7544/issn1000-1239.202440467) · [PDF](https://crad.ict.ac.cn/cn/article/pdf/preview/10.7544/issn1000-1239.202440467.pdf) · [DOI 10.7544/issn1000-1239.202440467](https://doi.org/10.7544/issn1000-1239.202440467)

## Summary
This survey maps how large language models are changing automated program repair (APR), which aims to generate patches for faulty code without manual effort. The authors place APR in three stages: traditional, deep-learning-based, and LLM-based. Traditional approaches rely on search, templates or constraint solving. Deep-learning approaches use networks such as RNNs and LSTMs. They argue that LLMs understand code semantics and syntax better and can fix harder defects with more varied patches.

The survey covers CCF-A venue papers from January 2019 to May 2024. It sorts LLM-based APR into two families borrowed from NLP tasks:
- **Cloze style:** the faulty code is masked and the model fills the gap.
- **Neural machine translation style:** the model "translates" buggy code into fixed code.

Tools in each family are compared by model type, model size, defect class, programming language, and strengths and weaknesses. The authors also review benchmarks, evaluation metrics and empirical studies, and they outline open challenges. For Chinese-language readers, the survey is a useful structured entry point into LLM-driven repair research.

## Key points
- Since 2022, papers on LLM-based APR have outnumbered those on traditional and deep-learning APR, and the gap keeps growing.
- Defects are grouped into programming errors, software bugs and security vulnerabilities. Models are adapted to repair through either pretrain-finetune or prompt engineering; AlphaRepair, for example, works through prompting alone.
- Cited example: VulRepair, built on T5, raised vulnerability-repair success from 23% to 44%. Other tools discussed include TYPEFIX, Gamma, TransplantFix, CoCoNuT, SelfAPR, RAP-Gen and ITER.
- Benchmarks referenced include Defects4J, QuixBugs, Vul4J, Bugs.Jar, BEARS, ManySStuBs4J, TSSB-3M and MegaDiff. Code models mentioned include CodeBERT, GraphCodeBERT, CodeT5+ and GPT-C.
- The authors propose four future directions: faster repair, better patch quality, stronger generalization, and end-to-end repair pipelines.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

Fields: [Linguistics & languages](https://md.research.elamur.ai/free/shelves/linguistics/) · [Natural language processing](https://md.research.elamur.ai/free/shelves/nlp/)

## Cite

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@article{2025,
  title = {{基于大语言模型的自动代码修复综述}},
  author = {许鹏宇 and 况博裕 and 苏铓 and 付安民},
  journal = {计算机研究与发展 (Journal of Computer Research and Development)},
  year = {2025},
  doi = {10.7544/issn1000-1239.202440467},
  url = {https://doi.org/10.7544/issn1000-1239.202440467}
}
```

- [← previous 基于大语言模型的中文实体链接实证研究](https://md.research.elamur.ai/free/papers/xu-2025-empirical-study-chinese/)
- [next → 基于强化学习的古今汉语句子对齐研究](https://md.research.elamur.ai/free/papers/yu-2025-sentence-alignment-ancient/)
- [↑ back to papers of 2025](https://md.research.elamur.ai/free/papers/2025/page/3/)

## References

5 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Piscataway, NJ: IEEE, 2019: 102−113 [find](https://scholar.google.com/scholar?q=Piscataway%2C+NJ%3A+IEEE%2C+2019%3A+102%E2%88%92113)
2. ［29］ Liu Kui, Koyuncu A, Kim D, et al. TBar: Revisiting template-based automated program repair[C]//Proc of the 28th ACM Int Symp on Software Testing and Analysis. New York: ACM, 2019: 31−42 [find](https://scholar.google.com/scholar?q=%EF%BC%BB29%EF%BC%BD+Liu+Kui%2C+Koyuncu+A%2C+Kim+D%2C+et+al%2E+TBar%3A+Revisiting+template%2Dbased+automated+program+repair%5BC%5D%2F%2FProc+of+the+28th+ACM+Int+Symp+on+Software+Testing+and+Analysis%2E+New+York%3A+ACM%2C+2019%3A+31%E2%88%9242)
3. ［30］ Ghanbari A, Benton S, Zhang Lingming. Practical program repair via bytecode mutation[C]//Proc of the 28th ACM Int Symp on Software Testing and Analysis. New York: ACM, 2019: 19−30 [find](https://scholar.google.com/scholar?q=%EF%BC%BB30%EF%BC%BD+Ghanbari+A%2C+Benton+S%2C+Zhang+Lingming%2E+Practical+program+repair+via+bytecode+mutation%5BC%5D%2F%2FProc+of+the+28th+ACM+Int+Symp+on+Software+Testing+and+Analysis%2E+New+York%3A+ACM%2C+2019%3A+19%E2%88%9230)
4. ［31］ Afzal A, Motwani M, Stolee K T, et al. SOSRepair: Expressive semantic search for real-world program repair[J]. IEEE Transactions on Software Engineering, 2021, 47(10): 2162−2181 [find](https://scholar.google.com/scholar?q=%EF%BC%BB31%EF%BC%BD+Afzal+A%2C+Motwani+M%2C+Stolee+K+T%2C+et+al%2E+SOSRepair%3A+Expressive+semantic+search+for+real%2Dworld+program+repair%5BJ%5D%2E+IEEE+Transactions+on+Software+Engineering%2C+2021%2C+47%2810%29%3A+2162%E2%88%922181)
5. ［32］ Niu Cuicui, Pan Zhengzhi, Liu Hai. Framework and approaches of differentially private generative adversarial networks: A survey[J]. Journal of Guizhou Normal University: Natural Sciences, 2022, 40(4): [find](https://scholar.google.com/scholar?q=%EF%BC%BB32%EF%BC%BD+Niu+Cuicui%2C+Pan+Zhengzhi%2C+Liu+Hai%2E+Framework+and+approaches+of+differentially+private+generative+adversarial+networks%3A+A+survey%5BJ%5D%2E+Journal+of+Guizhou+Normal+University%3A+Natural+Sciences%2C+2022%2C+4)
