aws-cloudformation / aws-cloudformation-resource-providers-iot
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 294 units with 4,667 lines of code in units (60.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (243 lines of code)
    • 33 simple units (1,101 lines of code)
    • 257 very simple units (3,323 lines of code)
0% | 0% | 5% | 23% | 71%
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% | 5% | 23% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
aws-iot-accountauditconfiguration0% | 0% | 33% | 4% | 61%
aws-iot-certificate0% | 0% | 25% | 59% | 15%
aws-iot-policy0% | 0% | 13% | 0% | 86%
aws-iot-provisioningtemplate0% | 0% | 0% | 71% | 28%
aws-iot-jobtemplate0% | 0% | 0% | 87% | 12%
aws-iot-domainconfiguration0% | 0% | 0% | 41% | 58%
aws-iot-mitigationaction0% | 0% | 0% | 26% | 73%
aws-iot-securityprofile0% | 0% | 0% | 14% | 85%
aws-iot-logging0% | 0% | 0% | 28% | 71%
aws-iot-authorizer0% | 0% | 0% | 8% | 91%
aws-iot-custommetric0% | 0% | 0% | 7% | 92%
aws-iot-scheduledaudit0% | 0% | 0% | 7% | 92%
aws-iot-dimension0% | 0% | 0% | 7% | 92%
aws-iot-resourcespecificlogging0% | 0% | 0% | 8% | 91%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static Map translateChecksFromCfnToIot()
in aws-iot-accountauditconfiguration/src/main/java/com/amazonaws/iot/accountauditconfiguration/Translator.java
64 16 1
static AuditCheckConfigurations translateChecksFromIotToCfn()
in aws-iot-accountauditconfiguration/src/main/java/com/amazonaws/iot/accountauditconfiguration/Translator.java
75 15 1
public ProgressEvent handleRequest()
in aws-iot-certificate/src/main/java/com/amazonaws/iot/certificate/CreateHandler.java
74 12 4
public static BaseHandlerException translateIotExceptionToHandlerException()
in aws-iot-policy/src/main/java/com/amazonaws/iot/policy/Translator.java
30 12 3
static HandlerErrorCode translateExceptionToErrorCode()
in aws-iot-mitigationaction/src/main/java/com/amazonaws/iot/mitigationaction/Translator.java
25 10 2
public ProgressEvent handleRequest()
in aws-iot-jobtemplate/src/main/java/software/amazon/iot/jobtemplate/CreateHandler.java
57 10 4
static HandlerErrorCode translateExceptionToErrorCode()
in aws-iot-custommetric/src/main/java/com/amazonaws/iot/custommetric/Translator.java
25 10 2
static HandlerErrorCode translateExceptionToErrorCode()
in aws-iot-securityprofile/src/main/java/com/amazonaws/iot/securityprofile/Translator.java
25 10 2
public ProgressEvent handleRequest()
in aws-iot-provisioningtemplate/src/main/java/com/amazonaws/iot/provisioningtemplate/UpdateHandler.java
70 10 4
static HandlerErrorCode translateExceptionToErrorCode()
in aws-iot-resourcespecificlogging/src/main/java/software/amazon/iot/resourcespecificlogging/ExceptionTranslator.java
23 10 2
static BaseHandlerException translateIotExceptionToHandlerException()
in aws-iot-domainconfiguration/src/main/java/com/amazonaws/iot/domainconfiguration/ExceptionTranslator.java
26 10 3
static HandlerErrorCode translateExceptionToErrorCode()
in aws-iot-scheduledaudit/src/main/java/com/amazonaws/iot/scheduledaudit/Translator.java
25 10 2
static HandlerErrorCode translateExceptionToErrorCode()
in aws-iot-dimension/src/main/java/com/amazonaws/iot/dimension/Translator.java
25 10 2
static BaseHandlerException translateIotExceptionToHandlerException()
in aws-iot-authorizer/src/main/java/com/amazonaws/iot/authorizer/Translator.java
26 10 3
public ProgressEvent handleRequest()
in aws-iot-certificate/src/main/java/com/amazonaws/iot/certificate/DeleteHandler.java
41 9 4
public ProgressEvent handleRequest()
in aws-iot-jobtemplate/src/main/java/software/amazon/iot/jobtemplate/ReadHandler.java
46 9 4
static HandlerErrorCode translateExceptionToErrorCode()
in aws-iot-logging/src/main/java/software/amazon/iot/logging/ExceptionTranslator.java
21 9 2
public ProgressEvent handleRequest()
in aws-iot-certificate/src/main/java/com/amazonaws/iot/certificate/UpdateHandler.java
30 8 4
public ProgressEvent handleRequest()
in aws-iot-jobtemplate/src/main/java/software/amazon/iot/jobtemplate/DeleteHandler.java
29 8 4
static MetricValue translateMetricValueFromIotToCfn()
in aws-iot-securityprofile/src/main/java/com/amazonaws/iot/securityprofile/Translator.java
26 8 1