GerritCodeReview / plugins_gerrit-support
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 161 units with 827 lines of code in units (58.6% 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)
    • 4 simple units (101 lines of code)
    • 157 very simple units (726 lines of code)
0% | 0% | 0% | 12% | 87%
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% | 13% | 86%
scala0% | 0% | 0% | 6% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/java/org/jutils/jhardware/info/network0% | 0% | 0% | 43% | 56%
src/main/java/org/jutils/jhardware/info/os0% | 0% | 0% | 41% | 58%
src/main/java/org/jutils/jhardware/util0% | 0% | 0% | 24% | 75%
src/main/scala/com/googlesource/gerrit/plugins/support0% | 0% | 0% | 6% | 93%
src/main/java/org/jutils/jhardware/model0% | 0% | 0% | 0% | 100%
src/main/java/org/jutils/jhardware/info/processor0% | 0% | 0% | 0% | 100%
src/main/java/org/jutils/jhardware/info/memory0% | 0% | 0% | 0% | 100%
src/main/java/org/jutils/jhardware0% | 0% | 0% | 0% | 100%
src/main/java/org/jutils/jhardware/info0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static void updateNetworkData()
in src/main/java/org/jutils/jhardware/info/network/unix/UnixNetworkInfo.java
37 7 3
protected Map parseInfo()
in src/main/java/org/jutils/jhardware/info/os/unix/UnixOSInfo.java
30 7 0
def apply()
in src/main/scala/com/googlesource/gerrit/plugins/support/SupportBundle.scala
10 6 1
private static String readData()
in src/main/java/org/jutils/jhardware/util/HardwareInfoUtils.java
24 6 1
private def requireAdministrateServerPermissions()
in src/main/scala/com/googlesource/gerrit/plugins/support/GerritSupportServlet.scala
7 5 1
private static HardwareInfo getUnixInfo()
in src/main/java/org/jutils/jhardware/info/HardwareFactory.java
14 5 1
protected Map parseInfo()
in src/main/java/org/jutils/jhardware/info/network/unix/UnixNetworkInfo.java
21 4 0
implicit def convertAny2CommandResult()
in src/main/scala/com/googlesource/gerrit/plugins/support/GerritSupportCommands.scala
5 3 1
protected NetworkInfo buildFromDataMap()
in src/main/java/org/jutils/jhardware/info/network/AbstractNetworkInfo.java
21 3 1
protected MemoryInfo buildFromDataMap()
in src/main/java/org/jutils/jhardware/info/memory/AbstractMemoryInfo.java
10 3 1
protected Map parseInfo()
in src/main/java/org/jutils/jhardware/info/memory/unix/UnixMemoryInfo.java
10 3 0
protected Map parseInfo()
in src/main/java/org/jutils/jhardware/info/processor/unix/UnixProcessorInfo.java
10 3 0
protected ProcessorInfo buildFromDataMap()
in src/main/java/org/jutils/jhardware/info/processor/AbstractProcessorInfo.java
16 3 1
protected OSInfo buildFromDataMap()
in src/main/java/org/jutils/jhardware/info/os/AbstractOSInfo.java
11 3 1
public static boolean isUnix()
in src/main/java/org/jutils/jhardware/util/OSDetector.java
3 3 0
public static List readFile()
in src/main/java/org/jutils/jhardware/util/HardwareInfoUtils.java
13 3 1
public static String extractText()
in src/main/java/org/jutils/jhardware/util/HardwareInfoUtils.java
12 3 2
implicit def unwrapResultName()
in src/main/scala/com/googlesource/gerrit/plugins/support/GerritSupportCommands.scala
5 2 1
override def getBytes: Array[Byte] = gson.toJson()
in src/main/scala/com/googlesource/gerrit/plugins/support/GerritSupportCommands.scala
3 2 1
def getAsPath()
in src/main/scala/com/googlesource/gerrit/plugins/support/SitePathsWrapper.scala
10 2 1