aws-samples / datatype-validation-with-apache-spark
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 20 units with 299 lines of code in units (60.2% 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)
    • 2 simple units (76 lines of code)
    • 18 very simple units (223 lines of code)
0% | 0% | 0% | 25% | 74%
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
scala0% | 0% | 0% | 25% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/scala/com/awsproserve/validation0% | 0% | 0% | 20% | 79%
src/main/scala/com/awsproserve/parser0% | 0% | 0% | 52% | 47%
src/main/scala/com/awsproserve/common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def validateDataTypes()
in src/main/scala/com/awsproserve/validation/Delimited.scala
46 8 3
def verifyFormatExists()
in src/main/scala/com/awsproserve/parser/DelimitedSchema.scala
30 7 1
def isInteger()
in src/main/scala/com/awsproserve/validation/DataType.scala
14 5 3
def isDouble()
in src/main/scala/com/awsproserve/validation/DataType.scala
15 5 3
def isBigInt()
in src/main/scala/com/awsproserve/validation/DataType.scala
16 5 3
def isNullValue()
in src/main/scala/com/awsproserve/validation/DataType.scala
18 5 1
def isDate()
in src/main/scala/com/awsproserve/validation/DataType.scala
13 5 3
def isDecimal()
in src/main/scala/com/awsproserve/validation/DataType.scala
16 5 3
def isString()
in src/main/scala/com/awsproserve/validation/DataType.scala
7 3 3
def validate()
in src/main/scala/com/awsproserve/validation/Delimited.scala
27 3 3
def validateInvalidColumnLength()
in src/main/scala/com/awsproserve/validation/Delimited.scala
26 3 4
def caseClassListToMap()
in src/main/scala/com/awsproserve/common/Utils.scala
7 2 1
def trimString()
in src/main/scala/com/awsproserve/common/Utils.scala
6 2 2
def typeCastDataFrame()
in src/main/scala/com/awsproserve/validation/Delimited.scala
16 2 2
def verifyAcceptedDataType()
in src/main/scala/com/awsproserve/parser/DelimitedSchema.scala
8 2 1
def parse()
in src/main/scala/com/awsproserve/parser/DelimitedText.scala
16 2 2
def caseClassToMap()
in src/main/scala/com/awsproserve/common/Utils.scala
6 1 1
def isTimeStamp()
in src/main/scala/com/awsproserve/validation/DataType.scala
3 1 3
def getDataFrameSchema()
in src/main/scala/com/awsproserve/validation/Delimited.scala
6 1 1
def readFileAsRDD()
in src/main/scala/com/awsproserve/parser/DelimitedText.scala
3 1 2