GerritCodeReview / plugins_owners
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 146 units with 1,155 lines of code in units (57.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (110 lines of code)
    • 9 medium size units (259 lines of code)
    • 22 small units (320 lines of code)
    • 113 very small units (466 lines of code)
0% | 9% | 22% | 27% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 9% | 22% | 27% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
owners-common/src0% | 9% | 22% | 21% | 46%
owners-autoassign/src0% | 18% | 26% | 33% | 20%
owners/src0% | 0% | 17% | 38% | 44%
owners-api/src0% | 0% | 0% | 0% | 100%
plugins/owners-api0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private OwnersMap fetchOwners()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/PathOwners.java
57 7 1
public void addReviewers()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/ReviewerManager.java
53 6 3
private PathOwnersEntry resolvePathEntry()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/PathOwners.java
46 8 5
private Set findUserOrEmail()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/AccountsImpl.java
35 5 1
private Optional toMatcher()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/ConfigurationParser.java
34 1 1
public PathOwnersEntry()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/PathOwnersEntry.java
26 3 6
public void processEvent()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/GitRefListener.java
26 5 4
private void handleGitReferenceUpdated()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/GitRefListener.java
25 6 1
private boolean isChangeSetReadyForReview()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/GitRefListener.java
24 6 3
public Operation exec()
in owners/src/main/java/gerrit_owners/PRED_matcher_owner_2.java
22 4 1
public Operation exec()
in owners/src/main/java/gerrit_owners/PRED_owner_2.java
21 4 1
public GitRefListener()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/GitRefListener.java
20 1 9
private PatchList getPatchList()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/GitRefListener.java
20 4 3
private Set findAccountsInGroup()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/AccountsImpl.java
19 3 1
public void onGitReferenceUpdated()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/GitRefListener.java
19 5 1
protected void configure()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/AutoassignConfigModule.java
17 1 0
public ReviewerManager()
in owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/ReviewerManager.java
17 1 8
public static synchronized void initialize()
in owners/src/main/java/com/googlesource/gerrit/owners/OwnersStoredValues.java
16 2 1
public Optional getOwnersConfig()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/ConfigurationParser.java
15 2 1
private void processMatcherPerPath()
in owners-common/src/main/java/com/googlesource/gerrit/owners/common/PathOwners.java
15 3 4