GerritCodeReview / plugins_autosubmitter
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 41 units with 548 lines of code in units (73.3% of code).
    • 1 very long units (148 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (136 lines of code)
    • 8 small units (113 lines of code)
    • 28 very small units (151 lines of code)
27% | 0% | 24% | 20% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb71% | 0% | 0% | 6% | 21%
java0% | 0% | 39% | 29% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT71% | 0% | 0% | 6% | 21%
src/main/java/com/criteo/gerrit/plugins/automerge0% | 0% | 39% | 29% | 31%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
148 9 0
private void attemptToMergeAtomic()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
42 10 1
private void onRefUpdatedEvent()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
35 3 1
public boolean hasDependentReview()
in src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java
31 5 2
public AutomergeConfig()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomergeConfig.java
28 3 2
private void processNewAtomicPatchSet()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
18 3 1
public boolean isSubmittable()
in src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java
16 3 2
public RevisionResource getRevisionResource()
in src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java
16 2 2
14 1 0
public synchronized void onEvent()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
14 6 1
private void onCommentAdded()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
13 3 1
private void attemptToMergeNonAtomic()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
11 2 1
private IdentifiedUser getBotUser()
in src/main/java/com/criteo/gerrit/plugins/automerge/AtomicityHelper.java
11 3 0
10 1 0
String getContent()
in src/main/java/com/criteo/gerrit/plugins/automerge/PluginComment.java
10 3 0
private void onNewOrChangedPatchSet()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
10 3 1
private boolean shouldProcessCommentEvent()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
10 3 1
9 1 0
private void autoSubmitIfMergeable()
in src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
9 3 1
public static Change from()
in src/main/java/com/criteo/gerrit/plugins/automerge/Change.java
8 1 1