GerritCodeReview / plugins_download-commands
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 52 units with 398 lines of code in units (52.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (60 lines of code)
    • 3 medium size units (88 lines of code)
    • 3 small units (47 lines of code)
    • 45 very small units (203 lines of code)
0% | 15% | 22% | 11% | 51%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 15% | 22% | 11% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
download/command0% | 28% | 25% | 5% | 39%
download/scheme0% | 0% | 18% | 18% | 62%
download0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public String getCommand()
in src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java
60 8 2
public String getUrl()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/HttpScheme.java
35 8 1
private String resolveRef()
in src/main/java/com/googlesource/gerrit/plugins/download/command/GitDownloadCommand.java
28 9 2
public final String getCommand()
in src/main/java/com/googlesource/gerrit/plugins/download/command/GitDownloadCommand.java
25 9 3
public String getUrl()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java
20 5 1
public String getUrl()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/AnonymousHttpScheme.java
15 4 1
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/download/command/DownloadCommandsModule.java
12 1 0
public HttpScheme()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/HttpScheme.java
10 2 4
private String getHttpHost()
in src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java
9 2 2
String getCommand()
in src/main/java/com/googlesource/gerrit/plugins/download/command/BranchCommand.java
9 1 3
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/SchemeModule.java
9 1 0
private static boolean isValidUrl()
in src/main/java/com/googlesource/gerrit/plugins/download/command/GitDownloadCommand.java
8 2 1
String getRepoCommand()
in src/main/java/com/googlesource/gerrit/plugins/download/command/BranchCommand.java
8 1 2
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/download/command/CloneCommandsModule.java
8 1 0
public AnonymousHttpScheme()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/AnonymousHttpScheme.java
8 2 3
String getCommand()
in src/main/java/com/googlesource/gerrit/plugins/download/command/FormatPatchCommand.java
7 1 3
public static String quote()
in src/main/java/com/googlesource/gerrit/plugins/download/command/QuoteUtil.java
6 2 1
private static String ensureSlash()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java
6 3 1
private static String ensureSlash()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/HttpScheme.java
6 3 1
private static String ensureSlash()
in src/main/java/com/googlesource/gerrit/plugins/download/scheme/AnonymousHttpScheme.java
6 3 1