microsoft / vsts-authentication-library-for-java
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 449 units with 4,284 lines of code in units (73.2% of code).
    • 2 very long units (368 lines of code)
    • 3 long units (224 lines of code)
    • 34 medium size units (974 lines of code)
    • 87 small units (1,284 lines of code)
    • 323 very small units (1,434 lines of code)
8% | 5% | 22% | 29% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java8% | 5% | 22% | 29% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
common/src/main/java/com/microsoft/alm/helpers21% | 0% | 19% | 25% | 33%
storage/src/main/java/com/microsoft/alm/storage/macosx35% | 0% | 30% | 12% | 20%
core/src/main/java/com/microsoft/alm/auth/oauth0% | 22% | 14% | 29% | 34%
core/src/main/java/com/microsoft/alm/auth/basic0% | 42% | 0% | 32% | 25%
providers/src/main/java/com/microsoft/alm/provider0% | 0% | 52% | 31% | 16%
core/src/main/java/com/microsoft/alm/auth/pat0% | 0% | 30% | 44% | 24%
common/src/main/java/com/microsoft/alm/secret0% | 0% | 15% | 34% | 49%
storage/src/main/java/com/microsoft/alm/storage/windows0% | 0% | 42% | 14% | 43%
common/src/main/java/com/microsoft/alm/storage0% | 0% | 21% | 42% | 36%
sample/src/main/java/com/microsoft/alm/auth/sample0% | 0% | 100% | 0% | 0%
core/src/main/java/com/microsoft/alm/auth0% | 0% | 31% | 0% | 68%
storage/src/main/java/com/microsoft/alm/storage0% | 0% | 22% | 61% | 16%
storage/src/main/java/com/microsoft/alm/storage/posix0% | 0% | 9% | 54% | 36%
Alternative Visuals
Longest Units
Top 20 longest 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
private JPanel createJPanel()
in core/src/main/java/com/microsoft/alm/auth/basic/DefaultCredentialPrompt.java
64 1 0
private Token getToken()
in core/src/main/java/com/microsoft/alm/auth/pat/VstsPatAuthenticator.java
47 6 6
static URI createAuthorizationEndpointUri()
in core/src/main/java/com/microsoft/alm/auth/oauth/AzureAuthority.java
43 11 8
public static void Assert()
in common/src/main/java/com/microsoft/alm/helpers/Debug.java
42 6 2
public static void main()
in sample/src/main/java/com/microsoft/alm/auth/sample/App.java
42 1 1
public static String serializeParameters()
in common/src/main/java/com/microsoft/alm/helpers/UriHelper.java
37 6 1
static boolean deserialize()
in common/src/main/java/com/microsoft/alm/secret/Token.java
36 7 3
static InsecureFileBackend fromXml()
in common/src/main/java/com/microsoft/alm/storage/InsecureFileBackend.java
35 11 1
public E retrieve()
in core/src/main/java/com/microsoft/alm/auth/BaseAuthenticator.java
35 9 3
public Credential getCredentialFor()
in providers/src/main/java/com/microsoft/alm/provider/UserPasswordCredentialProvider.java
35 8 3
public static boolean tryGetSwtJar()
in core/src/main/java/com/microsoft/alm/auth/oauth/helper/SwtJarLoader.java
33 6 1
public E get()
in storage/src/main/java/com/microsoft/alm/storage/windows/internal/CredManagerBackedSecureStore.java
31 4 1
public Client getClientFor()
in providers/src/main/java/com/microsoft/alm/provider/JaxrsClientProvider.java
30 6 3
public static String join()
in common/src/main/java/com/microsoft/alm/helpers/StringHelper.java
29 10 5
HttpURLConnection createConnection()
in common/src/main/java/com/microsoft/alm/helpers/HttpClientImpl.java
28 6 3
static void write()
in storage/src/main/java/com/microsoft/alm/storage/macosx/KeychainSecurityCliStore.java
28 3 5