Automated program repair using neural models has shown promising results on benchmark datasets, yet practical deployment remains limited. In this study, we examine whether a small transformer model can meaningfully repair real-world Java bugs and whether syntactic correctness is a reliable proxy for semantic correctness. We fine-tune CodeT5-small (60.5M parameters) on 52,364 Java bug-fix pairs from CodeXGLUE and evaluate both token-level performance and syntactic validity using AST parsing. While the model converges cleanly and achieves high grammatical correctness, producing syntactically valid Java code in approximately ninety-four percent of cases, it fails to generate correct repairs under exact-match evaluation, achieving zero exact matches. In approximately eighty percent of cases, the model reproduces the buggy input verbatim.


翻译:基于神经模型的自动化程序修复在基准数据集上已展现出有希望的结果,但实际部署仍有限。在本研究中,我们探究小型Transformer模型能否有效修复现实世界中的Java程序错误,以及语法正确性是否可作为语义正确性的可靠代理指标。我们在CodeXGLUE数据集的52,364个Java错误修复对上对CodeT5-small(6050万参数)进行微调,并使用抽象语法树解析同时评估词元级性能和语法有效性。尽管模型能够稳定收敛并实现较高的语法正确率——约94%的情况下能生成语法有效的Java代码——但在精确匹配评估中未能生成正确的修复结果,精确匹配率为零。约80%的情况下,模型会逐字复现错误的输入代码。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
RAG与RAU:自然语言处理中的检索增强语言模型综述
专知会员服务
88+阅读 · 2024年5月3日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
【NAACL2021】信息解缠正则化持续学习的文本分类
专知会员服务
22+阅读 · 2021年4月11日
【NeurIPS2020】可处理的反事实推理的深度结构因果模型
专知会员服务
49+阅读 · 2020年9月28日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
CosFace: Large Margin Cosine Loss for Deep Face Recognition论文笔记
统计学习与视觉计算组
44+阅读 · 2018年4月25日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
相关VIP内容
RAG与RAU:自然语言处理中的检索增强语言模型综述
专知会员服务
88+阅读 · 2024年5月3日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
【NAACL2021】信息解缠正则化持续学习的文本分类
专知会员服务
22+阅读 · 2021年4月11日
【NeurIPS2020】可处理的反事实推理的深度结构因果模型
专知会员服务
49+阅读 · 2020年9月28日
相关基金
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员