COMTOR logo
COMTOR Features

COMTOR generates a report based on a user's submitted source code. Ecah report is the output of an analysis module, tailored to specifically target a certain type of analysis. The modules have been designed to be pluggable and thus can be turned on an off quite easily from the COMTOR interface by an instructor or student (if permitted). Listed below are the current modules along with a short description of their purpose.

Check For Tags

This module verifies that the @return, @param, and @throws tags are used appropriately in method comments.

Percentage Methods

Calculates the average word length in comments which immediately precede method definitions. The rationale behind this module is that if little to nothing is being said in the comments, the words may be short and provide little description to the method's functionality.

Comment Average Ratio

Determines the length (in number of words) of each method's comments as well as the average length of method comments for each class.

Method Interactions

This method outputs which user-defined methods are called from other user-defined methods. Can be used to suggest that such method interactions should be commented as part of a method.

Spell Checker

Checks the correctness of word spelling in comments. This module attempts to take into account user-defined keywords such as class, method, and variable names, so that mentions of these words within the body of a comment are not tagged as incorrectly spelled words. (Note: There may be some words that are spelled correctly, marked incorrect because they are not present in the dictionary.)

Pre- and Post- Conditions (coming soon!)

Students can specify both pre- and post- method conditions by using custom @pre and @post tags. Both tag styles support comments in plain text, or expressions. In the latter case, expressions are analyzed only for valid form (correctness can only be detected a run-time, and COMTOR does not execute the submitted code.

Flesch-Kincaid Reading Level (coming soon!)

Calculates the US educational grade level of the comments in each class. The Flesch-Kincaid algorithm works best with a corpus of at least 200 words, thus we combine all comments for each class in this analysis. (For more information on this algorithm, see the Wikipedia article External link.)

TCNJ Logo SourceForge.net Logo