SEAICLLGOct 4, 2020

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

arXiv:2010.01625v263 citations
Originality Incremental advance
AI Analysis

This addresses the issue of comment-code inconsistencies that can lead to confusion and software bugs for developers, though it is incremental as it builds on existing detection methods.

The paper tackles the problem of detecting inconsistencies between comments and source code changes just-in-time, before they are committed, and shows that their deep-learning model outperforms multiple baselines by significant margins.

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 to build a more comprehensive automatic comment maintenance system which can both detect and resolve inconsistent comments based on code changes.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes