microsoft / xbox-live-api
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 3,935 units with 50,897 lines of code in units (46.8% of code).
    • 7 very complex units (929 lines of code)
    • 11 complex units (1,477 lines of code)
    • 92 medium complex units (6,881 lines of code)
    • 239 simple units (9,849 lines of code)
    • 3,586 very simple units (31,761 lines of code)
1% | 2% | 13% | 19% | 62%
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% | 3% | 16% | 22% | 55%
hpp2% | 3% | 12% | 17% | 64%
h<1% | <1% | 7% | 12% | 78%
mm0% | 0% | 43% | 16% | 39%
cs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Source/Shared6% | 4% | 15% | 18% | 54%
Include/xsapi-cpp8% | 0% | 1% | 3% | 86%
Source/Services0% | 2% | 17% | 24% | 55%
Include/cpprestinclude0% | 2% | 10% | 18% | 67%
Source/System0% | 0% | 9% | 20% | 69%
External/Xal0% | 0% | 0% | 0% | 100%
Build/Microsoft.Xbox.Services.141.GDK.C.Thunks0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
170 141 2
170 141 2
142 136 1
145 133 1
150 133 1
static xbox_live_error_code ConvertHrToXblErrorCode()
in Include/xsapi-cpp/impl/public_utils.h
76 70 1
xbl_error_code ConvertHrToXblErrorCode()
in Source/Shared/public_utils_legacy.cpp
76 70 1
HRESULT HttpCall::ConvertHttpStatusToHRESULT()
in Source/Shared/http_call_wrapper_internal.cpp
69 50 1
HRESULT utils::convert_http_status_to_hresult()
in Source/Shared/xsapi_utils.cpp
69 50 1
bool inner_parse()
in Include/cpprestinclude/cpprest/details/uri_parser.hpp
137 35 14
bool inner_parse()
in Source/Shared/HookedUri/details/uri_parser.hpp
137 35 14
bool inner_parse()
in Source/Shared/http_utils.cpp
139 35 14
void JSON_Parser::GetNextToken()
in Include/cpprestinclude/cpprest/details/json_parsing.hpp
90 34 1
HRESULT MultiplayerLobbyClient::CommitLobbyChanges()
in Source/Services/Multiplayer/Manager/multiplayer_lobby_client.cpp
311 34 3
static bool _accept_char()
in Include/cpprestinclude/cpprest/streams.h
93 33 2
void XblMultiplayerSession::SerializeSessionConstants()
in Source/Services/Multiplayer/multiplayer_session.cpp
160 30 2
Result MultiplayerSessionMember::Deserialize()
in Source/Services/Multiplayer/multiplayer_session_member.cpp
157 29 1
bool JSON_Parser::CompleteNumberLiteral()
in Include/cpprestinclude/cpprest/details/json_parsing.hpp
115 26 2
utility::string_t uri_components::join()
in Include/cpprestinclude/cpprest/details/uri.hpp
91 24 0
xsapi_internal_string ReputationFeedbackRequest::ReputationFeedbackTypeToString()
in Source/Services/Social/reputation_feedback_request.cpp
36 24 1