This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Spatial Complexity Metrics: An Investigation of Utility
March 2005 (vol. 31 no. 3)
pp. 203-212
Paul J. Layzell, IEEE Computer Society
Software comprehension is one of the largest costs in the software lifecycle. In an attempt to control the cost of comprehension, various complexity metrics have been proposed to characterize the difficulty of understanding a program and, thus, allow accurate estimation of the cost of a change. Such metrics are not always evaluated. This paper evaluates a group of metrics recently proposed to assess the "spatial complexity” of a program (spatial complexity is informally defined as the distance a maintainer must move within source code to build a mental model of that code). The evaluation takes the form of a large-scale empirical study of evolving source code drawn from a commercial organization. The results of this investigation show that most of the spatial complexity metrics evaluated offer no substantially better information about program complexity than the number of lines of code. However, one metric shows more promise and is thus deemed to be a candidate for further use and investigation.

[1] E.M. Altmann, “Near-Term Memory in Programming: A Simulation-Based Analysis,” Int'l J. Human-Computer Studies, vol. 54, no. 2, pp. 189-210, Feb. 2001.
[2] A.D. Baddeley, Essentials of Human Memory. Hove: Psychology Press, 1999.
[3] R. Banker, S. Datar, C. Kemerer, and D. Zweig, “Software Complexity and Maintenance Costs,” Comm. ACM, vol. 36, no. 11, pp. 81-94, Nov. 1993.
[4] B. Boehm, B. Clark, E. Horowitz, C. Westland, R. Madachy, and R. Selby, “Cost Models for Future Software Life Cycle Processes: COCOMO 2. 0,” Annals of Software Eng.: Special Volume on Software Process and Product Measurement, J.D. Arthur and S.M. Henry, eds., J.C. Baltzer AG, Science Publishers, vol. 1, pp. 45-60, 1995.
[5] J.K. Chhabra, K.K. Aggarwal, and Y. Singh, “Code and Data Spatial Complexity: Two Important Software Understandability Measures,” Information and Software Technology, vol. 45, no. 8, pp. 539-546, June 2003.
[6] S.G. Crawford, A.A. McIntosh, and D. Pregibon, “An Analysis of Static Metrics and Faults in C Software,” J. Systems and Software, vol. 5, no. 1, pp. 37-48, Feb. 1985.
[7] J.S. Davis and R.J. LeBlanc, “A Study of the Applicability of Complexity Measures,” IEEE Trans. Software Eng., vol. 14, no. 9, pp. 1366-1372, Sept. 1988.
[8] C.R. Douce, P.J. Layzell, and J. Buckley, “Spatial Measures of Software Complexity,” Proc. 11th Meeting of Psychology of Programming Interest Group, http://www.ppig.org/workshops11th-programme.html , 1999.
[9] N.E. Fenton and S.L. Pfleeger, Software Metrics, a Rigorous and Practical Approach, second ed. Boston, Mass.: PWS Publishing Company, 1997.
[10] P. Fiore, F. Lanubile, and G. Visaggio, “Effort Estimation for Program Comprehension,” Proc. Fourth IEEE Workshop Program Comprehension, pp. 78-87, 1996.
[11] N. Gorla, A.C. Benander, and B.A. Benander, “Debugging Effort Estimation Using Software Metrics,” IEEE Trans. Software Eng., vol. 16, no. 2, pp. 223-231, Feb. 1990.
[12] Grammatech, Inc., The Codesurfer Slicing System, http:/www.grammatech.com, 2002.
[13] M.H. Halstead, Elements of Software Science. Elsevier North Holland, 1977.
[14] R. Harrison, S.J. Counsell, and R.V. Nithi, “An Investigation into the Applicability and Validity of Object-Oriented Design Metrics,” Empirical Software Eng., vol. 3, no. 3, pp. 255-273, Sept. 1998.
[15] W. Harrison, “An Entropy-Based Measure of Software Complexity,” IEEE Trans. Software Eng., vol. 18, no. 11, pp. 1025-1029, Nov. 1992.
[16] J.H. Hayes, S.C. Patel, and L. Zhao, “A Metrics-Based Software Maintenance Effort Model,” Proc. Eighth IEEE European Conf. Software Maintenance and Reeng., pp. 254-258, 2004.
[17] IEEE, Standard Glossary of Software Engineering Terminology, IEEE Std. 610. 12-1990, 1990.
[18] M. Jorgensen, “Experience With the Accuracy of Software Maintenance Task Effort Prediction Models,” IEEE Trans. Software Eng., vol. 21, no. 8, pp. 674-681, Aug. 1995.
[19] T. Klemola, “Software Comprehension: Theory and Metrics,” masters' thesis, Dept. of Computer Science, Concordia Univ., Montreal, Canada, ftp://ftp.cs.concordia.ca/pub/grogono/klemola idmetric.pdf, 1998.
[20] T. Klemola and J. Rilling, “A Cognitive Complexity Metric Based on Category Learning,” Proc. Second Int'l Conf. Cognitive Informatics, pp. 106-112, 2003.
[21] M.M. Lehman and L.A. Belady, Program Evolution, Processes of Software Change. Academic Press, 1985.
[22] T. Mayer and T. Hall, “Measuring OO Systems: A Critical Analysis of the MOOD Metrics,” Proc. Conf. Technology of Object-Oriented Languages and Systems, pp. 108-117, 1999.
[23] T.J. McCabe, “A Complexity Measure,” IEEE Trans. Software Eng., vol. 2, no. 4, pp. 308-320, Dec. 1976.
[24] A. Mohan, N.E. Gold, and P.J. Layzell, “An Initial Approach to Assessing Program Comprehensibility Using Spatial Complexity, Number of Concepts and Typographical Style,” Proc. IEEE Working Conf. Reverse Eng., pp. 246-255, 2004.
[25] G.J. Myers, “An Extension to the Cyclomatic Measure of Program Complexity,” ACM SIGPLAN Notices, vol. 12, no. 10, pp. 61-64, Oct. 1977.
[26] M.P. O'Brien and J. Buckley, “Inference-Based and Expectation Based Processing in Program Comprehension,” Proc. Ninth IEEE Int'l Workshop Program Comprehension, pp. 71-78, 2001.
[27] M.P. O'Brien, J. Buckley, and T.M. Shaft, “Expectation-Based, Inference-Based, and Bottom-Up Software Comprehension,” J. Software Maintenance and Evolution: Research and Practice, vol. 16, pp. 427-447, Nov. 2004.
[28] M. Polo, M. Piattini, and F. Ruiz, “Using Code Metrics to Predict Maintenance of Legacy Programs: A Case Study,” Proc. IEEE Int'l Conf. Software Maintenance, pp. 202-208, 2001.
[29] V. Rajlich and N. Wilde, “The Role of Concepts in Program Comprehension,” Proc. 10th IEEE Int'l Workshop Program Comprehension, pp. 271-278, 2002.
[30] J. Rilling and T. Klemola, “Identifying Comprehension Bottlenecks Using Program Slicing and Cognitive Complexity Metrics,” Proc. 11th IEEE Int'l Workshop Program Comprehension, pp. 115-124, 2003.
[31] J. Rosenberg, “Some Misconceptions about Lines of Code,” Proc. Fourth Int'l Software Metrics Symp., pp. 137-142, 1997.
[32] J. Shao and Y. Wang, “A New Measure of Software Complexity Based on Cognitive Weights,” Proc. Canadian Conf. Electrical and Computer Eng., vol. 2, pp. 1333-1338, 2003.
[33] N.F. Schneidewind, “Software Quality Control and Prediction Model for Maintenance,” Annals of Software Eng., vol. 9, pp. 79-101, 2000.
[34] K.D. Welker, P.W. Oman, and G.G. Atkinson, “Development and Application of an Automated Source Code Maintainability Index,” J. Software Maintenance: Research and Practice, vol. 9, no. 3, pp. 127-159, May 1997.
[35] C. Wohlin, “Revisiting Measurement of Software Complexity,” Proc. IEEE Asia-Pacific Software Eng. Conf., pp. 35-43, 1996.
[36] M. Zhao, C. Wohlin, N. Ohlsson, and M. Xie, “A Comparison Between Software Design and Code Metrics for the Prediction of Software Fault Content,” Information and Software Technology, vol. 40, no. 14, pp. 801-809, Dec. 1998.

Index Terms:
Maintenance measurement, complexity measures, maintainability, software psychology.
Citation:
Nicolas E. Gold, Andrew M. Mohan, Paul J. Layzell, "Spatial Complexity Metrics: An Investigation of Utility," IEEE Transactions on Software Engineering, vol. 31, no. 3, pp. 203-212, March 2005, doi:10.1109/TSE.2005.39
Usage of this product signifies your acceptance of the Terms of Use.