Review Article

A Tool-Based Perspective on Software Code Maintainability Metrics: A Systematic Literature Review

Table 6

Metrics found in the selected set of primary studies, with the number of mentions and score higher or equal to 2.

Metric suiteMetricMentioned byTOTScore

Avg CC, average cyclomatic complexity[5, 54]22
CA, afferent coupling[5, 21]22
CC, McCabe’s cyclomatic complexity[14, 24, 51], S13, [6, 16, 32, 45, 48], [23, 29, 31, 35, 47]1412
CE, efferent coupling[5, 21, 25]33
CHANGE, number of lines changed in the class[5, 25, 26, 43]44
Chidamber and KemererCBO, coupling between objects[5, 14, 15, 21, 2527, 32, 44], [20, 23, 28, 29, 35, 36, 39, 47, 50]1816
Chidamber and KemererDIT, depth of inheritance tree[5, 14, 26, 43], S13, [20, 21, 27, 32], [23, 28, 29, 35, 39, 47]1513
Chidamber and KemererLCOM, lack of cohesion in methods[5, 14, 26, 43], S13, [20, 27, 28, 32], [23, 36, 39, 46, 47]1412
Chidamber and KemererNOC, number of children[5, 14, 26, 43], S13, [20, 27, 32, 39], [23, 29, 35, 47]1311
Chidamber and KemererRFC, response for class[5, 14, 15, 19, 21, 26, 27, 43, 44], [20, 23, 29, 32, 39, 46, 47, 50]1715
Chidamber and KemererWMC, weighted methods per class[5, 26, 43], S13, [16, 20, 21, 27, 32], [23, 29, 39, 47]1311
CLOC, comment lines of code[5, 24, 25], S13, [28, 35]66
Code-to-comment ratio[14, 15]22
CSA, class size (attributes)[5, 25]22
CSO, class size (operations)[5, 25]22
CSOA, class size (operations+attributes)[5, 25]22
DAM, data access metric (card metric)[21, 47]22
HalsteadHalstead bugs (B)[5, 14, 23, 25, 47, 48]64
HalsteadHalstead difficulty (D)[5, 14, 23, 25, 45, 47, 48, 51]86
HalsteadHalstead effort (E)[5, 14, 23, 25, 45, 47, 48, 51]86
HalsteadHalstead length (N)[5, 14, 2325, 45, 47, 48, 51]97
HalsteadHalstead vocabulary (n)[5, 14, 23, 25, 45, 47, 48, 51]86
HalsteadHalstead volume (V)[5, 14, 25, 51], S13, [6, 23, 45, 48], [47]108
JLOC, JavaDoc lines of code[5, 25, 28]33
LCOM2, lack of cohesion of methods[21, 29, 35]33
LCOM3, lack of cohesion of methods[21, 35]22
Li and Henry (L&H)DAC[39, 43]22
Li and Henry (L&H)MPC, message passing coupling[25, 39, 43, 46]44
LOC, lines of code[14, 15, 21, 2426, 44, 51], [6, 23, 31, 32, 35, 50]1511
MI, maintainability index[6, 14, 25, 30, 44, 51]64
MOA, measure of aggregation[21, 28]22
NOAC, number of operations added[5, 25]22
NOM, number of methods[26, 28, 31, 43]44
NPM, number of public methods[5, 21, 28, 29]44
Number of classes (including nested classes, interfaces, enums, and annotations)[31, 35]22
Number of commands[5, 25]22
Number of files[31, 33]22
Number of queries[5, 25]22
PDcy, number of package dependencies[5, 25]22
SM, structural measuresTCC, tight class cohesionS13, [35]22
STAT, number of statements[5, 25, 31, 35]44
WMC, McCabe’s weighted method count[14, 15, 25, 28, 36, 38, 50]77
WMCU, McCabe’s weighted method count-unweighted[15, 50]22