paperbot · PL 论文追踪

全部论文 待读 收藏

P1 The Plastic Surgery Hypothesis in the Era of Large Language Models

大型语言模型时代的整形手术假设
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 5/10 · 论文将 LLM、检索与静态分析结合用于自动程序修复,属于 LLM 改进软件工程/程序分析应用的邻近方向,并包含静态分析作为提示信息;但其核心目标是 APR,而非用户重点关注的静态分析/形式化验证在 ML/Agentic 程序中的应用,也未涉及浮点或贝叶斯程序分析。引用 42 inbox
Chunqiu Steven Xia, Yifeng Ding, Lingming Zhang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 FitRepair,以微调和检索/静态分析提示将整形手术假设引入 LLM 自动程序修复。

自动程序修复旨在为缺陷程序自动生成补丁,但传统模板/启发式方法受限于缺陷类型与补丁多样性,近期基于大语言模型的方法虽性能领先,却未充分利用项目特有信息。本文重新审视“整形手术假设”,即修复缺陷所需的代码成分通常已存在于同一项目中,并提出 FitRepair。该方法将大语言模型与两种面向领域的微调策略及一种基于信息检索和静态分析的提示策略结合,从而自动、通用地利用项目内代码成分生成补丁。在 Defects4j 1.2 与 2.0 上,FitRepair 分别修复 89 与 44 个缺陷,较基线分别多修复 15 与 8 个,表明该假设在大语言模型时代仍具潜力。

问题
LLM 直接修复补丁时不了解项目特有的变量/方法名等信息,而传统 APR 所依赖的整形手术假设在 LLM 时代被忽视。
方法
FitRepair 结合直接使用 LLM、两种领域微调策略,以及基于信息检索与静态分析的提示策略,自动利用项目内已有代码成分。
评估
在 Defects4j 1.2 和 2.0 上评估,FitRepair 分别修复 89 和 44 个缺陷,较基线多 15 和 8 个。
原文摘要(Abstract)

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 (training on the buggy project) and prompting (directly providing valuable code ingredients as hints to the LLM). To this end, we propose FitRepair, which combines the direct usage of LLMs with two domain-specific fine-tuning strategies and one prompting strategy (via information retrieval and static analysis) for more powerful APR. While traditional APR techniques require intensive manual efforts in both generating patches based on the plastic surgery hypothesis and guaranteeing patch validity, our approach is fully automated and general. Moreover, while it is very challenging to manually design heuristics/patterns for effectively leveraging the hypothesis, due to the power of LLMs in code vectorization/understanding, even partial/imprecise project-specific information can still guide LLMs in generating correct patches! Our experiments on the widely studied Defects4j 1.2 and 2.0 datasets show that FitRepair fixes 89 and 44 bugs (substantially outperforming baseline techniques by 15 and 8), respectively, demonstrating a promising future of the plastic surgery hypothesis in the era of LLMs.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{XiaDZ23,
  title = {The Plastic Surgery Hypothesis in the Era of Large Language Models},
  author = {Chunqiu Steven Xia and Yifeng Ding and Lingming Zhang},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00047}
}