GerritCodeReview / prolog-cafe
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 912 units with 10,016 lines of code in units (47.2% of code).
    • 2 very long units (204 lines of code)
    • 26 long units (1,760 lines of code)
    • 102 medium size units (3,264 lines of code)
    • 96 small units (1,304 lines of code)
    • 686 very small units (3,484 lines of code)
2% | 17% | 32% | 13% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java2% | 17% | 32% | 13% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
java/com/googlecode/prolog_cafe/lang5% | 10% | 23% | 16% | 44%
src/lang5% | 10% | 23% | 16% | 44%
java/com/googlecode/prolog_cafe/builtin0% | 23% | 50% | 6% | 19%
src/builtin0% | 23% | 50% | 6% | 19%
java/com/googlecode/prolog_cafe/compiler0% | 30% | 10% | 41% | 18%
src/compiler0% | 39% | 13% | 31% | 16%
java/com/googlecode/prolog_cafe/repl0% | 30% | 0% | 32% | 36%
src/repl0% | 30% | 0% | 32% | 36%
src/compiler/am2j0% | 0% | 0% | 75% | 25%
java/com/googlecode/prolog_cafe/exceptions0% | 0% | 0% | 3% | 96%
src/exceptions0% | 0% | 0% | 3% | 96%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static NumberTerm evaluate()
in java/com/googlecode/prolog_cafe/lang/Arithmetic.java
102 48 1
public static NumberTerm evaluate()
in src/lang/Arithmetic.java
102 48 1
public static int read_token()
in java/com/googlecode/prolog_cafe/lang/Token.java
98 37 2
public static int read_token()
in src/lang/Token.java
98 37 2
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_close_2.java
95 23 1
public Operation exec()
in src/builtin/PRED_close_2.java
95 23 1
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_open_4.java
90 21 1
public Operation exec()
in src/builtin/PRED_open_4.java
90 21 1
public static void main()
in java/com/googlecode/prolog_cafe/compiler/Compiler.java
71 23 1
public static void main()
in src/compiler/Compiler.java
71 23 1
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_$univ_2.java
68 30 1
public Operation exec()
in src/builtin/PRED_$univ_2.java
68 30 1
public static void main()
in java/com/googlecode/prolog_cafe/repl/PrologMain.java
65 15 1
public static void main()
in src/repl/PrologMain.java
65 15 1
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_functor_3.java
62 28 1
public Operation exec()
in src/builtin/PRED_functor_3.java
62 28 1
public static int read_number()
in java/com/googlecode/prolog_cafe/lang/Token.java
61 15 3
public static int read_number()
in src/lang/Token.java
61 15 3
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_$hash_remove_first_3.java
56 15 1
public Operation exec()
in src/builtin/PRED_$hash_remove_first_3.java
56 15 1