University of Illinois at Urbana-Champaign
@tComment: testing Javadoc comments to detect comment-code inconsistencies
Abstract
dc:descriptionCode 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.
Degree
thesis:*- Name thesis:degree_name
- M.S.
- Level thesis:degree_level
- Thesis
- Discipline thesis:degree_discipline
- Computer Science
- Grantor
- University of Illinois at Urbana-Champaign
- Year dc:date
- 2012
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Tan, Shin Hwei
- Contributors dc:contributor
-
- Marinov, Darko
- Tan, Lin
Subjects
dc:subject × 3Rights
dc:rights- Statement dc:rights
-
- Copyright 2012 Shin Hwei Tan
- Language dc:language
- en
Identifiers
dc:identifier.*- Handle dc:identifier
- http://hdl.handle.net/2142/31123
- OAI identifier oai:identifier
- oai:www.ideals.illinois.edu:2142/31123