TY - GEN
T1 - @tComment
T2 - 5th IEEE International Conference on Software Testing, Verification and Validation, ICST 2012
AU - Tan, Shin Hwei
AU - Marinov, Darko
AU - Tan, Lin
AU - Leavens, Gary T.
PY - 2012/6/21
Y1 - 2012/6/21
N2 - 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 read these comments to understand the API, e.g., reading a Javadoc comment for a method instead of reading the method body. 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 to introduce faults in their code. We present a novel approach, called @TCOMMENT, for testing Javadoc comments, specifically 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 29 inconsistencies between Javadoc comments and method bodies. We reported 16 of these inconsistencies, and 5 have already been confirmed and fixed by the developers.
AB - 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 read these comments to understand the API, e.g., reading a Javadoc comment for a method instead of reading the method body. 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 to introduce faults in their code. We present a novel approach, called @TCOMMENT, for testing Javadoc comments, specifically 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 29 inconsistencies between Javadoc comments and method bodies. We reported 16 of these inconsistencies, and 5 have already been confirmed and fixed by the developers.
KW - comment analysis
KW - random testing
KW - test generation
UR - http://www.scopus.com/inward/record.url?scp=84862315107&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84862315107&partnerID=8YFLogxK
U2 - 10.1109/ICST.2012.106
DO - 10.1109/ICST.2012.106
M3 - Conference contribution
AN - SCOPUS:84862315107
SN - 9780769546704
T3 - Proceedings - IEEE 5th International Conference on Software Testing, Verification and Validation, ICST 2012
SP - 260
EP - 269
BT - Proceedings - IEEE 5th International Conference on Software Testing, Verification and Validation, ICST 2012
Y2 - 17 April 2012 through 21 April 2012
ER -