GerritCodeReview / bazlets
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 23 units with 327 lines of code in units (15.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (72 lines of code)
    • 0 medium complex units (0 lines of code)
    • 4 simple units (80 lines of code)
    • 18 very simple units (175 lines of code)
0% | 22% | 0% | 24% | 53%
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
py0% | 26% | 0% | 29% | 44%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools/eclipse0% | 60% | 0% | 0% | 40%
tools/js0% | 0% | 0% | 100% | 0%
tools0% | 0% | 0% | 30% | 69%
tools/sonar0% | 0% | 0% | 28% | 71%
lib/prolog/java0% | 0% | 0% | 0% | 100%
tools/maven0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def gen_classpath()
in tools/eclipse/project.py
72 26 1
def extract()
in tools/js/run_npm_binary.py
24 8 3
def download_properties()
in tools/download_file.py
16 7 1
def main()
in tools/js/run_npm_binary.py
27 7 1
def guess_maven_group_id()
in tools/sonar/gen_sonar_project_properties.py
13 7 2
private static void add()
in lib/prolog/java/PrologCompiler.java
25 5 3
def find_bazel()
in tools/eclipse/project.py
20 5 0
def get_plugin_version()
in tools/sonar/gen_sonar_project_properties.py
17 5 1
def safe_mkdirs()
in tools/download_file.py
8 4 1
def resolve_url()
in tools/util.py
14 4 2
def excluded()
in tools/eclipse/project.py
6 4 1
private static File tmpdir()
in lib/prolog/java/PrologCompiler.java
7 3 1
def hash_file()
in tools/util.py
8 3 2
def _build_bazel_cmd()
in tools/eclipse/project.py
7 3 1
def _query_classpath()
in tools/eclipse/project.py
8 3 0
public static void main()
in lib/prolog/java/PrologCompiler.java
10 2 1
private static void jar()
in lib/prolog/java/PrologCompiler.java
13 2 2
def cache_entry()
in tools/download_file.py
7 2 1
def generate_project_properties()
in tools/sonar/gen_sonar_project_properties.py
13 2 4
def retrieve_ext_location()
in tools/eclipse/project.py
2 1 0