From: Classification feature sets for source code plagiarism detection in Java
Structural count | Description |
---|---|
Number of classes | Total number of classes, including the nested |
Number of interfaces | Total number of interfaces, including the nested |
Number of subclasses | Total number of derived classes |
Number of functions | Total number of function definitions |
Number of loops | Total number of loops: for, while, do-while, or for-each |
Number of conditionals | Total number of conditional statements: |
if statements, switch cases, or ternary operators | |
Number of function calls | Total number of function calls |
“C1.add(C2).add(C3);” increments this count by 2. | |
Number of class fields | Total number of class fields |
“float X = 0, Y;” increments this count by 2. | |
Number of variable declarations | Total number of variable declarations |
Note: Class fields are excluded from this count. | |
Number of assignment statements | Total number of assignment statements |
Note: The assignments in declaration lines are included. | |
Number of comments | Total number of comments |
Number of string literals | Total number of string literals |
“System.out.println(“out”);” also increments it by 1. |