microsoft / omi
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 4,631 units with 109,254 lines of code in units (57.9% of code).
    • 30 very complex units (8,828 lines of code)
    • 101 complex units (15,282 lines of code)
    • 316 medium complex units (23,396 lines of code)
    • 508 simple units (19,777 lines of code)
    • 3,676 very simple units (41,971 lines of code)
8% | 13% | 21% | 18% | 38%
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
c9% | 16% | 25% | 18% | 29%
cpp5% | 13% | 19% | 27% | 34%
inc97% | 0% | 0% | 2% | 0%
h0% | 0% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Unix/wsman25% | 14% | 23% | 14% | 21%
Unix/codec17% | 16% | 23% | 18% | 23%
Unix/mof34% | 8% | 13% | 18% | 25%
Unix/base5% | 11% | 17% | 15% | 49%
Unix/micxx19% | 16% | 3% | 0% | 60%
Unix/wql41% | 10% | 26% | 5% | 16%
Unix/http7% | 29% | 31% | 11% | 20%
Unix/scriptext33% | 42% | 0% | 3% | 20%
Unix/cli14% | 20% | 28% | 23% | 12%
Unix/server17% | 20% | 22% | 26% | 12%
Unix/nits5% | 2% | 17% | 24% | 49%
Unix/miapi0% | 22% | 27% | 26% | 24%
Unix/xmlserializer0% | 36% | 34% | 14% | 14%
Unix/gen0% | 20% | 18% | 26% | 34%
Unix/disp0% | 19% | 30% | 6% | 43%
Unix/indication0% | 25% | 9% | 19% | 45%
Unix/sock0% | 16% | 16% | 32% | 34%
Unix/configeditor0% | 83% | 0% | 7% | 9%
Unix/protocol0% | 9% | 29% | 22% | 39%
Unix/provmgr0% | 2% | 12% | 21% | 64%
Unix/provreg0% | 13% | 35% | 32% | 19%
Unix/omiutils0% | 7% | 0% | 2% | 90%
Unix/oi0% | 5% | 44% | 14% | 35%
Unix/omi_error0% | 8% | 10% | 2% | 78%
Unix/tools0% | 11% | 5% | 51% | 31%
Unix/strhash0% | 20% | 0% | 50% | 28%
Unix/xml0% | 0% | 62% | 14% | 23%
Unix/pal0% | 0% | 11% | 18% | 70%
Unix/omiclient0% | 0% | 20% | 49% | 29%
Unix/omireg0% | 0% | 45% | 35% | 18%
Unix/scripts0% | 0% | 44% | 37% | 17%
Unix/agent0% | 0% | 44% | 21% | 33%
Unix/check0% | 0% | 45% | 14% | 39%
Unix/deprecated0% | 0% | 9% | 29% | 60%
Unix/ut0% | 0% | 21% | 16% | 61%
Unix/engine0% | 0% | 90% | 0% | 9%
Unix/common0% | 0% | 0% | 8% | 91%
Unix/providers0% | 0% | 0% | 0% | 100%
Unix/image0% | 0% | 0% | 0% | 100%
Unix/chkshlib0% | 0% | 0% | 0% | 100%
Unix/midll0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int HashStr()
in Unix/wsman/wstags_quick.inc
522 261 3
456 174 4
bool DInstance::DynamicToStatic()
in Unix/micxx/dinstance.cpp
641 152 4
int InitializerToValue()
in Unix/codec/mof/parser/types.c
533 92 4
int InitializerToValue()
in Unix/mof/types.c
515 91 3
int WS_ParseWSHeader()
in Unix/wsman/wsmanparser.c
272 80 3
MI_Result climain()
in Unix/cli/cli_c.c
341 79 2
static int _PromoteValue()
in Unix/codec/mof/parser/types.c
386 78 5
static int _PromoteValue()
in Unix/mof/types.c
399 77 3
int WS_ParseFaultBody()
in Unix/wsman/wsmanparser.c
173 77 2
static int _CheckMinValue()
in Unix/codec/mof/parser/types.c
229 73 3
static int _CheckMaxValue()
in Unix/codec/mof/parser/types.c
229 73 3
static int _CheckMinValue()
in Unix/mof/types.c
224 73 2
static int _CheckMaxValue()
in Unix/mof/types.c
224 73 2
extern int WQL_Eval()
in Unix/wql/wql.c
229 71 3
174 68 7
MI_Boolean HttpClient_DecryptData()
in Unix/http/httpclientauth.c
231 67 3
bool Run::ParseArgument()
in Unix/nits/base/Run.cpp
238 65 1
void Print_Element_Value()
in Unix/scriptext/py/PythonBinding.c
350 64 3
void GetConfigFileOptions()
in Unix/server/servercommon.c
285 61 0