arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.05020cs.SE
收藏

代码语言模型对自动程序修复的影响

Impact of Code Language Models on Automated Program Repair

Nan Jiang, Kevin Liu, Thibaud Lutellier, Lin Tan

AI总结:

本文首次系统评估并微调代码语言模型用于自动程序修复,发现微调可显著提升修复效果,并揭示了数据泄漏、缺陷行利用等问题。

摘要:

自动程序修复(APR)旨在通过为有缺陷的程序生成补丁,帮助开发者提高软件可靠性。尽管许多代码语言模型(CLM)已被开发出来,并在代码补全等许多软件任务中表现出有效性,但很少有全面、深入的工作来评估CLM的修复能力,并针对APR任务对CLM进行微调。首先,本工作首次在四个APR基准上评估了十个CLM,结果表明,令人惊讶的是,最好的CLM在未经调整的情况下,比最先进的基于深度学习(DL)的APR技术多修复了72%的缺陷。其次,本文中我们创建了四个APR基准之一,以避免数据泄漏,从而实现公平评估。第三,这是首次使用APR训练数据对CLM进行微调的工作,结果表明,微调为CLM带来了31%-1,267%的提升,并使它们能够比现有的基于DL的APR技术多修复46%-164%的缺陷。第四,本工作研究了缺陷行的影响,表明CLM在未经调整的情况下无法很好地利用缺陷行来修复缺陷,而经过微调的CLM可能会过度依赖缺陷行。最后,本工作分析了不同CLM的规模、时间和内存效率。本工作为APR领域展示了有前景的方向,例如使用APR特定设计对CLM进行微调,同时也提高了对CLM公平和全面评估的意识,并呼吁更透明地报告预训练数据中使用的开源仓库,以解决数据泄漏问题。

英文摘要:

Automated program repair (APR) aims to help developers improve software reliability by generating patches for buggy programs. Although many code language models (CLM) are developed and effective in many software tasks such as code completion, there has been little comprehensive, in-depth work to evaluate CLMs' fixing capabilities and to fine-tune CLMs for the APR task. Firstly, this work is the first to evaluate ten CLMs on four APR benchmarks, which shows that surprisingly, the best CLM, as is, fixes 72% more bugs than the state-of-the-art deep-learning (DL)-based APR techniques. Secondly, one of the four APR benchmarks was created by us in this paper to avoid data leaking for a fair evaluation. Thirdly, it is the first work to fine-tune CLMs with APR training data, which shows that fine-tuning brings 31%-1,267% improvement to CLMs and enables them to fix 46%-164% more bugs than existing DL-based APR techniques. Fourthly, this work studies the impact of buggy lines, showing that CLMs, as is, cannot make good use of the buggy lines to fix bugs, yet fine-tuned CLMs could potentially over-rely on buggy lines. Lastly, this work analyzes the size, time, and memory efficiency of different CLMs. This work shows promising directions for the APR domain, such as fine-tuning CLMs with APR-specific designs, and also raises awareness of fair and comprehensive evaluations of CLMs and calls for more transparent reporting of open-source repositories used in the pre-training data to address the data leaking problem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑