microsoft / WinObjC
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 18,071 units with 183,965 lines of code in units (31.5% of code).
    • 52 very complex units (11,977 lines of code)
    • 127 complex units (11,868 lines of code)
    • 617 medium complex units (31,919 lines of code)
    • 880 simple units (22,972 lines of code)
    • 16,395 very simple units (105,229 lines of code)
6% | 6% | 17% | 12% | 57%
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
c12% | 13% | 29% | 17% | 26%
mm8% | 3% | 11% | 13% | 62%
cpp2% | 5% | 24% | 15% | 51%
h0% | <1% | 1% | 1% | 96%
cs0% | 0% | 15% | 26% | 57%
m0% | 0% | 15% | 11% | 73%
hpp0% | 0% | 7% | 32% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Frameworks/CoreFoundation12% | 13% | 29% | 17% | 27%
Frameworks/OpenGLES25% | 4% | 4% | 6% | 59%
Frameworks/Accelerate22% | 5% | 25% | 5% | 40%
Frameworks/ImageIO34% | 6% | 18% | 21% | 18%
Frameworks/AddressBook54% | 0% | 0% | 2% | 42%
Frameworks/AudioToolbox9% | 10% | 23% | 18% | 37%
Frameworks/Foundation6% | 2% | 17% | 17% | 56%
tools/winmd2objc2% | 6% | 27% | 14% | 49%
tools/vsimporter1% | 7% | 20% | 18% | 51%
Frameworks/UIKit0% | 5% | 26% | 19% | 48%
tools/objc2winmd0% | 5% | 30% | 14% | 49%
Frameworks/CoreGraphics0% | 2% | 2% | 10% | 84%
Frameworks/Starboard0% | 5% | 25% | 14% | 53%
tools/include0% | 13% | 8% | 42% | 34%
Frameworks/RTObjCInterop0% | 16% | 9% | 26% | 47%
Frameworks/CoreText0% | 0% | 16% | 23% | 59%
tools/AppInsights0% | 0% | 12% | 22% | 64%
tools/xib2xaml0% | 0% | 10% | 25% | 63%
Frameworks/include0% | 0% | 8% | 19% | 71%
tools/ClangCompileTask0% | 0% | 27% | 35% | 36%
tools/Logging0% | 0% | 12% | 16% | 70%
Frameworks/GLKit0% | 0% | 5% | 9% | 84%
Frameworks/QuartzCore0% | 0% | 14% | 7% | 78%
tools/AssetCatalogBuilder0% | 0% | 30% | 19% | 49%
Frameworks/CoreData0% | 0% | 63% | 0% | 36%
Frameworks/Security0% | 0% | 9% | 3% | 87%
tools/BuildMonitor0% | 0% | 21% | 0% | 78%
Frameworks/UIKit.Xaml0% | 0% | 3% | 7% | 89%
Frameworks/CoreFoundationAdditions0% | 0% | 0% | 48% | 51%
include/Platform0% | 0% | 0% | 3% | 96%
Frameworks/MobileCoreServices0% | 0% | 0% | 24% | 75%
Frameworks/CoreLocation0% | 0% | 0% | 35% | 64%
tools/PropSchemaGen0% | 0% | 0% | 81% | 18%
include/Accelerate0% | 0% | 0% | 10% | 89%
tools/WinObjC.Compiler0% | 0% | 0% | 0% | 100%
Frameworks/CoreMedia0% | 0% | 0% | 0% | 100%
include/GLKit0% | 0% | 0% | 0% | 100%
Frameworks/CFNetwork0% | 0% | 0% | 0% | 100%
include/Metal0% | 0% | 0% | 0% | 100%
Frameworks/CoreVideo0% | 0% | 0% | 0% | 100%
include/CoreGraphics0% | 0% | 0% | 0% | 100%
Frameworks/CoreMIDI0% | 0% | 0% | 0% | 100%
include/Foundation0% | 0% | 0% | 0% | 100%
include/UIKit0% | 0% | 0% | 0% | 100%
Frameworks/MapKit0% | 0% | 0% | 0% | 100%
tools/WOCStdLib0% | 0% | 0% | 0% | 100%
Frameworks/AudioUnit0% | 0% | 0% | 0% | 100%
include/HomeKit0% | 0% | 0% | 0% | 100%
include/CFNetwork0% | 0% | 0% | 0% | 100%
include/MediaPlayer0% | 0% | 0% | 0% | 100%
Frameworks/Social.Xaml0% | 0% | 0% | 0% | 100%
include/CoreData0% | 0% | 0% | 0% | 100%
Frameworks/MediaAccessibility0% | 0% | 0% | 0% | 100%
include/AudioToolbox0% | 0% | 0% | 0% | 100%
Frameworks/SystemConfiguration0% | 0% | 0% | 0% | 100%
include/Contacts0% | 0% | 0% | 0% | 100%
include/GameKit0% | 0% | 0% | 0% | 100%
Frameworks/CoreAudio0% | 0% | 0% | 0% | 100%
Frameworks/Metal0% | 0% | 0% | 0% | 100%
include/Accounts0% | 0% | 0% | 0% | 100%
tools/WinObjC.Tools0% | 0% | 0% | 0% | 100%
include/AVFoundation0% | 0% | 0% | 0% | 100%
include/WebKit0% | 0% | 0% | 0% | 100%
include/iAd0% | 0% | 0% | 0% | 100%
Frameworks/AutoLayout0% | 0% | 0% | 0% | 100%
include/AddressBook0% | 0% | 0% | 0% | 100%
Frameworks/SafariServices0% | 0% | 0% | 0% | 100%
tools/include_next0% | 0% | 0% | 0% | 100%
Frameworks/MediaPlayer0% | 0% | 0% | 0% | 100%
include/CoreLocation0% | 0% | 0% | 0% | 100%
include/LocalAuthentication0% | 0% | 0% | 0% | 100%
build/RTObjCInterop0% | 0% | 0% | 0% | 100%
Frameworks/GameController0% | 0% | 0% | 0% | 100%
include/CoreMIDI0% | 0% | 0% | 0% | 100%
tools/WinObjC.Language0% | 0% | 0% | 0% | 100%
include/Social0% | 0% | 0% | 0% | 100%
include/AssetsLibrary0% | 0% | 0% | 0% | 100%
include/AudioUnit0% | 0% | 0% | 0% | 100%
Frameworks/AVFoundation0% | 0% | 0% | 0% | 100%
Frameworks/CoreMotion0% | 0% | 0% | 0% | 100%
include/CoreVideo0% | 0% | 0% | 0% | 100%
include/MessageUI0% | 0% | 0% | 0% | 100%
Frameworks/AssetsLibrary0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static Boolean _CFBundleGrokFileType()
in Frameworks/CoreFoundation/PlugIn.subproj/CFBundle_Grok.c
230 338 9
vImage_Error vImageBoxConvolve_ARGB8888()
in Frameworks/Accelerate/vImage.cpp
695 230 9
static void __CFStringAppendFormatCore()
in Frameworks/CoreFoundation/String.subproj/CFString.c
525 215 2
Boolean CFStringFindWithOptionsAndLocale()
in Frameworks/CoreFoundation/String.subproj/CFString.c
340 209 6
CFComparisonResult CFStringCompareWithOptionsAndLocale()
in Frameworks/CoreFoundation/String.subproj/CFString.c
291 205 5
CF_PRIVATE bool __CFBinaryPlistCreateObjectFiltered()
in Frameworks/CoreFoundation/Parsing.subproj/CFBinaryPList.c
469 200 11
void OpenGLESState::init()
in Frameworks/OpenGLES/GLES1122/OpenGLES20/OpenGLESState.mm
792 163 1
static int start_decoder()
in Frameworks/AudioToolbox/stb_vorbis.c
481 161 1
GLuint ShaderProgram::createProgram()
in Frameworks/OpenGLES/GLES1122/OpenGLES20/ShaderProgram.mm
414 153 2
static Boolean __CFCharacterSetEqual()
in Frameworks/CoreFoundation/String.subproj/CFCharacterSet.c
257 152 2
Boolean __CFStringDecodeByteStream3()
in Frameworks/CoreFoundation/String.subproj/CFStringEncodings.c
321 152 7
CFDictionaryRef readTIFFProperties()
in Frameworks/ImageIO/CGImageSource.mm
330 134 1
CFDictionaryRef readJPEGProperties()
in Frameworks/ImageIO/CGImageSource.mm
322 123 1
CFTypeRef CFNumberFormatterCopyProperty()
in Frameworks/CoreFoundation/Locale.subproj/CFNumberFormatter.c
220 116 2
CFIndex __CFStringEncodeByteStream()
in Frameworks/CoreFoundation/String.subproj/CFStringEncodings.c
263 115 9
int _doprnt()
in Frameworks/Foundation/FormatPrintf.mm
290 114 3
static CFBasicHashRef __CFBagCreateGeneric()
in Frameworks/CoreFoundation/Collections.subproj/CFBag.c
78 99 4
static CFBasicHashRef __CFDictionaryCreateGeneric()
in Frameworks/CoreFoundation/Collections.subproj/CFDictionary.c
78 99 4
static CFBasicHashRef __CFSetCreateGeneric()
in Frameworks/CoreFoundation/Collections.subproj/CFSet.c
78 99 4
CF_INLINE void __CFParseFormatSpec()
in Frameworks/CoreFoundation/String.subproj/CFString.c
201 98 6