- Title
- RACE: Retrieval-Augmented Commit Message Generation
- Creator
- Shi, Ensheng; Wang, Yanlin; Tao, Wei; Du, Lun; Zhang, Hongyu; Han, Shi; Zhang, Dongmei; Sun, Hongbin
- Relation
- 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022 (Abu Dhabi, United Arab Emirates 7-11 December, 2022) p. 5520-5530
- Relation
- https://doi.org/10.18653/v1/2022.emnlp-main.372
- Publisher
- Association for Computational Linguistics
- Resource Type
- conference paper
- Date
- 2022
- Description
- Commit messages are important for software development and maintenance. Many neural network-based approaches have been proposed and shown promising results on automatic commit message generation. However, the generated commit messages could be repetitive or redundant. In this paper, we propose RACE, a new retrieval-augmented neural commit message generation method, which treats the retrieved similar commit as an exemplar and leverages it to generate an accurate commit message. As the retrieved commit message may not always accurately describe the content/intent of the current code diff, we also propose an exemplar guider, which learns the semantic similarity between the retrieved and current code diff and then guides the generation of commit message based on the similarity. We conduct extensive experiments on a large public dataset with five programming languages. Experimental results show that RACE can outperform all baselines. Furthermore, RACE can boost the performance of existing Seq2Seq models in commit message generation. Our data and source code are available at https://github.com/DeepSoftwareAnalytics/RACE.
- Subject
- software design; network based approach; data codes; generation method
- Identifier
- http://hdl.handle.net/1959.13/1500504
- Identifier
- uon:54947
- Language
- eng
- Reviewed
- Hits: 270
- Visitors: 270
- Downloads: 0