GerritCodeReview / plugins_rename-project
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 88 units with 900 lines of code in units (58.4% 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)
    • 2 simple units (100 lines of code)
    • 86 very simple units (800 lines of code)
0% | 0% | 0% | 11% | 88%
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% | 11% | 88%
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/renameproject0% | 0% | 0% | 10% | 89%
src/main/java/com/googlesource/gerrit/plugins/renameproject/database0% | 0% | 0% | 32% | 67%
src/main/java/com/googlesource/gerrit/plugins/renameproject/monitor0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/renameproject/conditions0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/renameproject/fs0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void performRevert()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RevertRenameProject.java
53 8 5
private void updateWatchEntries()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/database/DatabaseRenameHandler.java
47 6 1
private void logPerformedStep()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
17 5 3
public OutputStream newErrorBufferStream()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/SshHelper.java
24 5 0
public void run()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameCommand.java
29 5 0
public void onRename()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLog.java
27 5 4
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
13 4 2
protected boolean canRename()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
7 4 1
void doRename()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
43 4 4
void replicateRename()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
17 4 3
private void audit()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLog.java
21 4 5
protected void sendUpdate()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/monitor/CommandProgressMonitor.java
18 4 0
private void assertIsNotSubscribed()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/conditions/RenamePreconditions.java
19 4 1
private void assertNewRepoNotExists()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/conditions/RenamePreconditions.java
11 4 1
def revision()
in tools/workspace_status.py
9 3 0
private void assertNewNameNotNull()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
5 3 1
private boolean isOwner()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
15 3 1
private boolean continueRename()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameCommand.java
16 3 2
public void updateIndex()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/database/IndexUpdateHandler.java
19 3 3
public List rename()
in src/main/java/com/googlesource/gerrit/plugins/renameproject/database/DatabaseRenameHandler.java
28 3 3