Following code churn, we analyzed code complexity. That is, how does the complexity of a piece of code influence the ability to predict failures? Complexity can be quantified using several metrics, more suited toward object-oriented and non-object-oriented metrics ranging from the more traditional metrics such as fan-in and fan-out to the more recent CK metrics [Chidamber and Kemerer 1994]. The CK metric suite consists of six metrics (designed primarily as object-oriented design measures): weighted methods per class (WMC), coupling between objects (CBO), depth of inheritance (DIT), number of children (NOC), response for a class (RFC), and lack of cohesion among methods (LCOM). The typical object-oriented and non-object-oriented complexity metrics used at Microsoft based on prior published metrics (for example, [Chidamber and Kemerer 1994]) are:
Executable noncommented lines of code.
The Cyclomatic complexity metric [McCabe 1976] measures the number of linearly independent paths through a program unit.
Fan-in is the number of other functions calling a given function in a module.
Fan-out is the number of other functions being called from a given function in a module.
Number of methods in a class, including public, private, and protected methods.
Inheritance depth is the maximum depth of inheritance for a given class.
This signifies coupling to other classes through (a) class member variables, (b) function ...