Skip to main content
. 2024 Feb 29;10:e1838. doi: 10.7717/peerj-cs.1838

Table 2. List of static source code metrics (Ganesh, Palma & Olsson, 2022).

Metric Description
anonymousClassesQty Number of anonymous classes in a class.
anonymousClassesQty Number of anonymous classes in a class.
assignmentsQty Number of times of use of each variable inside each class.
CBO Coupling Between Objects. The number of dependencies in a class.
comparisonsQty Represent the class’s comparison operators.
defaultFieldsQty Number of default field types.
DIT Inheritance Tree Depth. Number of Parents in a class.
fieldQty Number of use of each local field inside each class
finalFieldsQty Number of fields of final types.
HasJavadoc If the source code has JavaDoc or not.
innerClassesQty Number of inner classes in a class.
lambdsQty Number of lambda expressions in a class.
LCC Loose Class Cohesion.
LCOM Lack of Cohesion of Methods
LOC Number of Lines of Code.
logStatementsQty Count of log statements in a class.
loopQty Number of loops in a class.
mathOperationsQty Represent the number of arithmetic symbols in a class.
maxNestedBlocksQty Max Nested Blocks.
Method Invocations Number of directly invoked methods
NoSI Number of Static Invocations.
numbersQty Number of numeric literals in a class.
paranthesizedExpsQty Number of parenthesized expressions in a class.
privateMethodsQty If a class is private.
protectedFieldsQty Number of fields of protected types.
protectedMethodsQty If a class is protected.
returnQty Number of return statements in a class.
RFC Response for a Class. The number of unique method invocations in a class.
stringLiteralsQty Number of string literals in a class.
synchronizedMethodsQty Number of synchronized methods in a class.
TCC Tight Class Cohesion.
totalFieldsQty Number of total fields.
totalMethodsQty Number of Methods.
tryCatchQty Number of the try and catch statements used in a class.
uniqueWordsQty Number of unique words in a class.
variablesQty Number of variables in a class.
visibleMethodsQty Number of Visible Methods.
WMC Weight Method Class.