GerritCodeReview / plugins_find-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 181 units with 1,956 lines of code in units (66.0% of code).
    • 1 very long units (115 lines of code)
    • 2 long units (117 lines of code)
    • 22 medium size units (678 lines of code)
    • 34 small units (527 lines of code)
    • 122 very small units (519 lines of code)
5% | 5% | 34% | 26% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js20% | 0% | 41% | 15% | 22%
java0% | 8% | 31% | 31% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources/static20% | 0% | 41% | 15% | 22%
java/com/googlesource/gerrit/plugins/findowners0% | 8% | 32% | 31% | 28%
java/find_owners0% | 0% | 0% | 70% | 29%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function popupFindOwnersPage()
in src/main/resources/static/find-owners.js
115 2 4
OwnersDb get()
in src/main/java/com/googlesource/gerrit/plugins/findowners/Cache.java
65 4 10
void checkIncludeOrFile()
in src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersValidator.java
52 10 4
function createGroups()
in src/main/resources/static/find-owners.js
47 12 0
void parseLine()
in src/main/java/com/googlesource/gerrit/plugins/findowners/Parser.java
45 14 4
void addPreferredEmails()
in src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersDb.java
43 9 1
private void includeFile()
in src/main/java/com/googlesource/gerrit/plugins/findowners/Parser.java
40 5 5
public static String getRepoFile()
in src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersDb.java
38 10 9
public Response getChangeData()
in src/main/java/com/googlesource/gerrit/plugins/findowners/Action.java
36 4 2
void checkEmails()
in src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersValidator.java
36 11 1
function popupWindow()
in src/main/resources/static/find-owners.js
35 5 1
void addFile()
in src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersDb.java
33 7 6
function checkAddRemoveLists()
in src/main/resources/static/find-owners.js
30 7 0
function onShowChangePolyGerrit()
in src/main/resources/static/find-owners.js
29 7 2
function onSubmit()
in src/main/resources/static/find-owners.js
28 6 2
function updateDivContent()
in src/main/resources/static/find-owners.js
27 5 0
public Description getDescription()
in src/main/java/com/googlesource/gerrit/plugins/findowners/Action.java
26 7 1
private void addOwnerWeights()
in src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersDb.java
26 6 6
private static void visitChangedEntries()
in src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersValidator.java
25 7 3
function addOwner()
in src/main/resources/static/find-owners.js
24 3 2