GerritCodeReview / plugins_checks
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 1,099 units with 10,641 lines of code in units (67.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (166 lines of code)
    • 18 simple units (548 lines of code)
    • 1,076 very simple units (9,927 lines of code)
0% | 0% | 1% | 5% | 93%
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% | 1% | 5% | 93%
ts0% | 0% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
java/com/google/gerrit/plugins/checks/api0% | 0% | 12% | 14% | 73%
java/com/google/gerrit/plugins/checks/db0% | 0% | 2% | 7% | 90%
java/com/google/gerrit/plugins/checks0% | 0% | 0% | 16% | 83%
javatests/com/google/gerrit/plugins/checks/acceptance0% | 0% | 0% | 1% | 98%
java/com/google/gerrit/plugins/checks/acceptance0% | 0% | 0% | 10% | 89%
web0% | 0% | 0% | 7% | 92%
java/com/google/gerrit/plugins/checks/email0% | 0% | 0% | 24% | 75%
javatests/com/google/gerrit/plugins/checks/db0% | 0% | 0% | 0% | 100%
javatests/com/google/gerrit/plugins/checks0% | 0% | 0% | 0% | 100%
javatests/com/google/gerrit/plugins/checks/api0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/checks/testing0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/checks/index0% | 0% | 0% | 0% | 100%
javatests/com/google/gerrit/plugins/checks/rules0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/checks/rules0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public boolean equals()
in java/com/google/gerrit/plugins/checks/api/CheckInfo.java
22 17 1
boolean applyUpdate()
in java/com/google/gerrit/plugins/checks/db/NoteDbCheck.java
33 13 1
public Response apply()
in java/com/google/gerrit/plugins/checks/api/CreateChecker.java
53 12 2
public Response apply()
in java/com/google/gerrit/plugins/checks/api/UpdateChecker.java
42 11 2
public boolean equals()
in java/com/google/gerrit/plugins/checks/api/CheckerInfo.java
16 11 1
private void invalidateChecker()
in java/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckerOperationsImpl.java
44 10 1
validateRequest()
in web/gr-create-checkers-dialog.ts
37 9 0
public boolean equals()
in java/com/google/gerrit/plugins/checks/api/CheckInput.java
14 9 1
private String allChecksOverviewHtml()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
50 8 2
private void maybeSendEmail()
in java/com/google/gerrit/plugins/checks/ChecksUpdate.java
54 8 5
public static CheckStateCount create()
in java/com/google/gerrit/plugins/checks/api/CombinedCheckState.java
36 8 1
private static void checkOperators()
in java/com/google/gerrit/plugins/checks/CheckerQuery.java
21 8 1
private boolean updateNotesMap()
in java/com/google/gerrit/plugins/checks/db/NoteDbChecksUpdate.java
46 8 8
private String allChecksOverviewText()
in javatests/com/google/gerrit/plugins/checks/acceptance/api/ChecksEmailIT.java
35 7 1
private static Predicate validateQuery()
in java/com/google/gerrit/plugins/checks/api/QueryPendingChecks.java
28 7 1
public Response apply()
in java/com/google/gerrit/plugins/checks/api/PostCheck.java
39 7 2
protected boolean onSave()
in java/com/google/gerrit/plugins/checks/db/CheckersByRepositoryNotes.java
28 7 1
public static String clean()
in java/com/google/gerrit/plugins/checks/UrlValidator.java
20 7 1
protected void setupSoyContext()
in java/com/google/gerrit/plugins/checks/email/CombinedCheckStateUpdatedSender.java
21 7 0
private static CombinedCheckState combine()
in java/com/google/gerrit/plugins/checks/api/CombinedCheckState.java
16 6 1