arrow
返回

Multi-grained contextual code representation learning for commit message generation

delete2024-03-01
delete3
PRE
AI
C
Chuangwei Wang
L
Li Zhang
章晓芳 封面图
章晓芳 (Xiaofang Zhang) *
DOI:10.1016/j.infsof.2023.107393delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Commit messages, precisely describing the code changes for each commit in natural language, makes it possible for developers and succeeding reviewers to understand the code changes without digging into implementation details. However, the semantic and structural gap between code and natural language poses a significant challenge for commit message generation. Several researchers have proposed automated techniques to generate commit messages. Nevertheless, the information about the code is not sufficiently exploited. In this paper, we propose multi-grained contextual code representation learning for commit message generation (COMU). We extract multi-grained information from the changed code at the line and AST levels (i.e., Code_Diff and AST_Diff). In Code_Diff, we construct global contextual semantic information about the changed code, and mark whether a line of code has changed with three different tokens. In AST_Diff, we extract the code structure from source code changes and combine the extracted structure with four types of editing operations to explicitly focus on the detailed information of the changed part. In addition, we build the experimental datasets, since there is still no publicly sufficient dataset for this task. The release of this dataset would contribute to advancing research in this field. We perform an extensive experiment to evaluate the effectiveness of COMU. The experimental evaluation and human study show that our model outperforms the baseline model.
Keyword:
Code change
Code representation learning
Commit message generation
Pre-training

期刊

Information and Software Technology 封面图
Information and Software Technology
IF:
4.3
论文数:
3.8K
被引数:
7.7K

机构

S
soochow university - china
学者数:
5.2W
论文数: 3.6W
被引数: 82
引用论文

引用论文

CoreGen: Contextualized Code Representation Learning for Commit Message Generation
err2021-10-01
err25
errOAAI
errNie, Lun Yiu; Gao, Cuiyun; Zhong, Zhicong; Lam, Wai; Liu, Yang; Xu, Zenglin
err分享
err收藏
On the Naturalness of Software论软件的自然性
err2016-04-26
err164
PREAI
errHindle, Abram; Barr, Earl T.; Gabel, Mark; Su, Zhendong; Devanbu, Premkumar
err分享
err收藏
Seml: A Semantic LSTM Model for Software Defect Prediction
err2019-01-01
err65
errOAAI
errLiang, Hongliang; Yu, Yue; Jiang, Lin; Xie, Zhuosi
err分享
err收藏
err分享
err收藏
没有更多内容