microsoft / xlang
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,168 units with 40,835 lines of code in units (55.8% of code).
    • 4 very complex units (670 lines of code)
    • 6 complex units (1,156 lines of code)
    • 123 medium complex units (7,969 lines of code)
    • 147 simple units (4,587 lines of code)
    • 3,888 very simple units (26,453 lines of code)
1% | 2% | 19% | 11% | 64%
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
cpp3% | 10% | 29% | 16% | 40%
h1% | 0% | 19% | 9% | 69%
hpp0% | 0% | 11% | 8% | 80%
js0% | 0% | 12% | 1% | 86%
cs0% | 0% | 0% | 35% | 64%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
UndockedRegFreeWinRT/detours6% | 12% | 28% | 19% | 33%
library/impl7% | 0% | 13% | 6% | 73%
tool/abi0% | 4% | 23% | 10% | 60%
tool/cppxlang0% | 1% | 21% | 10% | 67%
tool/python0% | 0% | 27% | 14% | 58%
library0% | 0% | 12% | 8% | 79%
UndockedRegFreeWinRT/Catch0% | 0% | 11% | 8% | 80%
UndockedRegFreeWinRT/UndockedRegFreeWinRT0% | 0% | 33% | 13% | 53%
scripts0% | 0% | 12% | 1% | 86%
platform0% | 0% | 8% | 4% | 86%
UndockedRegFreeWinRT/EmbeddedManifestManagedTest0% | 0% | 0% | 36% | 63%
UndockedRegFreeWinRT/UndockedRegFreeWinRTManagedTest0% | 0% | 0% | 36% | 63%
UndockedRegFreeWinRT/EmbeddedTestComponent0% | 0% | 0% | 0% | 100%
UndockedRegFreeWinRT/TestComponent0% | 0% | 0% | 0% | 100%
platform/published0% | 0% | 0% | 0% | 100%
UndockedRegFreeWinRT/mwinrtact0% | 0% | 0% | 0% | 100%
platform/helpers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
inline ULONG detour_is_code_filler()
in src/UndockedRegFreeWinRT/detours/detours.cpp
55 68 1
inline ULONG detour_is_code_filler()
in src/UndockedRegFreeWinRT/detours/detours.cpp
55 68 1
BOOL CImage::Write()
in src/UndockedRegFreeWinRT/detours/image.cpp
331 64 1
void initialize()
in src/library/impl/meta_reader/database.h
229 59 0
BOOL CImage::Read()
in src/UndockedRegFreeWinRT/detours/image.cpp
250 45 1
LONG WINAPI DetourAttachEx()
in src/UndockedRegFreeWinRT/detours/detours.cpp
288 36 5
int main()
in src/tool/abi/main.cpp
181 34 2
BOOL CImage::EditImports()
in src/UndockedRegFreeWinRT/detours/image.cpp
138 32 5
static BOOL UPDATE_IMPORTS_XX()
in src/UndockedRegFreeWinRT/detours/uimports.cpp
202 32 3
static int run()
in src/tool/cppxlang/main.cpp
97 26 2
void metadata_cache::process_class_dependencies()
in src/tool/abi/metadata_cache.cpp
118 25 2
inline void write_type_banner()
in src/tool/abi/type_banners.h
121 25 2
clara::Parser makeCommandLineParser()
in src/UndockedRegFreeWinRT/Catch/catch.hpp
184 24 1
void XmlEncode::encodeTo()
in src/UndockedRegFreeWinRT/Catch/catch.hpp
62 24 1
HRESULT FindTypeInMetaDataFile()
in src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/typeresolution.cpp
123 24 6
BOOL WINAPI DetourUpdateProcessWithDllEx()
in src/UndockedRegFreeWinRT/detours/creatwth.cpp
105 24 4
184 24 1
void XmlEncode::encodeTo()
in src/library/catch.hpp
62 24 1
128 23 2
BOOL WINAPI AllocExeHelper()
in src/UndockedRegFreeWinRT/detours/creatwth.cpp
80 22 4