Is it useful to measure both Cyclomatic Complexity (CC) and Source Lines of Code (SLOC)? In previous work [1] we have analyzed the reported linear relationship between CC and SLOC. In our large corpus of Java projects, we could not find such a linear relationship. Raising questions for future work. Object Oriented Programming (OOP) could cause the lack of a linear relationship between CC and SLOC. In an OO language, dynamic dispatch and polymorphism are used as an alternative to control flow statements. However, related work [2], [3] reported linear relationships for both C++ and Java. As identified in our earlier work, there is an open question of the evolution of this relationship. Therefore we explorer a possible evolutionary argument: are the Java programs of today using more OOP? And does this cause the decreased power of SLOC to predict CC?
[1]
Nicholas A. Kraft,et al.
Cyclomatic Complexity and Lines of Code: Empirical Evidence of a Stable Linear Relationship
,
2009,
J. Softw. Eng. Appl..
[2]
Alexander Serebrenik,et al.
Empirical Analysis of the Relationship between CC and SLOC in a Large Corpus of Java Methods
,
2014,
2014 IEEE International Conference on Software Maintenance and Evolution.
[3]
Khaled El Emam,et al.
The Confounding Effect of Class Size on the Validity of Object-Oriented Metrics
,
2001,
IEEE Trans. Software Eng..
[4]
T. Breurch,et al.
A simple test for heteroscedasticity and random coefficient variation (econometrica vol 47
,
1979
.