Learning to Update Natural Language Comments Based on Code Changes

04/25/2020
by   Sheena Panthaplackel, et al.
0

We formulate the novel task of automatically updating an existing natural language comment based on changes in the body of code it accompanies. We propose an approach that learns to correlate changes across two distinct language representations, to generate a sequence of edits that are applied to the existing comment to reflect the source code modifications. We train and evaluate our model using a dataset that we collected from commit histories of open-source software projects, with each example consisting of a concurrent update to a method and its corresponding comment. We compare our approach against multiple baselines using both automatic metrics and human evaluation. Results reflect the challenge of this task and that our model outperforms baselines with respect to making edits.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/04/2020

Deep Just-In-Time Inconsistency Detection Between Comments and Source Code

Natural language comments convey key aspects of source code such as impl...
research
12/13/2019

Associating Natural Language Comment and Source Code Entities

Comments are an integral part of software development; they are natural ...
research
04/17/2017

A Neural Architecture for Generating Natural Language Descriptions from Source Code Changes

We propose a model to automatically describe changes introduced in the s...
research
08/14/2023

CupCleaner: A Data Cleaning Approach for Comment Updating

Recently, deep learning-based techniques have shown promising performanc...
research
12/17/2019

Analyzing Privacy Loss in Updates of Natural Language Models

To continuously improve quality and reflect changes in data, machine lea...
research
09/16/2019

Automatic Generation of Pull Request Descriptions

Enabled by the pull-based development model, developers can easily contr...
research
02/15/2020

Recommendation of Move Method Refactoring Using Path-Based Representation of Code

Software refactoring plays an important role in increasing code quality....

Please sign up or login with your details

Forgot password? Click here to reset