microsoft / pict
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 288 units with 5,105 lines of code in units (61.5% of code).
    • 1 very complex units (259 lines of code)
    • 3 complex units (456 lines of code)
    • 26 medium complex units (1,649 lines of code)
    • 33 simple units (1,006 lines of code)
    • 225 very simple units (1,735 lines of code)
5% | 8% | 32% | 19% | 33%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cpp5% | 9% | 33% | 20% | 30%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
api13% | 0% | 28% | 22% | 35%
cli0% | 14% | 35% | 18% | 30%
api-usage0% | 0% | 0% | 0% | 100%
clidll0% | 0% | 0% | 0% | 100%
clidll-usage0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void Model::gcd()
in api/model.cpp
259 59 1
bool parseArg()
in cli/cmdline.cpp
189 32 2
145 30 1
122 26 2
57 25 1
88 22 1
94 22 1
116 21 0
44 21 1
72 19 0
int Parameter::PickValue()
in api/parameter.cpp
70 17 0
58 17 1
68 17 0
109 17 1
void CTerm::Print()
in cli/ccommon.cpp
67 16 0
75 16 2
50 15 0
59 14 1
64 14 0
115 14 1