GerritCodeReview / prolog-cafe
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 912 units with 10,016 lines of code in units (47.2% of code).
    • 0 very complex units (0 lines of code)
    • 10 complex units (750 lines of code)
    • 50 medium complex units (2,472 lines of code)
    • 72 simple units (1,898 lines of code)
    • 780 very simple units (4,896 lines of code)
0% | 7% | 24% | 18% | 48%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
java0% | 7% | 24% | 18% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
java/com/googlecode/prolog_cafe/lang0% | 12% | 14% | 11% | 62%
src/lang0% | 12% | 14% | 11% | 62%
java/com/googlecode/prolog_cafe/builtin0% | 5% | 35% | 31% | 27%
src/builtin0% | 5% | 35% | 31% | 27%
java/com/googlecode/prolog_cafe/compiler0% | 0% | 30% | 6% | 63%
src/compiler0% | 0% | 39% | 8% | 52%
java/com/googlecode/prolog_cafe/repl0% | 0% | 30% | 0% | 69%
src/repl0% | 0% | 30% | 0% | 69%
java/com/googlecode/prolog_cafe/exceptions0% | 0% | 0% | 0% | 100%
src/exceptions0% | 0% | 0% | 0% | 100%
src/compiler/am2j0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex 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
protected static boolean convertible()
in java/com/googlecode/prolog_cafe/lang/Term.java
45 31 2
45 31 2
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 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 void main()
in java/com/googlecode/prolog_cafe/compiler/Compiler.java
71 23 1
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_close_2.java
95 23 1
public static void main()
in src/compiler/Compiler.java
71 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 boolean isSymbol()
in java/com/googlecode/prolog_cafe/lang/Token.java
25 19 1
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_atom_chars_2.java
50 19 1
public Operation exec()
in java/com/googlecode/prolog_cafe/builtin/PRED_number_chars_2.java
55 19 1
public static boolean isSymbol()
in src/lang/Token.java
25 19 1