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.
翻译:暂无翻译