microsoft / pmod
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 5,792 units with 68,342 lines of code in units (54.5% of code).
    • 4 very complex units (952 lines of code)
    • 19 complex units (3,354 lines of code)
    • 76 medium complex units (5,857 lines of code)
    • 185 simple units (7,250 lines of code)
    • 5,508 very simple units (50,929 lines of code)
1% | 4% | 8% | 10% | 74%
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
cpp1% | 6% | 12% | 13% | 64%
h<1% | 0% | <1% | 3% | 95%
c0% | 18% | 20% | 17% | 43%
java0% | 5% | 4% | 10% | 79%
cs0% | 0% | 4% | 15% | 80%
mm0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
codegen3% | 11% | 30% | 15% | 38%
foundation4% | 11% | 5% | 7% | 70%
nodejs10% | 0% | 3% | 3% | 82%
jansson6% | 18% | 20% | 17% | 37%
foundation_library0% | 17% | 1% | 12% | 68%
java0% | 3% | 2% | 11% | 82%
model_library0% | 0% | 9% | 20% | 69%
proxy0% | 0% | 5% | 12% | 82%
coreclr0% | 0% | 4% | 14% | 80%
model0% | 0% | 8% | 4% | 86%
winrt0% | 0% | <1% | 5% | 94%
public0% | 0% | 0% | 3% | 96%
foundation_pal0% | 0% | 0% | 6% | 93%
src0% | 0% | 0% | 34% | 65%
pal0% | 0% | 0% | 0% | 100%
inc0% | 0% | 0% | 0% | 100%
objectivec0% | 0% | 0% | 0% | 100%
android0% | 0% | 0% | 0% | 100%
__generated0% | 0% | 0% | 0% | 100%
__build0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void CGenerateCSharpClasses::codeGenerate()
in src/codegen/tool/GenerateCSharpClasses.cpp
378 67 1
static uint32_t hashlittle()
in src/jansson/src/lookup3.h
152 63 3
HRESULT CPropertyValueInternalStatics::ChangeTypeInternal()
in src/foundation/PropertyValueInternalStatics.cpp
258 54 2
HRESULT InspectableToLocalValue()
in src/nodejs/NodeJsHelper.cpp
164 51 3
static int do_dump()
in src/jansson/src/dump.c
195 46 5
static int unpack()
in src/jansson/src/pack_unpack.c
122 46 3
void CGenerateWindowsRuntimeAdapter::codeGenerate()
in src/codegen/tool/GenerateWindowsRuntimeAdapter.cpp
290 45 1
static HRESULT EvaluateRpnExpression()
in src/foundation_library/Expression.cpp
178 44 3
void CGenerateObjectiveC::codeGenerate()
in src/codegen/tool/GenerateObjectiveC.cpp
314 43 1
static void lex_scan_string()
in src/jansson/src/load.c
125 42 2
void CGenerateFastCppTemplate::codeGenerate()
in src/codegen/tool/GenerateFastCppTemplate.cpp
274 41 1
HRESULT CFastContainerUtil::GetPropertyValue()
in src/foundation_library/FastContainerUtil.cpp
111 41 3
static HRESULT ExpressionToRpn()
in src/foundation_library/Expression.cpp
220 39 3
void CGenerateNetInterop::codeGenerate()
in src/codegen/tool/GenerateNetInterop.cpp
175 35 1
HRESULT CPropertyValueInternalStatics::Serialize()
in src/foundation/PropertyValueInternalStatics.cpp
181 34 3
HRESULT CPropertyValueInternalStatics::Deserialize()
in src/foundation/PropertyValueInternalStatics.cpp
176 34 3
void CGenerateFastCppTemplate::emitPropertyAccessMethods()
in src/codegen/tool/GenerateFastCppTemplate.cpp
188 33 5
HRESULT CFastContainerUtil::SetPropertyValue()
in src/foundation_library/FastContainerUtil.cpp
147 30 3
static HRESULT PropertyValueToJson()
in src/foundation_library/JsonStatics.cpp
216 30 2
STDMETHODIMP CPropertyValueInternalStatics::ComparePropertyValues()
in src/foundation/PropertyValueInternalStatics.cpp
190 29 3