TL;DR
This paper presents a deep learning method to detect comment-code inconsistencies in real-time, helping maintain accurate documentation and reduce bugs caused by outdated comments.
Contribution
It introduces a novel deep-learning model that correlates code changes with comments to identify inconsistencies just-in-time, improving automatic comment maintenance systems.
Findings
Model outperforms multiple baselines significantly
Effective in detecting comment-code inconsistencies across various comment types
Enhances automatic comment update systems by integrating detection and resolution
Abstract
Natural language comments convey key aspects of source code such as implementation, usage, and pre- and post-conditions. Failure to update comments accordingly when the corresponding code is modified introduces inconsistencies, which is known to lead to confusion and software bugs. In this paper, we aim to detect whether a comment becomes inconsistent as a result of changes to the corresponding body of code, in order to catch potential inconsistencies just-in-time, i.e., before they are committed to a code base. To achieve this, we develop a deep-learning approach that learns to correlate a comment with code changes. By evaluating on a large corpus of comment/code pairs spanning various comment types, we show that our model outperforms multiple baselines by significant margins. For extrinsic evaluation, we show the usefulness of our approach by combining it with a comment update model…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
