aws-cloudformation / aws-cloudformation-resource-providers-kms
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 164 units with 1,483 lines of code in units (64.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (28 lines of code)
    • 4 simple units (90 lines of code)
    • 159 very simple units (1,365 lines of code)
0% | 0% | 1% | 6% | 92%
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% | 1% | 6% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
common/src/main/java/software/amazon/kms/common0% | 0% | 4% | 3% | 91%
key/src/main/java/software/amazon/kms/key0% | 0% | 0% | 18% | 81%
replicakey/src/main/java/software/amazon/kms/replicakey0% | 0% | 0% | 0% | 100%
alias/src/main/java/software/amazon/kms/alias0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
protected T wrapKmsExceptions()
in common/src/main/java/software/amazon/kms/common/AbstractKmsApiHelper.java
28 11 2
protected static ProgressEvent validateResourceModel()
in key/src/main/java/software/amazon/kms/key/BaseHandlerStd.java
25 10 3
public static ResourceModel setDefaults()
in key/src/main/java/software/amazon/kms/key/ModelAdapter.java
17 7 1
public ProgressEvent enableKeyIfNecessary()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
21 6 6
protected abstract ProgressEvent handleRequest()
in key/src/main/java/software/amazon/kms/key/BaseHandlerStd.java
27 6 5
public ProgressEvent describeKey()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
22 4 5
public ProgressEvent disableKeyIfNecessary()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
18 4 5
public String translatePolicyInput()
in common/src/main/java/software/amazon/kms/common/KeyTranslator.java
10 3 1
public Map deserializeKeyPolicy()
in common/src/main/java/software/amazon/kms/common/KeyTranslator.java
11 3 1
public ProgressEvent updateKeyPolicy()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
22 3 5
public ProgressEvent retrieveResourceTags()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
32 3 5
public ProgressEvent updateKeyTags()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
44 3 5
public ProgressEvent deleteKey()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
24 3 4
public ProgressEvent listKeysAndFilterByMetadata()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
24 3 3
private Exception addMessageIfNull()
in common/src/main/java/software/amazon/kms/common/AbstractKmsApiHelper.java
8 3 2
public static ResourceModel setDefaults()
in replicakey/src/main/java/software/amazon/kms/replicakey/ModelAdapter.java
8 3 1
protected ProgressEvent handleRequest()
in alias/src/main/java/software/amazon/kms/alias/ReadHandler.java
29 3 5
public Set translateTagsToSdk()
in common/src/main/java/software/amazon/kms/common/KeyTranslator.java
9 2 1
public Supplier getClientForArnRegion()
in common/src/main/java/software/amazon/kms/common/ClientBuilder.java
9 2 1
public ProgressEvent updateKeyDescription()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
17 2 5