GerritCodeReview / plugins_webhooks
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 80 units with 510 lines of code in units (42.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (47 lines of code)
    • 12 small units (167 lines of code)
    • 66 very small units (296 lines of code)
0% | 0% | 9% | 32% | 58%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 9% | 32% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
webhooks0% | 0% | 13% | 24% | 62%
webhooks/rest0% | 0% | 0% | 51% | 48%
webhooks/processors0% | 0% | 0% | 56% | 44%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public void onEvent()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/EventHandler.java
25 5 1
public void run()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/PostTask.java
22 7 0
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/PluginModule.java
20 1 0
private ServiceUnavailableRetryStrategy customServiceUnavailRetryStrategy()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpClientProvider.java
19 3 0
public RemoteInfo upsert()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/UpsertRemote.java
19 3 3
protected abstract Optional doProcess()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/processors/AbstractEventProcessor.java
14 5 2
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/DeleteRemote.java
14 2 2
public boolean equals()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/RemoteInfo.java
13 8 1
HttpResult post()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpSession.java
12 1 2
public PostTask()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/PostTask.java
12 1 5
private static SSLContext buildSslContext()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/DefaultHttpClientProvider.java
11 2 0
static RemoteInfo fromRemoteConfig()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/GetRemote.java
11 1 1
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/WebhooksRestModule.java
11 1 0
private String parseResponse()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpResponseHandler.java
11 3 1
private void setStringList()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/WebhooksConfig.java
10 3 3
private void setInt()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/WebhooksConfig.java
10 3 4
private void setBoolean()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/WebhooksConfig.java
10 3 4
public RemoteResource parse()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/RemotesCollection.java
10 2 2
public String toString()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/PostTask.java
10 1 0
private HttpClientConnectionManager create()
in src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpClientProvider.java
9 1 1