100 likes | 234 Views
ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Case Studies Instructor Paulo Alencar. Overview. Metrics related to maintainability of software systems Evaluation of the effect of design and coding factors on software system maintainability
E N D
ECE 453 – CS 447 – SE 465 Software Testing & Quality AssuranceCase StudiesInstructorPaulo Alencar
Overview • Metrics related to maintainability of software systems • Evaluation of the effect of design and coding factors on software system maintainability • Experimental analysis that uses a suite of twenty measures to obtain indications of their effect on maintainability • Investigation involved a large number of systems in a single study (50 systems) • Misra, S., Modeling Design/Coding Factors that Drive Maintainability of Software Systems, Software Quality Journal, vol. 13, pp. 297-320, Springer, 2005.
Main Results • A pool of 50 software systems written in C++ was evaluated in this experimental case study
Main Results • A pool of 50 software systems written in C++ was evaluated in this experimental case study (cont.)
Main Results • Metrics used in the case:
Main Results • Metrics used in the case:
Main Results • Metrics used in the case:
Main Results • The effort needed for maintaining software: • MI = 171 – 5.2ln(Avg V) – 0.23 avg V(G’) – 16.2 ln (avgLOC) + 50 sin(sqrt(2.4 perCM)) • where • avgV = Halstead’s volume per module • avg V(G’) = average cyclomatic complexity • avgLOC = average lines of code • perCM = average percent of lines of comments per module
Main Results • The final best model can be presented as follows: • MI = 123.344 (1/AMLOC) + 1.944 ln(N) + • 2.166 (1/CDENS) – 5.692 (1/DIT) – • 17.707 exp(MHF) + 89.426 • where • AMLOC = average method size (lines per method) • N = program length (Halstead’s # of operators and operands) • CDENS = control density (% control statements) • DIT = depth of inheritance tree (position of class in tree) • MHF = method inheritance factor (#inherited methods that a class has inherited from super-classes / total # of inherited methods)
Main Results • Correlation analysis show that there is a strong log-dependence of MI on SLOC • Variables such as AMLOC, CDENS, MHF, SLOC are relatively strongly influential on MI • AMLOC had the most influential factor on MI; a function should not be more than two screens long and “spaghetti code” should be avoided • The average method size (AMLOC) will influence almost 60% of the final maintainability of the code