GerritCodeReview / plugins_reviewnotes
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 26 units with 343 lines of code in units (59.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (176 lines of code)
    • 7 small units (102 lines of code)
    • 13 very small units (65 lines of code)
0% | 0% | 51% | 29% | 18%
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% | 51% | 29% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
reviewnotes0% | 0% | 51% | 29% | 18%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void createNotes()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
39 9 4
public void onGitReferenceUpdated()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/RefUpdateListener.java
31 2 1
private void createCodeReviewNote()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
31 8 3
private void createReviewNotes()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/RefUpdateListener.java
26 3 1
private void appendUserData()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/HeaderFormatter.java
25 7 2
private void export()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
24 2 2
public void run()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
18 4 0
private void markUninteresting()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
18 9 4
void commitNotes()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
15 3 0
protected void run()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
14 3 0
void createNotes()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
14 3 2
private ObjectId createNoteContent()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
12 3 2
private PatchSet loadPatchSet()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
11 4 2
private ListMultimap mergedChanges()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
10 2 0
void appendApproval()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/HeaderFormatter.java
8 1 4
private ObjectInserter getInserter()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
6 2 0
private NoteMap getNotes()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
6 2 0
private StringBuilder getMessage()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
6 2 0
void appendSubmittedBy()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/HeaderFormatter.java
5 1 2
void appendReviewedOn()
in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/HeaderFormatter.java
5 1 3