Leveraging Context-Aware Prompting for Commit Message Generation
Zhihua Jiang, Jianwei Chen, Dongning Rao, Guanghui Ye
摘要
Writing comprehensive commit messages is tedious yet important, because these messages describe changes of code, such as fixing bugs or adding new features. However, most existing methods focus on either only the changed lines or nearest context lines, without considering the effectiveness of selecting useful contexts. On the other hand, it is possible that introducing excessive contexts can lead to noise. To this end, we propose a code model COMMIT (Context-aware prOMpting based comMIt-message generaTion) in conjunction with a code dataset CODEC (COntext and metaData Enhanced Code dataset). Leveraging program slicing, CODEC consolidates code changes along with related contexts via property graph analysis. Further, utilizing CodeT5+ as the backbone model, we train COMMIT via context-aware prompt on CODEC. Experiments show that COMMIT can surpass all compared models including pre-trained language models for code (code-PLMs) such as Com-mitBART and large language models for code (code-LLMs) such as Code-LlaMa. Besides, we investigate several research questions (RQs), further verifying the effectiveness of our approach. We release the data and code at: https: //github.com/Jnunlplab/COMMIT.git .
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper5
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 被引用 1,224 次
- CodeT5+: Open Code Large Language Models for Code Understanding and GenerationYue Wang, Hung Le, Akhilesh Gotmare, Nghi D. Q. Bui 等EMNLP 2023 · 被引用 339 次
- What Makes a Good Commit Message?Yingchen Tian, Yuxia Zhang, Klaas-Jan Stol, Lin Jiang 等ICSE 2022 · 被引用 90 次
- FIRA: Fine-Grained Graph-Based Code Change Representation for Automated Commit Message GenerationJinhao Dong, Yiling Lou, Qihao Zhu, Zeyu Sun 等ICSE 2022 · 被引用 50 次
- UniXcoder: Unified Cross-Modal Pre-training for Code RepresentationDaya Guo, Shuai Lu, Nan Duan, Yanlin Wang 等ACL 2022
相关 Paper
- An Empirical Study on Commit Message Generation Using LLMs via In-Context LearningYifan Wu, Yunpeng Wang, Ying Li, Wei Tao 等ICSE 2025 · 被引用 1 次
- Only diff Is Not Enough: Generating Commit Messages Leveraging Reasoning and Action of Large Language ModelJiawei Li, David Faragó, Christian Petrov, Iftekhar AhmedFSE 2024 · 被引用 17 次
- Context Conquers Parameters: Outperforming Proprietary Llm in Commit Message GenerationAaron Imani, Iftekhar Ahmed, Mohammad MoshirpourICSE 2025 · 被引用 1 次
- From Commit Message Generation to History-Aware Commit Message CompletionAleksandra Eliseeva, Yaroslav Sokolov, Egor Bogomolov, Yaroslav Golubev 等ASE 2023 · 被引用 22 次
- COME: Commit Message Generation with Modification EmbeddingYichen He, Liran Wang, Kaiyi Wang, Yupeng Zhang 等ISSTA 2023 · 被引用 14 次
