GerritCodeReview / plugins_batch
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 115 units with 1,042 lines of code in units (56.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (183 lines of code)
    • 27 small units (366 lines of code)
    • 81 very small units (493 lines of code)
0% | 0% | 17% | 35% | 47%
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% | 17% | 35% | 46%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/java/com/googlesource/gerrit/plugins/batch/util0% | 0% | 46% | 22% | 30%
src/main/java/com/googlesource/gerrit/plugins/batch0% | 0% | 9% | 46% | 43%
src/main/java/com/googlesource/gerrit/plugins/batch/ssh0% | 0% | 11% | 39% | 49%
src/main/java/com/google/gerrit/server/util0% | 0% | 20% | 16% | 62%
src/main/java/com/googlesource/gerrit/plugins/batch/cli0% | 0% | 28% | 30% | 41%
src/main/java/com/googlesource/gerrit/plugins/batch/query0% | 0% | 0% | 57% | 42%
src/main/java/com/google/gerrit/server/git/meta0% | 0% | 0% | 27% | 72%
tools0% | 0% | 0% | 0% | 100%
src/main/java/com/google/gerrit/entities0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/batch/exception0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void closeChange()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchSubmitter.java
33 5 4
MergeBranch create()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBranch.java
29 1 2
MergeBuilder create()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBuilder.java
28 1 2
public void run()
in src/main/java/com/googlesource/gerrit/plugins/batch/ssh/MergeChangeCommand.java
24 5 0
public ObjectId call()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBranch.java
24 5 0
protected void handleResult()
in src/main/java/com/google/gerrit/server/util/RefUpdater.java
23 15 1
public FastForwardMode getFastForwardMode()
in src/main/java/com/googlesource/gerrit/plugins/batch/cli/FastForwardOptions.java
22 6 0
public void run()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchCleaner.java
19 5 0
public void save()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchStore.java
18 4 1
protected void update()
in src/main/java/com/google/gerrit/server/util/RefUpdater.java
18 3 0
protected void merge()
in src/main/java/com/googlesource/gerrit/plugins/batch/ssh/MergeChangeCommand.java
17 1 3
public ObjectId build()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBuilder.java
17 5 1
public void display()
in src/main/java/com/googlesource/gerrit/plugins/batch/ListBatches.java
16 2 1
private void closeChanges()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchSubmitter.java
15 3 1
protected boolean isParentMergedInto()
in src/main/java/com/googlesource/gerrit/plugins/batch/ssh/MergeChangeCommand.java
14 4 2
public List find()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchStore.java
14 4 1
public List getBatches()
in src/main/java/com/googlesource/gerrit/plugins/batch/ListBatches.java
14 5 0
protected Lifecycle()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchCleaner.java
14 1 5
public void start()
in src/main/java/com/googlesource/gerrit/plugins/batch/ssh/ListCommand.java
13 1 2
public Destination getDestination()
in src/main/java/com/googlesource/gerrit/plugins/batch/Batch.java
13 3 1