RACE: Retrieval-Augmented Commit Message Generation

Ensheng Shi, Yanlin Wang, Wei Tao, Lun Du, Hongyu Zhang +3 more
3/5/2022
78 citations
cs.SEcs.AIcs.LG
rag

Official code: DeepSoftwareAnalytics/RACE (19 stars, Python, last commit 2022-10-21).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

Replication package for EMNLP2022 paper- RACE: Retrieval-Augmented Commit Message Generation

195Python, ShellOct 12, 20224 years ago

Similar Papers

Cite this paper

@article{shi2022race,
  title  = {RACE: Retrieval-Augmented Commit Message Generation},
  author = {Ensheng Shi and Yanlin Wang and Wei Tao and Lun Du and Hongyu Zhang and Shi Han and Dongmei Zhang and Hongbin Sun},
  year   = {2022},
  eprint = {2203.02700},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.02700}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.02700.svg)](https://codeofpaper.com/paper/2203.02700)

Discussion