microsoft / azure-devops-auth-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 57 units with 793 lines of code in units (37.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (55 lines of code)
    • 2 medium complex units (60 lines of code)
    • 3 simple units (79 lines of code)
    • 51 very simple units (599 lines of code)
0% | 6% | 7% | 9% | 75%
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
js0% | 19% | 21% | 14% | 45%
py0% | 0% | 0% | 28% | 71%
cs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
OAuthWebSample/OAuthWebSample0% | 14% | 15% | 10% | 58%
PersonalAccessTokenAPIAppSample0% | 0% | 0% | 28% | 71%
JavascriptWebAppSample0% | 0% | 0% | 0% | 100%
DeviceProfileSample0% | 0% | 0% | 0% | 100%
ManagedClientConsoleAppSample0% | 0% | 0% | 0% | 100%
NonInteractivePatGenerationSample/NonInteractivePatGenerationSample0% | 0% | 0% | 0% | 100%
ClientLibraryConsoleAppSample0% | 0% | 0% | 0% | 100%
ClientLibraryPatAppSample0% | 0% | 0% | 0% | 100%
DualSupportClientSample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
applyMedia = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
55 27 1
translate = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
33 17 3
ripCSS = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
27 11 0
(function( win )()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
40 7 1
def pat_put()
in PersonalAccessTokenAPIAppSample/app.py
20 7 0
def pat_post()
in PersonalAccessTokenAPIAppSample/app.py
19 6 0
function selectAccount()
in JavascriptWebAppSample/app.js
11 5 0
private static bool ValidateCallbackValues()
in OAuthWebSample/OAuthWebSample/Controllers/OAuthController.cs
33 5 3
def authorized()
in PersonalAccessTokenAPIAppSample/app.py
16 5 0
static void Main()
in ClientLibraryConsoleAppSample/Program.cs
18 4 1
static void Main()
in ClientLibraryPatAppSample/Program.cs
18 4 1
public async Task Callback()
in OAuthWebSample/OAuthWebSample/Controllers/OAuthController.cs
36 4 2
public async Task RefreshToken()
in OAuthWebSample/OAuthWebSample/Controllers/OAuthController.cs
37 4 1
req.onreadystatechange = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
6 4 0
def _build_msal_app()
in PersonalAccessTokenAPIAppSample/app.py
5 4 2
private static void ListProjects()
in DeviceProfileSample/Program.cs
26 3 1
public static void Main()
in DualSupportClientSample/Program.cs
17 3 1
private static void ListProjects()
in ManagedClientConsoleAppSample/Program.cs
27 3 1
getEmValue = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
22 3 0
ajax = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
5 3 2