GerritCodeReview / plugins_batch
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 115 units with 1,042 lines of code in units (56.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (23 lines of code)
    • 1 simple units (22 lines of code)
    • 113 very simple units (997 lines of code)
0% | 0% | 2% | 2% | 95%
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% | 0% | 2% | 2% | 95%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/java/com/google/gerrit/server/util0% | 0% | 20% | 0% | 79%
src/main/java/com/googlesource/gerrit/plugins/batch/cli0% | 0% | 0% | 28% | 71%
src/main/java/com/googlesource/gerrit/plugins/batch0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/batch/ssh0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/batch/util0% | 0% | 0% | 0% | 100%
src/main/java/com/google/gerrit/server/git/meta0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/batch/query0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
src/main/java/com/google/gerrit/entities0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/batch/exception0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
protected void handleResult()
in src/main/java/com/google/gerrit/server/util/RefUpdater.java
23 15 1
public FastForwardMode getFastForwardMode()
in src/main/java/com/googlesource/gerrit/plugins/batch/cli/FastForwardOptions.java
22 6 0
private void closeChange()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchSubmitter.java
33 5 4
public void run()
in src/main/java/com/googlesource/gerrit/plugins/batch/ssh/MergeChangeCommand.java
24 5 0
public MergeStrategy getMergeStrategy()
in src/main/java/com/googlesource/gerrit/plugins/batch/cli/MergeStrategyOption.java
12 5 0
public ObjectId build()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBuilder.java
17 5 1
public ObjectId call()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBranch.java
24 5 0
protected Destination getExistingDestination()
in src/main/java/com/googlesource/gerrit/plugins/batch/Batch.java
11 5 1
public List getBatches()
in src/main/java/com/googlesource/gerrit/plugins/batch/ListBatches.java
14 5 0
public void run()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchCleaner.java
19 5 0
protected boolean isParentMergedInto()
in src/main/java/com/googlesource/gerrit/plugins/batch/ssh/MergeChangeCommand.java
14 4 2
protected Resolver()
in src/main/java/com/googlesource/gerrit/plugins/batch/ssh/MergeChangeCommand.java
11 4 1
public List find()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchStore.java
14 4 1
public void save()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchStore.java
18 4 1
public Batch read()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchStore.java
12 4 1
public static FastForwardMode fromString()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBuilder.java
11 4 1
protected MergeStrategy defaultStrategy()
in src/main/java/com/googlesource/gerrit/plugins/batch/util/MergeBranch.java
10 4 1
protected long interval()
in src/main/java/com/googlesource/gerrit/plugins/batch/BatchCleaner.java
8 4 0
def revision()
in tools/workspace-status.py
9 3 0
def revision()
in tools/workspace_status.py
9 3 0