microsoft / vsts-authentication-library-for-java
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 449 units with 4,284 lines of code in units (73.2% of code).
    • 1 very complex units (227 lines of code)
    • 1 complex units (141 lines of code)
    • 4 medium complex units (238 lines of code)
    • 22 simple units (605 lines of code)
    • 421 very simple units (3,073 lines of code)
5% | 3% | 5% | 14% | 71%
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
java5% | 3% | 5% | 14% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
common/src/main/java/com/microsoft/alm/helpers21% | 0% | 0% | 21% | 57%
storage/src/main/java/com/microsoft/alm/storage/macosx0% | 35% | 0% | 0% | 64%
core/src/main/java/com/microsoft/alm/auth/oauth0% | 0% | 28% | 6% | 64%
common/src/main/java/com/microsoft/alm/storage0% | 0% | 12% | 15% | 72%
core/src/main/java/com/microsoft/alm/auth/pat0% | 0% | 0% | 37% | 62%
providers/src/main/java/com/microsoft/alm/provider0% | 0% | 0% | 41% | 58%
common/src/main/java/com/microsoft/alm/secret0% | 0% | 0% | 7% | 92%
core/src/main/java/com/microsoft/alm/auth0% | 0% | 0% | 31% | 68%
storage/src/main/java/com/microsoft/alm/storage/posix0% | 0% | 0% | 7% | 92%
storage/src/main/java/com/microsoft/alm/storage/windows0% | 0% | 0% | 0% | 100%
core/src/main/java/com/microsoft/alm/auth/basic0% | 0% | 0% | 0% | 100%
storage/src/main/java/com/microsoft/alm/storage0% | 0% | 0% | 0% | 100%
sample/src/main/java/com/microsoft/alm/auth/sample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static void parse()
in common/src/main/java/com/microsoft/alm/helpers/SimpleJson.java
227 64 2
static void parseAttributeLine()
in storage/src/main/java/com/microsoft/alm/storage/macosx/KeychainSecurityCliStore.java
141 47 2
public TokenPair getOAuth2TokenPair()
in core/src/main/java/com/microsoft/alm/auth/oauth/OAuth2Authenticator.java
94 23 2
public TokenPair requestToken()
in core/src/main/java/com/microsoft/alm/auth/oauth/DeviceFlowImpl.java
66 12 3
static InsecureFileBackend fromXml()
in common/src/main/java/com/microsoft/alm/storage/InsecureFileBackend.java
35 11 1
static URI createAuthorizationEndpointUri()
in core/src/main/java/com/microsoft/alm/auth/oauth/AzureAuthority.java
43 11 8
private SettingsHelper()
in common/src/main/java/com/microsoft/alm/helpers/SettingsHelper.java
27 10 0
public static String join()
in common/src/main/java/com/microsoft/alm/helpers/StringHelper.java
29 10 5
void save()
in common/src/main/java/com/microsoft/alm/storage/InsecureFileBackend.java
23 9 0
public E retrieve()
in core/src/main/java/com/microsoft/alm/auth/BaseAuthenticator.java
35 9 3
public static String trimEnd()
in common/src/main/java/com/microsoft/alm/helpers/StringHelper.java
19 8 2
public Token generatePersonalAccessToken()
in core/src/main/java/com/microsoft/alm/auth/pat/VsoAzureAuthority.java
27 8 6
public Credential getCredentialFor()
in providers/src/main/java/com/microsoft/alm/provider/UserPasswordCredentialProvider.java
35 8 3
static boolean deserialize()
in common/src/main/java/com/microsoft/alm/secret/Token.java
36 7 3
public boolean populateTokenTargetId()
in core/src/main/java/com/microsoft/alm/auth/pat/VsoAzureAuthority.java
21 7 2
private String getAccountUri()
in core/src/main/java/com/microsoft/alm/auth/pat/VstsPatAuthenticator.java
20 7 2
public static void Assert()
in common/src/main/java/com/microsoft/alm/helpers/Debug.java
42 6 2
HttpURLConnection createConnection()
in common/src/main/java/com/microsoft/alm/helpers/HttpClientImpl.java
28 6 3
public static QueryString deserializeParameters()
in common/src/main/java/com/microsoft/alm/helpers/UriHelper.java
24 6 1
public static String serializeParameters()
in common/src/main/java/com/microsoft/alm/helpers/UriHelper.java
37 6 1