microsoft / xbox-live-samples
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 6,014 units with 89,515 lines of code in units (52.2% of code).
    • 19 very complex units (6,228 lines of code)
    • 45 complex units (5,891 lines of code)
    • 185 medium complex units (11,476 lines of code)
    • 430 simple units (14,628 lines of code)
    • 5,335 very simple units (51,292 lines of code)
6% | 6% | 12% | 16% | 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
cpp9% | 7% | 14% | 14% | 53%
js1% | 1% | 10% | 17% | 70%
h0% | 7% | 1% | 31% | 59%
cs0% | 0% | 5% | 9% | 85%
java0% | 0% | 0% | 10% | 89%
mm0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Kits/ATGTK24% | 11% | 15% | 15% | 33%
ID@XboxSDK/Clubs18% | 8% | 16% | 14% | 41%
CreatorsSDK/Social5% | 2% | 12% | 16% | 63%
ID@XboxSDK/Social14% | 6% | 18% | 11% | 48%
ID@XboxSDK/GameSave4% | 6% | 17% | 18% | 52%
ID@XboxSDK/GameSaveCppWinRT6% | 6% | 9% | 23% | 54%
ID@XboxSDK/InGameChat0% | 13% | 13% | 17% | 55%
ID@XboxSDK/Matchmaking0% | 16% | 12% | 14% | 56%
ID@XboxSDK/Multiplayer0% | 15% | 17% | 11% | 55%
ID@XboxSDK/PositionalChat0% | 12% | 3% | 25% | 58%
Kits/Microsoft.Xbox.Samples.NetworkMesh0% | 11% | 7% | 18% | 62%
ID@XboxSDK/DataPlatform20130% | 0% | 8% | 15% | 76%
CreatorsSDK/Leaderboards0% | 0% | 16% | 18% | 65%
MobileSDK/Samples-Cocos2d-x0% | 0% | 14% | 17% | 67%
ID@XboxSDK/TitleStorage0% | 0% | 8% | 15% | 76%
Kits/LiveTK0% | 0% | 8% | 32% | 59%
ID@XboxSDK/XWebSecFiddlerExtension0% | 0% | 16% | 20% | 63%
ID@XboxSDK/DownloadableContent0% | 0% | 9% | 10% | 79%
ID@XboxSDK/GameTrials0% | 0% | 0% | 25% | 74%
MobileSDK/Samples-Native0% | 0% | 0% | 9% | 90%
MobileSDK/Integration0% | 0% | 0% | 11% | 88%
ID@XboxSDK/DataPlatform20170% | 0% | 0% | 10% | 89%
ID@XboxSDK/Leaderboards0% | 0% | 0% | 7% | 92%
ID@XboxSDK/Achievements0% | 0% | 0% | 8% | 91%
ID@XboxSDK/TCUI0% | 0% | 0% | 4% | 95%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void LoadLayout()
in Kits/ATGTK/SampleGUI.cpp
779 159 3
void LoadLayout()
in CreatorsSDK/Social/UWP/Cpp/SampleGUI.cpp
651 130 3
void LoadLayout()
in ID@XboxSDK/Clubs/UWP/Cpp/SampleGUI.cpp
651 130 3
void LoadLayout()
in ID@XboxSDK/Clubs/Xbox/Cpp/SampleGUI.cpp
651 130 3
void LoadLayout()
in ID@XboxSDK/Social/UWP/Cpp/SampleGUI.cpp
651 130 3
class __declspec()
in Kits/ATGTK/OrbitCamera.cpp
338 86 1
79 73 1
oneTimeTextBindingAnalyze: function()
in CreatorsSDK/Social/UWP/JS/Social/lib/WinJS-4.0.1/js/base.js
140 70 1
HRESULT WaveBankReader::Impl::Open()
in Kits/ATGTK/WaveBankReader.cpp
345 70 1
class __declspec()
in Kits/ATGTK/FlyCamera.cpp
272 63 1
void GameBoardScreen::HandleInput()
in ID@XboxSDK/GameSave/UWP/GameLogic/GameBoardScreen.cpp
255 62 1
void GameBoardScreen::HandleInput()
in ID@XboxSDK/GameSave/Xbox/GameLogic/GameBoardScreen.cpp
255 62 1
void GameBoardScreen::HandleInput()
in ID@XboxSDK/GameSaveCppWinRT/Xbox/GameLogic/GameBoardScreen.cpp
255 62 1
bool ListBox::Update()
in CreatorsSDK/Social/UWP/Cpp/SampleGUI.cpp
152 54 3
bool ListBox::Update()
in ID@XboxSDK/Clubs/UWP/Cpp/SampleGUI.cpp
152 54 3
bool ListBox::Update()
in ID@XboxSDK/Clubs/Xbox/Cpp/SampleGUI.cpp
152 54 3
bool ListBox::Update()
in ID@XboxSDK/Social/UWP/Cpp/SampleGUI.cpp
152 54 3
bool ListBox::Update()
in Kits/ATGTK/SampleGUI.cpp
152 54 3
bool TextBox::Update()
in Kits/ATGTK/SampleGUI.cpp
146 54 3
function reservedWordLookup()
in CreatorsSDK/Social/UWP/JS/Social/lib/WinJS-4.0.1/js/base.js
105 49 1