ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Ranking

12/06/2019
by   Shangqing Liu, et al.
0

Commit messages record code changes (e.g., feature modifications and bug repairs) in natural language, and are useful for program comprehension. Due to the frequent updates of software and time cost, developers are generally unmotivated to write commit messages for code changes. Therefore, automating the message writing process is necessitated. Previous studies on commit message generation have been benefited from generation models or retrieval models, but code structure of changed code, which can be important for capturing code semantics, has not been explicitly involved. Moreover, although generation models have the advantages of synthesizing commit messages for new code changes, they are not easy to bridge the semantic gap between code and natural languages which could be mitigated by retrieval models. In this paper, we propose a novel commit message generation model, named ATOM, which explicitly incorporates abstract syntax tree for representing code changes and integrates both retrieved and generated messages through hybrid ranking. Specifically, the hybrid ranking module can prioritize the most accurate message from both retrieved and generated messages regarding one code change. We evaluate the proposed model ATOM on our dataset crawled from 56 popular Java repositories. Experimental results demonstrate that ATOM increases the state-of-the-art models by 30.72 evaluate text generation systems). Qualitative analysis also demonstrates the effectiveness of ATOM in generating accurate code commit messages.

READ FULL TEXT
research
03/05/2022

ECMG: Exemplar-based Commit Message Generation

Commit messages concisely describe the content of code diffs (i.e., code...
research
07/14/2020

Contextualized Code Representation Learning for Commit Message Generation

Automatic generation of high-quality commit messages for code commits ca...
research
07/31/2023

Delving into Commit-Issue Correlation to Enhance Commit Message Generation Models

Commit message generation (CMG) is a challenging task in automated softw...
research
06/26/2023

Context-Encoded Code Change Representation for Automated Commit Message Generation

Changes in source code are an inevitable part of software development. T...
research
06/21/2021

An empirical evaluation of the usefulness of Tree Kernels for Commit-time Defect Detection in large software systems

Defect detection at commit check-in time prevents the introduction of de...
research
07/12/2021

On the Evaluation of Commit Message Generation Models: An Experimental Study

Commit messages are natural language descriptions of code changes, which...
research
08/22/2022

Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generation

Code generation focuses on the automatic conversion of natural language ...

Please sign up or login with your details

Forgot password? Click here to reset