aws-cloudformation / aws-cloudformation-resource-providers-kms
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 164 units with 1,483 lines of code in units (64.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 19 medium size units (515 lines of code)
    • 21 small units (282 lines of code)
    • 124 very small units (686 lines of code)
0% | 0% | 34% | 19% | 46%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 34% | 19% | 46%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
common/src/main/java/software/amazon/kms/common0% | 0% | 41% | 12% | 46%
key/src/main/java/software/amazon/kms/key0% | 0% | 30% | 25% | 45%
alias/src/main/java/software/amazon/kms/alias0% | 0% | 40% | 13% | 45%
replicakey/src/main/java/software/amazon/kms/replicakey0% | 0% | 23% | 28% | 47%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public ProgressEvent updateKeyTags()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
44 3 5
protected ProgressEvent handleRequest()
in replicakey/src/main/java/software/amazon/kms/replicakey/CreateHandler.java
42 2 5
protected ProgressEvent handleRequest()
in key/src/main/java/software/amazon/kms/key/UpdateHandler.java
37 2 5
public ProgressEvent retrieveResourceTags()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
32 3 5
protected ProgressEvent handleRequest()
in alias/src/main/java/software/amazon/kms/alias/ReadHandler.java
29 3 5
protected T wrapKmsExceptions()
in common/src/main/java/software/amazon/kms/common/AbstractKmsApiHelper.java
28 11 2
protected abstract ProgressEvent handleRequest()
in key/src/main/java/software/amazon/kms/key/BaseHandlerStd.java
27 6 5
protected ProgressEvent handleRequest()
in replicakey/src/main/java/software/amazon/kms/replicakey/UpdateHandler.java
26 1 5
protected static ProgressEvent validateResourceModel()
in key/src/main/java/software/amazon/kms/key/BaseHandlerStd.java
25 10 3
protected ProgressEvent handleRequest()
in key/src/main/java/software/amazon/kms/key/ReadHandler.java
25 1 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
public ProgressEvent describeKey()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
22 4 5
public ProgressEvent updateKeyPolicy()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
22 3 5
protected ProgressEvent handleRequest()
in alias/src/main/java/software/amazon/kms/alias/CreateHandler.java
22 1 5
protected ProgressEvent handleRequest()
in alias/src/main/java/software/amazon/kms/alias/DeleteHandler.java
22 1 5
protected ProgressEvent handleRequest()
in alias/src/main/java/software/amazon/kms/alias/UpdateHandler.java
22 1 5
public ProgressEvent enableKeyIfNecessary()
in common/src/main/java/software/amazon/kms/common/KeyHandlerHelper.java
21 6 6
public ProgressEvent createKey()
in common/src/main/java/software/amazon/kms/common/CreatableKeyHandlerHelper.java
21 2 5
protected ProgressEvent handleRequest()
in alias/src/main/java/software/amazon/kms/alias/ListHandler.java
19 1 5