@tComment: testing Javadoc comments to detect comment-code inconsistencies
Tan, Shin Hwei
Loading…
Permalink
https://hdl.handle.net/2142/31123
Description
Title
@tComment: testing Javadoc comments to detect comment-code inconsistencies
Author(s)
Tan, Shin Hwei
Issue Date
2012-05-22T00:29:33Z
Director of Research (if dissertation) or Advisor (if thesis)
Marinov, Darko
Tan, Lin
Department of Study
Computer Science
Discipline
Computer Science
Degree Granting Institution
University of Illinois at Urbana-Champaign
Degree Name
M.S.
Degree Level
Thesis
Keyword(s)
comment analysis
random testing
test generation
Abstract
Code comments are important artifacts in software. Javadoc comments are widely used in Java for API specifications. API developers write Javadoc comments, and API users often read these comments to understand the API they use, e.g., an API user can read a Javadoc comment for a method instead of reading the method body of the method. An inconsistency between the Javadoc comment and body for a method indicates either a fault in the body or, effectively, a fault in the comment that can mislead the method callers of the method to introduce faults in their code.
This thesis presents a novel approach, called @tComment, for testing Javadoc comments, specifically for testing method properties about null values and related exceptions. Our approach consists of two components. The first component takes as input source files for a Java project and automatically analyzes the English text in Javadoc comments to infer a set of likely properties for a method in the files. The second component generates random tests for these methods, checks the inferred properties, and reports inconsistencies. We evaluated @tComment on seven open-source projects and found 28 inconsistencies between Javadoc comments and method bodies. We reported all inconsistencies, and 12 have already been confirmed and fixed by the developers.
Use this login method if you
don't
have an
@illinois.edu
email address.
(Oops, I do have one)
IDEALS migrated to a new platform on June 23, 2022. If you created
your account prior to this date, you will have to reset your password
using the forgot-password link below.