bazelbuild / rules_scala
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 138 units with 1,770 lines of code in units (22.9% of code).
    • 1 very complex units (98 lines of code)
    • 1 complex units (52 lines of code)
    • 2 medium complex units (111 lines of code)
    • 10 simple units (300 lines of code)
    • 124 very simple units (1,209 lines of code)
5% | 2% | 6% | 16% | 68%
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
scala13% | 7% | 9% | 11% | 58%
java0% | 0% | 3% | 20% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
scala31% | 16% | 0% | 18% | 33%
src0% | 0% | 7% | 16% | 75%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private def getTestsuite()
in scala/support/JUnitXmlReporter.scala
98 56 2
private def idxAdjustmentForRecordedEvents()
in scala/support/JUnitXmlReporter.scala
52 28 1
def run()
in src/scala/io/bazel/rules_scala/scrooge_support/Compiler.scala
70 12 0
protected void copyEntry()
in src/java/io/bazel/rulesscala/jar/JarHelper.java
41 11 3
private def locateSuite()
in scala/support/JUnitXmlReporter.scala
38 10 2
private def toZipEntryPath()
in src/scala/io/bazel/rules_scala/scrooge_support/FocusedZipImporter.scala
18 9 1
public boolean addEntry()
in src/java/io/bazel/rulesscala/jar/JarCreator.java
13 8 2
public void work()
in src/java/io/bazel/rulesscala/scalac/ScalacWorker.java
32 8 1
private static void compileScalaSources()
in src/java/io/bazel/rulesscala/scalac/ScalacWorker.java
43 8 3
def apply()
in scala/support/JUnitXmlReporter.scala
19 7 1
private def listFilesRecursively()
in src/scala/io/bazel/rules_scala/jmh_support/BenchmarkGenerator.scala
9 7 1
private static void persistentWorkerMain()
in src/java/io/bazel/rulesscala/worker/Worker.java
52 7 1
public void addDirectory()
in src/java/io/bazel/rulesscala/jar/JarCreator.java
42 7 1
public static void buildJar()
in src/java/io/bazel/rulesscala/jar/JarCreator.java
34 6 1
private def failureXml()
in scala/support/JUnitXmlReporter.scala
19 5 1
public void close()
in src/java/io/bazel/rulesscala/worker/WorkerTest.java
21 5 0
private static List extractJar()
in src/java/io/bazel/rulesscala/scalac/ScalacWorker.java
26 5 3
def main()
in scala/scalafmt/scalafmt/ScalafmtWorker.scala
23 4 1
private def generateJmhBenchmark()
in src/scala/io/bazel/rules_scala/jmh_support/BenchmarkGenerator.scala
40 4 5
private def classByPath()
in src/scala/io/bazel/rules_scala/jmh_support/BenchmarkGenerator.scala
19 4 2