Revisiting the Plastic Surgery Hypothesis via Large Language Models
Not on the map. Why?
Abstract (arXiv)
Automated Program Repair (APR) aspires to automatically generate patches for an input buggy program. Traditional APR tools typically focus on specific bug types and fixes through the use of templates, heuristics, and formal specifications. However, these techniques are limited in terms of the bug types and patch variety they can produce. As such, researchers have designed various learning-based APR tools with recent work focused on directly using Large Language Models (LLMs) for APR. While LLM-based APR tools are able to achieve state-of-the-art performance on many repair datasets, the LLMs used for direct repair are not fully aware of the project-specific information such as unique variable or method names. The plastic surgery hypothesis is a well-known insight for APR, which states that the code ingredients to fix the bug usually already exist within the same project. Traditional APR tools have largely leveraged the plastic surgery hypothesis by designing manual or heuristic-based approaches to exploit such existing code ingredients. However, as recent APR research starts focusing on LLM-based approaches, the plastic surgery hypothesis has been largely ignored. In this paper, we ask the following question: How useful is the plastic surgery hypothesis in the era of LLMs? Interestingly, LLM-based APR presents a unique opportunity to fully automate the plastic surgery hypothesis via fine-tuning and prompting. To this end, we propose FitRepair, which combines the direct usage of LLMs with two domain-specific fine-tuning strategies and one prompting strategy for more powerful APR. Our experiments on the widely studied Defects4j 1.2 and 2.0 datasets show that FitRepair fixes 89 and 44 bugs (substantially outperforming the best-performing baseline by 15 and 8), respectively, demonstrating a promising future of the plastic surgery hypothesis in the era of LLMs.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 40 of its 93 references that are in the map. First posted on arXiv 18 Mar 2023.
Builds on
40 of 93 references.
References · 40
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
28 more
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2022Should You Mask 15% in Masked Language Modeling?cited by 117
- 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 108
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 85
- 2023Impact of Code Language Models on Automated Program Repaircited by 85
- 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
- 2019TBar: Revisiting Template-based Automated Program Repaircited by 64
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2021Neural Program Repair with Execution-based Backpropagationcited by 50
- 2023Conversational Automated Program Repaircited by 41
- 2022SelfAPR: Self-supervised Program Repair with Test Execution Diagnosticscited by 33
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
- 2018FixMiner: Mining Relevant Fix Patterns for Automated Program Repaircited by 22
- 2018AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violationscited by 22
- 2018Practical Program Repair via Bytecode Mutationcited by 19
- 2022Less is More: Summary of Long Instructions is Better for Program Synthesiscited by 17
- 2021Elixir: Effective object-oriented program repaircited by 16
- 2014Automatic Repair of Buggy If Conditions and Missing Preconditions with SMTcited by 7
- 2015Automatic Repair of Real Bugs: An Experience Report on the Defects4J Datasetcited by 2
Built on by
Citing papers per year: 2023: 3; 2024: 1; 2025: 3.
7 papers.
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
- 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repaircited by 50
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025Can Agents Fix Agent Issues?cited by 8
- 2023Challenging Bug Prediction and Repair Models with Synthetic Bugscited by 3
- 2025Evaluating the Generalizability of LLMs in Automated Program Repaircited by 3
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Can Agents Fix Agent Issues?27 May 2025
- 2025Evaluating the Generalizability of LLMs in Automated Program Repair12 Mar 2025
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repair25 Dec 2023
- 2023Challenging Bug Prediction and Repair Models with Synthetic Bugs3 Oct 2023
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair1 Sep 2023