CommitBERT: Commit Message Generation Using Pre-Trained Programming Language Model

Tae-Hwan Jung
5/29/2021
cs.CL

Official code: graykode/commit-autosuggestions (387 stars, Python, last commit 2023-08-08).

Abstract

Commit message is a document that summarizes source code changes in natural language. A good commit message clearly shows the source code changes, so this enhances collaboration between developers.

Show full abstract

Therefore, our work is to develop a model that automatically writes the commit message. To this end, we release 345K datasets consisting of code modification and commit messages in six programming languages (Python, PHP, Go, Java, JavaScript, and Ruby). Similar to the neural machine translation (NMT) model, using our dataset, we feed the code modification to the encoder input and the commit message to the decoder input and measure the result of the generated commit message with BLEU-4. Also, we propose the following two training methods to improve the result of generating the commit message: (1) A method of preprocessing the input to feed the code modification to the encoder input. (2) A method that uses an initial weight suitable for the code domain to reduce the gap in contextual representation between programming language (PL) and natural language (NL). Training code, dataset, and pre-trained weights are available at https://github.com/graykode/commit-autosuggestions

View on arXivView PDF

Code Implementations(1)

A tool that AI automatically recommends commit messages.

38716Python, Jupyter NotebookAug 26, 20203 years agoNOASSERTION
bertcommit-autosuggestionsnatural-languagenlptext-generation

Similar Papers

Cite this paper

@article{jung2021commitbert,
  title  = {CommitBERT: Commit Message Generation Using Pre-Trained Programming Language Model},
  author = {Tae-Hwan Jung},
  year   = {2021},
  eprint = {2105.14242},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.14242}
}

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/2105.14242.svg)](https://codeofpaper.com/paper/2105.14242)

Discussion