bazelbuild / rules_closure
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 518 units with 5,233 lines of code in units (42.6% of code).
    • 1 very complex units (105 lines of code)
    • 3 complex units (364 lines of code)
    • 9 medium complex units (397 lines of code)
    • 25 simple units (635 lines of code)
    • 480 very simple units (3,732 lines of code)
2% | 6% | 7% | 12% | 71%
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
java2% | 7% | 7% | 12% | 70%
js0% | 0% | 0% | 15% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
java/org53% | 0% | 23% | 11% | 11%
java/com0% | 32% | 20% | 5% | 41%
java/io0% | 5% | 8% | 25% | 60%
closure/testing0% | 0% | 0% | 15% | 84%
javatests/io0% | 0% | 0% | 0% | 100%
javatests/org0% | 0% | 0% | 0% | 100%
javatests/com0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private void emitClosingTagIfRequiredByHtml5()
in java/org/jsoup/nodes/Html5Printer.java
105 58 1
public static HttpRequest readHttpRequest()
in java/io/bazel/rules/closure/http/HttpParser.java
109 36 1
private int run()
in java/com/google/javascript/jscomp/JsCompiler.java
113 32 1
private boolean run()
in java/com/google/javascript/jscomp/JsChecker.java
142 29 0
private void emitOpeningTagIfRequiredByHtml5()
in java/org/jsoup/nodes/Html5Printer.java
45 21 1
private String format()
in java/com/google/javascript/jscomp/JsCheckerErrorFormatter.java
94 20 2
public Webpath normalize()
in java/io/bazel/rules/closure/Webpath.java
55 18 0
public boolean equals()
in java/io/bazel/rules/closure/Webpath.java
34 14 1
public CheckLevel level()
in java/com/google/javascript/jscomp/JsCompilerWarnings.java
36 12 1
private static boolean shouldIgnoreUri()
in java/io/bazel/rules/closure/webfiles/WebfilesValidator.java
12 12 1
public final void visit()
in java/com/google/javascript/jscomp/CheckStrictDeps.java
29 11 3
private int run()
in java/io/bazel/rules/closure/webfiles/WebfilesValidatorProgram.java
59 11 1
public int compareTo()
in java/io/bazel/rules/closure/Webpath.java
33 11 1
function guessContentType()
in closure/testing/phantomjs_harness.js
23 10 1
private static InetAddress getExternalAddressOfLocalSystem()
in java/io/bazel/rules/closure/webfiles/server/NetworkUtils.java
25 9 0
public static Webset load()
in java/io/bazel/rules/closure/webfiles/Webset.java
41 9 2
public Webpath relativize()
in java/io/bazel/rules/closure/Webpath.java
29 9 1
private void loadArguments()
in java/io/bazel/rules/closure/worker/PersistentWorker.java
26 9 1
private Vertex connectStrongly()
in java/io/bazel/rules/closure/Tarjan.java
35 9 1
Multimap validate()
in java/io/bazel/rules/closure/webfiles/WebfilesValidator.java
35 8 3