90 likes | 215 Views
DocValidator: Automatic Evaluation of Source Code Documentation. Ben Hirsch and Jesse Heines Dept. of Computer Science Univ. of Massachusetts Lowell. St. Louis, Missouri, February 26, 2005. Basic Project Goals.
E N D
DocValidator:Automatic Evaluation of Source Code Documentation Ben Hirsch and Jesse Heines Dept. of Computer ScienceUniv. of Massachusetts Lowell St. Louis, Missouri, February 26, 2005
Basic Project Goals Assess Java source code documentation to evaluate whether it contains reasonable: • white space and indentation for readability • in-line comments explaining the purposes of discrete sections (blocks of about 5‑15 related lines) • ratio of lines and/or characters of comments to source code • author name, revision date, and other such info near the top of the code
Loftier Project Goals Further assess that documentation to evaluate whether it provides: • helpful summary documentation for all classes • comments beyond the trivial for all variables • explanations of the purpose, pre and post conditions, parameters, and return value for all methods (functions)
Visible Accomplishments • Web application up and running • Accepts file uploads • Does server-side analysis processing • Supplies results back to user in a reasonable format and with a reasonable user interface • Able to detect proximity of comments to the code they document • Able to detect presence of appropriate Javadoc comments
Invisible Accomplishments • Extensible architecture using Checkstyle • Burn, Oliver (2003). Checkstyle. • Generalized utility routines • FileUpload – Jakarta Commons Package • StreamGobbler – • Daconta, Michael C. (2000). When Runtime.exec() won’t. JavaWorld, Dec. 2000. • Beginning of an algorithmic approach to analyzing source code documentation • Initial investigation of ANTLR, the parser underlying Checkstyle
Reference Web Sites • http://www.docvalidator.org • http://checkstyle.sourceforge.net/ • http://www.antlr.org/ • http://jakarta.apache.org/commons/fileupload/ • http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html • http://teaching.cs.uml.edu/~heines • or just search for “Jesse Heines” with any search engine
Thank You Jesse M. Heines, Ed.D. Dept. of Computer Science Univ. of Massachusetts Lowell heines@cs.uml.edu http://teaching.cs.uml.edu/~heines