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

使用语言模型提取修复成分

Extracting Fix Ingredients using Language Models

Julian Aron Prenner, Romain Robbes

AI总结:

针对神经程序修复受限于输入窗口的问题,提出 ScanFix 方法利用扫描器模型提取标识符作为修复成分,实验表明该方法能提升 31% 的修复效果,但仍受限于模型上下文窗口规模。

摘要:

深度学习和语言模型正日益主导自动程序修复研究。虽然以前的生成与验证方法能够在文件甚至项目级别查找并使用修复成分,但神经语言模型仅限于其输入窗口所能容纳的代码。在本研究中,我们调查了标识符成分在神经程序修复中的重要性,并提出了 ScanFix,这是一种利用额外的扫描器模型从缺陷文件及潜在的项目级上下文中提取标识符的方法。我们发现,对远距离标识符缺乏了解是修复失败的重要原因。使用扫描器提取的标识符来增强修复模型的输入,可产生高达 31% 的相对改进。然而,ScanFix 的表现不如具有大输入窗口(> 5k tokens)的模型。当传入来自真实修复的成分时,改进幅度甚至更高。这表明,凭借精细的提取技术,成分扫描与修复候选排序类似,有可能成为未来自动修复系统的重要子任务。同时,这也表明该想法受制于 Sutton 的苦涩教训,并且可能会被具有不断扩大的上下文窗口的新代码模型所淘汰。

英文摘要:

Deep learning and language models are increasingly dominating automated program repair research. While previous generate-and-validate approaches were able to find and use fix ingredients on a file or even project level, neural language models are limited to the code that fits their input window. In this work we investigate how important identifier ingredients are in neural program repair and present ScanFix, an approach that leverages an additional scanner model to extract identifiers from a bug's file and potentially project-level context. We find that lack of knowledge of far-away identifiers is an important cause of failed repairs. Augmenting repair model input with scanner-extracted identifiers yields relative improvements of up to 31%. However, ScanFix is outperformed by a model with a large input window (> 5k tokens). When passing ingredients from the ground-truth fix, improvements are even higher. This shows that, with refined extraction techniques, ingredient scanning, similar to fix candidate ranking, could have the potential to become an important subtask of future automated repair systems. At the same time, it also demonstrates that this idea is subject to Sutton's bitter lesson and may be rendered unnecessary by new code models with ever-increasing context windows.

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

↑