GerritCodeReview / plugins_events
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 141 units with 985 lines of code in units (67.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 5 simple units (96 lines of code)
    • 136 very simple units (889 lines of code)
0% | 0% | 0% | 9% | 90%
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% | 0% | 9% | 90%
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/googlesource/gerrit/plugins/events/fsstore0% | 0% | 0% | 10% | 89%
src/main/java/com/googlesource/gerrit/plugins/events0% | 0% | 0% | 7% | 92%
tools0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public long spinIncrement()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FsSequence.java
28 8 1
protected static BranchNameKey getBranch()
in src/main/java/com/googlesource/gerrit/plugins/events/BranchHelper.java
19 6 1
public void trim()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FsStore.java
18 6 1
public static boolean tryRecursiveDeleteEntriesOlderThan()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Fs.java
15 6 3
public static boolean isAllEntriesOlderThan()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Fs.java
16 6 2
protected void parseId()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
18 5 1
protected void flushBatch()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
19 5 0
public static boolean renameAndDeleteEntriesOlderThan()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FsTransaction.java
16 5 4
public static BranchNameKey getBranch()
in src/main/java/com/googlesource/gerrit/plugins/events/BranchHelper.java
14 4 1
protected void initSent()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
12 4 0
protected void startFlush()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
7 4 0
protected void flush()
in src/main/java/com/googlesource/gerrit/plugins/events/StreamEvents.java
12 4 3
public String get()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FsStore.java
10 4 1
public static boolean isStaleFileHandleInCausalChain()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Nfs.java
9 4 1
protected void initSerializer()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/FileValue.java
9 4 1
protected UniqueUpdate spinSubmit()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/EventSequence.java
18 4 2
protected T spinGet()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/UpdatableFileValue.java
16 4 0
protected void createAndProposeNext()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/UpdatableFileValue.java
12 4 0
protected void commit()
in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/UpdatableFileValue.java
9 4 0
def revision()
in tools/workspace_status.py
9 3 0