paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CCT5: A Code-Change-Oriented Pre-trained Model

CCT5:一种面向代码变更的预训练模型
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 3/10 · 该论文属于代码智能/软件维护方向的预训练模型,关注代码变更与提交信息生成等任务,但未涉及静态分析、Agentic 程序、浮点程序分析、贝叶斯程序分析,也未研究 LLM/Agent 与静态分析或形式化验证的结合。引用 70 inbox
Bo Lin, Shangwen Wang, Zhongxin Liu, Yepang Liu, Xin Xia, Xiaoguang Mao
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出面向代码变更的预训练模型CCT5,利用大规模变更-提交数据和多任务预训练提升代码变更相关任务。

软件开发中代码变更任务(如生成变更意图描述、识别易缺陷变更)成本约占开发支出的70%。现有方法要么从零训练模型,难以利用海量无标注代码知识;要么微调已有预训练模型,但后者只编码单个代码片段而非代码变更。本文提出面向代码变更的预训练模型CCT5。作者收集150万+代码变更与提交信息配对数据,设计五种预训练任务注入变更领域知识,并在三个常见代码变更任务和两个代码评审任务上微调。结果表明,CCT5优于传统深度学习方法和已有预训练模型。

问题
如何自动支持代码变更相关任务,降低软件维护成本;现有从零训练受标注数据限制,已有预训练模型又难以建模代码变更。
方法
收集1.5M+变更-提交信息配对数据,设计五个预训练任务训练面向代码变更的模型CCT5,再在三个代码变更任务和两个代码评审任务上微调。
评估
在三个广泛研究的代码变更任务和两个代码评审特定任务上评估,CCT5超过传统深度学习和已有预训练模型。
原文摘要(Abstract)

Software is constantly changing, requiring developers to perform several derived tasks in a timely manner, such as writing a description for the intention of the code change, or identifying the defect-prone code changes. Considering that the cost of dealing with these tasks can account for a large proportion (typically around 70 percent) of the total development expenditure, automating such processes will significantly lighten the burdens of developers. To achieve such a target, existing approaches mainly rely on training deep learning models from scratch or fine-tuning existing pre-trained models on such tasks, both of which have weaknesses. Specifically, the former uses comparatively small-scale labelled data for training, making it difficult to learn and exploit the domain knowledge of programming language hidden in the large-amount unlabelled code in the wild; the latter is hard to fully leverage the learned knowledge of the pre-trained model, as existing pre-trained models are designed to encode a single code snippet rather than a code change (the difference between two code snippets). We propose to pre-train a model specially designed for code changes to better support developers in software maintenance. To this end, we first collect a large-scale dataset containing 1.5M+ pairwise data of code changes and commit messages. Based on these data, we curate five different tasks for pre-training, which equip the model with diverse domain knowledge about code changes. We fine-tune the pre-trained model, CCT5, on three widely-studied tasks incurred by code changes and two tasks specific to the code review process. Results show that CCT5 outperforms both conventional deep learning approaches and existing pre-trained models on these tasks.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2305-10785,
  title = {CCT5: A Code-Change-Oriented Pre-trained Model},
  author = {Bo Lin and Shangwen Wang and Zhongxin Liu and Yepang Liu and Xin Xia and Xiaoguang Mao},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616339}
}