GerritCodeReview / gerrit-ci-scripts
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 18 units with 316 lines of code in units (11.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (31 lines of code)
    • 2 simple units (98 lines of code)
    • 15 very simple units (187 lines of code)
0% | 0% | 9% | 31% | 59%
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
groovy0% | 0% | 9% | 31% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
vars0% | 0% | 11% | 36% | 52%
jenkins-docker/server0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 18 most complex units
Unit# linesMcCabe index# params
def collectBuildModes()
in vars/gerritPipeline.groovy
31 13 0
def getLabelValue()
in vars/gerritPipeline.groovy
18 9 2
def call()
in vars/pluginPipeline.groovy
80 8 1
def getCheckResultFromBuild()
in vars/gerritPipeline.groovy
12 5 0
def prepareBuildsForMode()
in vars/gerritPipeline.groovy
34 5 3
def setResult()
in vars/gerritPipeline.groovy
9 5 2
def call()
in vars/gerritPipeline.groovy
31 4 1
def findCodestyleFilesInLog()
in vars/gerritPipeline.groovy
12 4 1
def extractCredFromFile()
in jenkins-docker/server/setCredentials.groovy
21 3 1
def buildVerificationJob()
in vars/gerritPipeline.groovy
3 3 0
def findFlakyBuilds()
in vars/gerritPipeline.groovy
14 3 0
def collectBuilds()
in vars/gerritPipeline.groovy
12 2 0
def addCredentials()
in jenkins-docker/server/setCredentials.groovy
6 1 1
def addStringCredential()
in jenkins-docker/server/setCredentials.groovy
10 1 3
def addUserPasswordCredential()
in jenkins-docker/server/setCredentials.groovy
10 1 4
def hasChangeNumber()
in vars/gerritPipeline.groovy
3 1 0
def postCheck()
in vars/gerritPipeline.groovy
3 1 1
def queryChangedFiles()
in vars/gerritPipeline.groovy
7 1 1