bazelbuild / rules_java
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 8 units with 145 lines of code in units (9.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (77 lines of code)
    • 4 small units (63 lines of code)
    • 1 very small units (5 lines of code)
0% | 0% | 53% | 43% | 3%
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% | 53% | 43% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
toolchains0% | 0% | 53% | 43% | 3%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
static boolean dumpJDK9AndNewerBootClassPath()
in toolchains/DumpPlatformClassPath.java
33 3 3
private static void writeClassPathJars()
in toolchains/DumpPlatformClassPath.java
23 5 2
private static void writeEntries()
in toolchains/DumpPlatformClassPath.java
21 3 2
private static List getBootClassPathJars()
in toolchains/DumpPlatformClassPath.java
17 5 1
public static void main()
in toolchains/DumpPlatformClassPath.java
16 4 1
private static void addEntry()
in toolchains/DumpPlatformClassPath.java
16 2 3
static int hostMajorVersion()
in toolchains/DumpPlatformClassPath.java
14 4 0
static boolean dumpJDK8BootClassPath()
in toolchains/DumpPlatformClassPath.java
5 1 2