Automated Commit Intelligence by Pre-training
Open Access
- 1 July 2024
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 33 (8)
Abstract
GitHub commits, which record the code changes with natural language messages for description, play a critical role in software developers’ comprehension of software evolution. Due to their importance in software development, several learning-based works are conducted for GitHub commits, such as commit message generation and security patch identification. However, most existing works focus on customizing specialized neural networks for different tasks. Inspired by the superiority of code pre-trained models, which has confirmed their effectiveness across different downstream tasks, to promote the development of open-source software community, we first collect a large-scale commit benchmark including over 7.99 million commits across 7 programming languages. Based on this benchmark, we present CommitBART, a pre-trained encoder-decoder Transformer model for GitHub commits. The model is pre-trained by three categories (i.e., denoising objectives, cross-modal generation, and contrastive learning) for six pre-training tasks to learn commit fragment representations. Our model is evaluated on one understanding task and three generation tasks for commits. The comprehensive experiments on these tasks demonstrate that CommitBART significantly outperforms previous pre-trained works for code. Further analysis also reveals that each pre-training task enhances the model performance.Keywords
This publication has 44 references indexed in Scilit:
- CodeEditor : Learning to Edit Source Code with Pre-trained ModelsACM Transactions on Software Engineering and Methodology, 2023
- ContraBERT: Enhancing Code Pre-trained Models via Contrastive Learning2023
- Revisiting Learning-based Commit Message Generation2023
- On Multi-Modal Learning of Editing Source Code2021
- What do pre-trained code models know about code?2021
- SPI: Automated Identification of Security Patches via CommitsACM Transactions on Software Engineering and Methodology, 2021
- Towards Automating Code Review Activities2021
- CODIT: Code Editing With Tree-Based Neural ModelsIEEE Transactions on Software Engineering, 2020
- Unsupervised Feature Learning via Non-parametric Instance Discrimination2018
- Automatically generating commit messages from diffs using neural machine translation2017