Automatically detecting the up-to-date status of TODO comments in Java programs
Abstract
Easing program comprehension facilitates software maintenance, which consumes a disproportionate amount of resources within software development. Studies have shown that good comments can help in program comprehension. Among the different varieties of comments, TODO comments are used by developers to denote pending tasks. A developer may perform the task mentioned in the TODO comment but may forget to remove it, leading to obsolete comments. Such obsolete comments can hinder comprehension. Detecting such obsolete comments manually is tedious and errorprone. Thus, we need a tool to automatically check the status of TODO comments. We present a novel technique to automatically detect the status of a TODO comment. Given a method with a TODO comment, our TODO comment status checker uses information retrieval, linguistics and semantics to check if the comment is up to date. According to experienced programmers who judged our status checker, we achieve good accuracy, precision and recall.