Javier Gonzalez-Sanchez | CSE460 | Fall 2020 | 3 jgs Size Metrics § LOC – Lines of Code Metric. All lines that are not comments. Including lines of a single brace or parenthesis. § eLOC (effective Lines of Code) Metric. All lines that are not comments, blanks or standalone braces or parenthesis. § lLOC (logical Lines of Code) Metric. These statements are terminated with a semi- colon. The control line for the "for" loop contain two semi-colons but accounts for only one semi colon.
Javier Gonzalez-Sanchez | CSE460 | Fall 2020 | 5 jgs Function Metrics Cyclomatic Complexity = Conditional_Nodes + 1 // CC = 3 + 1 = 4 (Condition nodes are 1,2 and 3 nodes) i = 0; n=4; while (ij = i + 1; while (jif (A[i]swap(A[i], A[j]); } i=i+1; }
Javier Gonzalez-Sanchez | CSE460 | Fall 2020 | 17 jgs Distance § Distance: how far a package is away from the Main Sequence § D = A + I – 1 § Values -1 to 1 § Absolute Distance |D|
Javier Gonzalez-Sanchez | CSE460 | Fall 2020 | 19 jgs Stable Dependency Principle (SDP) § Every dependency between modules should terminate on a module whose Instability is less than or equal to the depending module's Instability. § Every dependency between modules should terminate on a module whose Abstractness is greater than or equal to the depending module's Abstractness.
jgs CSE 460 Software Analysis and Design Javier Gonzalez-Sanchez [email protected] Fall 2020 Disclaimer. These slides can only be used as study material for the class CSE460 at ASU. They cannot be distributed or used for another purpose.