GerritCodeReview / plugins_automerger
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 75 units with 1,146 lines of code in units (73.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (50 lines of code)
    • 8 simple units (268 lines of code)
    • 66 very simple units (828 lines of code)
0% | 0% | 4% | 23% | 72%
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% | 4% | 24% | 70%
ts0% | 0% | 0% | 15% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/java/com/googlesource/gerrit/plugins/automerger0% | 0% | 4% | 24% | 70%
web0% | 0% | 0% | 15% | 84%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void onCommentAdded()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
50 11 1
public void onTopicEdited()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
56 10 1
private void createDownstreamMerges()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
73 10 1
protected Set getMissingDownstreamMerges()
in src/main/java/com/googlesource/gerrit/plugins/automerger/MergeValidator.java
37 8 1
private styleRelatedChanges()
in web/automerger.ts
18 7 0
public void addParameter()
in src/main/java/com/googlesource/gerrit/plugins/automerger/QueryBuilder.java
13 7 2
public Set getUpstreamBranches()
in src/main/java/com/googlesource/gerrit/plugins/automerger/ConfigLoader.java
22 6 2
private String getBaseChangeId()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
21 6 2
public Set getProjects()
in src/main/java/com/googlesource/gerrit/plugins/automerger/ManifestReader.java
28 6 0
public Set getDownstreamBranches()
in src/main/java/com/googlesource/gerrit/plugins/automerger/ConfigLoader.java
18 5 2
private void abandonDownstream()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
20 5 2
private String getPreviousRevision()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
17 5 2
private String getTopic()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
17 5 1
private boolean isAlreadyMerged()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
17 5 2
private onAutomergeChange()
in web/automerger.ts
26 4 0
private createMergeButton()
in web/automerger.ts
21 4 1
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/automerger/AutomergeChangeAction.java
30 4 2
public void createMergesAndHandleConflicts()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
34 4 1
private List getExistingMergesOnBranch()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
21 4 3
private ChangeInfo getOriginalChange()
in src/main/java/com/googlesource/gerrit/plugins/automerger/DownstreamCreator.java
15 4 2