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

CoRR(2023)

引用 0|浏览28
暂无评分
摘要
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.
更多
查看译文
关键词
language model,comment,code-text
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要