Review Article

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

Table 5

Metric studies (complete).

Metric suiteMetricPapers using itTOTScore

Aggregate stability[53]11
AODE, aggregating one dependence estimators[24]11
Aspect-based metricsDCP, degree of crosscutting per pointcut[23]11
Aspect-based metricsNAA, number of advices per aspect[23]11
Aspect-based metricsNumber of aspects[23]11
Aspect-based metricsNPA, number of pointcuts per aspect[23]11
Aspect-based metricsRAD, response for advice[23]11
Avg CC, average cyclomatic complexity[5, 54]22
Avg. LOC per method[54]11
Bandwidth[24]11
Base classes (IFANIN)[35]11
Branching complexity (Sneed Metric)[35]11
Branch stability[53]11
Bug patterns[14]11
CA, afferent coupling[5, 21]22
CAM, cohesion among methods of a class[21]11
CBM, coupling between methods[21]11
CC, McCabe’s cyclomatic complexity[14, 24, 44, 51], [6, 16, 32, 44, 48], [23, 29, 31, 35, 47]1412
CE, efferent coupling[5, 21, 25]33
CHANGE, number changed in the class[5, 25, 26, 43]44
CHC, class coupling complexity[46]11
Chidamber and KemererCBO, coupling between objects[5, 14, 15, 25, 26], [21, 27, 32, 44], [20, 28, 36, 39], [23, 29, 35, 47, 50]1816
Chidamber and KemererDIT, depth of inheritance tree[5, 14, 26, 43, 44], [20, 21, 27, 32], [23, 28, 29, 39], [35, 47]1513
Chidamber and KemererLCOM, lack of cohesion in methods[5, 14, 26, 43, 44], [20, 27, 28, 32], [23, 36, 39, 46, 47]1412
Chidamber and KemererNOC, number of children[5, 14, 26, 43, 44], [20, 27, 32, 39], [23, 29, 35, 47]1311
Chidamber and KemererRFC, response for class[5, 15, 19, 26, 43], [14, 21, 27, 44], [20, 29, 32, 39], [23, 46, 47, 50]1715
Chidamber and KemererWMC, weighted methods per class[5, 21, 26, 43, 44], [16, 20, 27, 32], [23, 29, 39, 47]1311
CI, clone instances[19]11
CLOC, comment lines of code[5, 24, 25, 28, 44], [35]66
Clone coverage[14]11
Cocol’s metric[48]11
Code smellsFeature Envy (# per KLOC of code)[44]11
Code smellsGod Class (# per KLOC of code)[44]11
Code-to-comment ratio[14, 15]22
Complexity average by class[31]11
Complexity average by file[31]11
Complexity average by function[31]11
CONS, number of constructors[5, 25]31
Coupling and cohesion[14]11
Coupling dispersion[35]11
Coupling intensity[35]11
CPC, class coupling complexity[46]11
CSA, class size (attributes)[5, 25]22
CSO, class size (operations)[5, 25]22
CSOA, class size (operations + attributes)[5, 25]22
Cyclic, number of cyclic dependencies[25]11
Cyclomatic complexity in classes[31]11
Cyclomatic complexity in functions[31]11
DAM, data access metric (Card Metric)[21, 47]22
Data complexity (Chapin Metric)[35]11
Dataflow[14]11
Dcy, number of dependencies[5]11
Dcy, number of transitive dependencies[5]11
Decisional complexity (McClure)[35]11
Divergent change[34]11
Dominator tree metrics[20]11
Dpt, number of dependents[5]11
Dynamic metricsDCBO, dynamic coupling between objects[9]11
Dynamic metricsMTBF, mean time between failure[9]11
Dynamic metricsMTTF, the mean time to failure[9]11
ECC, external class complexity (CIC + ICP)[46]11
Essential complexity[35]11
Fan-in[35]11
Fan-out[35]11
HalsteadHalstead bugs (B)[5, 14, 23, 25, 48], [47]64
HalsteadHalstead difficulty (D)[5, 14, 25, 44, 51], [23, 47, 48]86
HalsteadHalstead effort (E)[5, 14, 25, 44, 51], [23, 47, 48]86
HalsteadHalstead length (N)[5, 14, 24, 25, 51], [23, 44, 47, 48]97
HalsteadHalstead vocabulary (n)[5, 14, 25, 44, 51], [23, 47, 48]86
HalsteadHalstead volume (V)[5, 14, 25, 44, 51], [6, 23, 44, 47, 48]108
History sensitive metricspLOC[40]11
History sensitive metricsrdocLOC[40]11
History sensitive metricsrniLOC[40]11
History sensitive metricsrpdLOC[40]11
History sensitive metricsrpiLOC[40]11
History sensitive metricsTL[40]11
I, instability[28]11
IC, inheritance coupling[21]11
ICC, internal class complexity (CAC + CMC)[46]11
Indentation as proxy for complexity metric[44]11
Inner, number of inner classes[5]11
Jensen’s Nf[24]11
JLOC, JavaDoc lines of code[5, 25, 28]33
Kaur’s metric[25]11
LCOM2, lack of cohesion in methods[21, 29, 35]33
LCOM3, lack of cohesion of methods[21, 35]22
Level, level order[5]11
Level, level order[5]11
Li and Henry (L&H)DAC[39, 43]22
Li and Henry (L&H)DIT, depth of inheritance tree[25]11
Li and Henry (L&H)LCOM, lack of cohesion in methods[25]11
Li and Henry (L&H)MPC, message passing coupling[25, 39, 43, 46]44
Li and Henry (L&H)NOC, number of children[25]11
Li and Henry (L&H)NOM[39]11
Li and Henry (L&H)RFC, response for a class[25]11
Li and Henry (L&H)SIZE2[39]11
Li and Henry (L&H)SLOC, source lines of code[25]11
Li and Henry (L&H)WMC, weighted method per class[25]11
LOC, lines of code[15, 2426], [14, 44, 51], [6, 21, 23, 31, 32], [35, 50]1511
Logic[14]11
MC, method coupling[46]11
MFA, measure of functional abstraction[21]11
MI, maintainability index[6, 14, 25, 44, 51], [30]64
Misra’s metricsAAC, average attributes per class[27]11
Misra’s metricsAC, attribute complexity[27]11
Misra’s metricsACC, average class complexity[27]11
Misra’s metricsACF, average coupling factor[27]11
Misra’s metricsAMC, average method complexity[27]11
Misra’s metricsAMCC, average method complexity per class[27]11
Misra’s metricsCLC, class complexity[27]11
Misra’s metricsCC, code complexity[27]11
Misra’s metricsCWC, coupling weight for a class[27]11
Misra’s metricsMC, method complexity[27]11
Misra’s metricsOMMIC, coupling[44]11
MOA, measure of aggregation[21, 28]22
Mood’s metricsAHF, attribute hiding factor[23]11
Mood’s metricsAIF, attribute inheritance factor[23]11
Mood’s metricsCF, coupling factor[23]11
Mood’s metricsMHF, method hiding factor[23]11
Mood’s metricsMIF, method inheritance factor[23]11
Mood’s metricsPF, polymorphism factor[23]11
NAA, number of attributes added[25]11
Narsimhan’s metricsAID, average interaction density[23]11
Narsimhan’s metricsIID, incoming interaction density[23]11
Narsimhan’s metricsOID, outgoing interaction density[23]11
Nesting depth[14]11
Nesting (Max Nest)[35]11
NIM, instance methods[35]11
NIV, instance variables[35]11
NOAC, number of operations added[5, 25]22
NOI, number of outgoing invocations[19]11
NOOC, number of operations overridden[5]11
NOM, number of methods[26, 28, 31, 43]44
Noncommenting lines of code (lines only containing space, tab, and CR are ignored)[31]11
Noncommenting lines of new code[31]11
NOP, number of polymorphic methods[28]11
NOPA, number of public attributes[35]11
NPATH[32]11
NPM, number of public methods[5, 21, 28, 29]44
Number of attributes added[5]11
Number of code characters[24]11
Number of classes (including nested classes, interfaces, enums, and annotations)[31, 35]22
Number of commands[5, 25]22
Number of comment characters[24]11
Number of directories[31]11
Number of files[31, 33]22
Number of God Classes[34]11
Number of queries[5, 25]22
Ocmax, maximum operation complexity[25]11
OSmax, maximum operation size[25]11
Override ratio[35]11
Paths[35]11
PDcy, number of package dependencies[5, 25]22
RAM, RAM + CPU memory usage[48]11
RCI, ratio of cohesion interactions[46]11
Shotgun Surgery[34]11
SM, structural measuresOMMIC, coupling[44]11
SM, structural MeasuresTCC, tight class cohesion[35, 44]22
SM, structural MeasuresWMC1, size of classes[44]11
Structure stability[53]11
Spatial complexity metrics[49]11
STAT, number of statements[5, 25, 31, 35]44
TCLOC, total comment lines of code[19]11
Test results and coverage[14]11
TLLOC, total logical lines of code[19]11
TNOS, total number of statements[19]11
Token count[23]11
Total number of characters[24]11
Version distance[53]11
Version stability[53]11
Vytovtov’s metric[48]11
Welker and Oman[25]11
WMC, McCabe’s weighted method count[14, 15, 25, 38], [28, 36, 50]77
WMCU, McCabe’s weighted method count-unweighted[15, 50]22
WOC, weight of classes[35]11