GerritCodeReview / jgit
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 10,927 units with 103,771 lines of code in units (72.3% of code).
    • 41 very long units (5,893 lines of code)
    • 167 long units (11,205 lines of code)
    • 918 medium size units (28,322 lines of code)
    • 1,462 small units (21,257 lines of code)
    • 8,339 very small units (37,094 lines of code)
5% | 10% | 27% | 20% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java5% | 10% | 27% | 20% | 35%
rb0% | 0% | 0% | 42% | 57%
py0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
org.eclipse.jgit6% | 10% | 26% | 19% | 36%
org.eclipse.jgit.gpg.bc15% | 35% | 17% | 15% | 15%
org.eclipse.jgit.pgm4% | 19% | 34% | 21% | 19%
org.eclipse.jgit.ssh.apache0% | 11% | 36% | 24% | 27%
org.eclipse.jgit.ui0% | 27% | 17% | 25% | 29%
org.eclipse.jgit.lfs0% | 5% | 25% | 28% | 41%
org.eclipse.jgit.http.server0% | 5% | 31% | 16% | 46%
org.eclipse.jgit.ssh.jsch0% | 10% | 27% | 16% | 46%
org.eclipse.jgit.junit0% | 0% | 30% | 24% | 45%
org.eclipse.jgit.junit.ssh0% | 0% | 33% | 36% | 29%
org.eclipse.jgit.ssh.apache.agent0% | 0% | 45% | 31% | 22%
org.eclipse.jgit.lfs.server0% | 0% | 24% | 39% | 35%
org.eclipse.jgit.junit.http0% | 0% | 15% | 27% | 57%
org.eclipse.jgit.http.apache0% | 0% | 28% | 23% | 47%
org.eclipse.jgit.archive0% | 0% | 26% | 25% | 48%
org.eclipse.jgit.ant0% | 0% | 24% | 33% | 42%
org.eclipse.jgit.benchmarks0% | 0% | 0% | 30% | 69%
tools0% | 0% | 0% | 59% | 40%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static int check()
in org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java
369 129 1
private Object resolve()
in org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
299 87 2
protected boolean processEntry()
in org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
221 68 7
private void findObjectsToPack()
in org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
197 60 5
public MergeResult call()
in org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
193 28 0
void processEntry()
in org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
193 87 4
public boolean diff()
in org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java
188 65 5
public PullResult call()
in org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
174 30 0
public MergeResult merge()
in org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
168 35 4
void copyAsIs()
in org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
160 37 4
private void copyAsIs2()
in org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
156 36 4
static Pattern convertGlob()
in org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java
153 56 1
public RevCommit call()
in org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
147 29 0
private void applyText()
in org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
138 32 6
public SignatureVerification verify()
in org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSignatureVerifier.java
135 34 2
public Ref call()
in org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
131 28 0
private void sendPack()
in org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
129 36 8
public Ref call()
in org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
128 30 0
private Pack writePack()
in org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
125 21 5
void sendRequest()
in org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
124 31 0