GerritCodeReview / plugins_code-owners
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 3,158 units with 38,752 lines of code in units (76.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (845 lines of code)
    • 45 simple units (1,807 lines of code)
    • 3,105 very simple units (36,100 lines of code)
0% | 0% | 2% | 4% | 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% | 2% | 4% | 93%
js0% | 0% | 1% | 13% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
java/com/google/gerrit/plugins/codeowners/restapi0% | 0% | 26% | 12% | 61%
java/com/google/gerrit/plugins/codeowners/backend0% | 0% | 4% | 14% | 80%
java/com/google/gerrit/plugins/codeowners/validation0% | 0% | 13% | 44% | 41%
ui0% | 0% | 1% | 13% | 85%
javatests/com/google/gerrit/plugins/codeowners/acceptance0% | 0% | 0% | <1% | 99%
javatests/com/google/gerrit/plugins/codeowners/backend0% | 0% | 0% | <1% | 99%
java/com/google/gerrit/plugins/codeowners/testing0% | 0% | 0% | 0% | 100%
javatests/com/google/gerrit/plugins/codeowners/restapi0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/codeowners/api0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/codeowners/acceptance0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/codeowners/common0% | 0% | 0% | 0% | 100%
javatests/com/google/gerrit/plugins/codeowners/util0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/codeowners/metrics0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/codeowners/util0% | 0% | 0% | 0% | 100%
java/com/google/gerrit/plugins/codeowners/module0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public Response apply()
in java/com/google/gerrit/plugins/codeowners/restapi/CheckCodeOwner.java
180 25 1
public Response apply()
in java/com/google/gerrit/plugins/codeowners/restapi/PutCodeOwnerProjectConfig.java
148 21 2
private Optional buildMessageForCodeOwnerApproval()
in java/com/google/gerrit/plugins/codeowners/backend/OnCodeOwnerApproval.java
111 17 7
async getLoggedInUserInitialRole()
in ui/code-owners-service.js
35 14 0
private PathCodeOwnerStatus getPathCodeOwnerStatus()
in java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerApprovalCheck.java
108 13 11
static ImmutableSet splitGlobs()
in java/com/google/gerrit/plugins/codeowners/backend/findowners/FindOwnersCodeOwnerConfigParser.java
36 12 1
private Optional validateCodeOwnerConfigReference()
in java/com/google/gerrit/plugins/codeowners/validation/CodeOwnerConfigValidator.java
106 12 6
protected Response applyImpl()
in java/com/google/gerrit/plugins/codeowners/restapi/AbstractGetCodeOwnersForPath.java
121 12 1
26 10 1
public Optional evaluate()
in java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerSubmitRule.java
72 10 1
public void visit()
in java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigScanner.java
62 10 4
private boolean isApproved()
in java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerApprovalCheck.java
41 10 5
ImmutableList validateProjectLevelConfig()
in java/com/google/gerrit/plugins/codeowners/backend/config/BackendConfig.java
57 10 2
private Optional validateCodeOwnerConfig()
in java/com/google/gerrit/plugins/codeowners/validation/CodeOwnerConfigValidator.java
103 10 5
private void validateInput()
in java/com/google/gerrit/plugins/codeowners/restapi/CheckCodeOwner.java
38 10 1
_computeIsOverriden()
in ui/owner-requirement.js
17 9 2
private CodeOwnerSet parsePerFileLine()
in java/com/google/gerrit/plugins/codeowners/backend/findowners/FindOwnersCodeOwnerConfigParser.java
55 9 1
private void visit()
in java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigHierarchy.java
52 9 6
public static Optional createConsistencyProblemInfo()
in java/com/google/gerrit/plugins/codeowners/restapi/CheckCodeOwnerConfigFiles.java
32 9 2
_getStatusCount()
in ui/owner-requirement.js
21 8 1