Bootstrapping Code-Text Pretrained Language Model to Detect Inconsistency Between Code and Comment

06/10/2023
by   Anh T. V. Dau, et al.
0

Comments on source code serve as critical documentation for enabling developers to understand the code's functionality and use it properly. However, it is challenging to ensure that comments accurately reflect the corresponding code, particularly as the software evolves over time. Although increasing interest has been taken in developing automated methods for identifying and fixing inconsistencies between code and comments, the existing methods have primarily relied on heuristic rules. In this paper, we propose DocChecker, a deep-learning-based tool to detect the inconsistency between code and comments. DocChecker is trained to detect noisy code-comment pairs and generate synthetic comments, enabling it to determine comments that do not match their associated code snippets and correct them. Its effectiveness is demonstrated on the Just-In-Time dataset compared with other state-of-the-art methods. This tool is available at https://github.com/FSoft-AI4Code/DocChecker and http://4.193.50.237:5000/; the demonstration video can be found on https://youtu.be/KFbyaSf2I3c.

READ FULL TEXT
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
10/15/2018

Generating Comments From Source Code with CCGs

Good comments help developers understand software faster and provide bet...
research
06/12/2018

Deep Learning to Detect Redundant Method Comments

Comments in software are critical for maintenance and reuse. But apart f...
research
02/26/2022

Automated Identification of Toxic Code Reviews: How Far Can We Go?

Toxic conversations during software development interactions may have se...
research
08/25/2023

DebtViz: A Tool for Identifying, Measuring, Visualizing, and Monitoring Self-Admitted Technical Debt

Technical debt, specifically Self-Admitted Technical Debt (SATD), remain...
research
02/25/2023

STACC: Code Comment Classification using SentenceTransformers

Code comments are a key resource for information about software artefact...
research
05/02/2022

HatCUP: Hybrid Analysis and Attention based Just-In-Time Comment Updating

When changing code, developers sometimes neglect updating the related co...

Please sign up or login with your details

Forgot password? Click here to reset