aws-amplify / amplify-android
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 5,027 units with 36,100 lines of code in units (63.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (48 lines of code)
    • 26 medium complex units (1,491 lines of code)
    • 172 simple units (4,220 lines of code)
    • 4,828 very simple units (30,341 lines of code)
0% | <1% | 4% | 11% | 84%
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% | <1% | 3% | 12% | 83%
groovy0% | 0% | 100% | 0% | 0%
kt0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
aws-predictions0% | 2% | 4% | 13% | 78%
aws-datastore0% | 0% | 8% | 16% | 75%
amplify-tools0% | 0% | 100% | 0% | 0%
aws-auth-cognito0% | 0% | 7% | 12% | 79%
aws-api0% | 0% | 5% | 26% | 68%
aws-api-appsync0% | 0% | 10% | 21% | 67%
core0% | 0% | 1% | 9% | 89%
testmodels0% | 0% | <1% | 5% | 94%
aws-storage-s30% | 0% | 0% | 11% | 88%
aws-analytics-pinpoint0% | 0% | 0% | 38% | 61%
testutils0% | 0% | 0% | 5% | 94%
aws-predictions-tensorflow0% | 0% | 0% | 6% | 93%
core-kotlin0% | 0% | 0% | 0% | 100%
rxbindings0% | 0% | 0% | 0% | 100%
maplibre-adapter0% | 0% | 0% | 0% | 100%
aws-geo-location0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static LandmarkType fromRekognition()
in aws-predictions/src/main/java/com/amplifyframework/predictions/aws/adapter/LandmarkTypeAdapter.java
48 31 1
public int compare()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/ModelComparator.java
100 23 2
public static Object convertRawValueToTarget()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteModelFieldTypeConverter.java
44 23 3
public Object convertValueFromSource()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteModelFieldTypeConverter.java
76 23 2
void apply()
in amplify-tools/amplify-tools-gradle-plugin/src/main/groovy/com/amplifyframework/tools/gradle/plugin/AmplifyTools.groovy
200 23 1
public static AuthException lookup()
in aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/util/CognitoAuthExceptionConverter.java
54 18 2
public void configure()
in aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AWSCognitoAuthPlugin.java
113 18 2
public static SpeechType fromComprehend()
in aws-predictions/src/main/java/com/amplifyframework/predictions/aws/adapter/SpeechTypeAdapter.java
40 18 1
public static ModelSchema fromModelClass()
in core/src/main/java/com/amplifyframework/core/model/ModelSchema.java
64 17 1
public RequestDecorator forAuthType()
in aws-api/src/main/java/com/amplifyframework/api/aws/auth/ApiRequestDecoratorFactory.java
78 17 1
public SqlCommand queryFor()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteCommandFactory.java
106 16 2
public boolean equals()
in testmodels/src/main/java/com/amplifyframework/testmodels/todo/Todo.java
21 15 1
private Set getModelFields()
in aws-api-appsync/src/main/java/com/amplifyframework/api/aws/SelectionSet.java
47 14 3
private StringBuilder parsePredicateOperation()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/adapter/SQLPredicate.java
80 14 1
public static LanguageType from()
in core/src/main/java/com/amplifyframework/predictions/models/LanguageType.java
33 14 1
private Set getModelFields()
in aws-api-appsync/src/main/java/com/amplifyframework/api/aws/SelectionSet.java
50 13 3
public QueryOperator deserialize()
in aws-api-appsync/src/main/java/com/amplifyframework/core/model/query/predicate/GsonPredicateAdapters.java
33 13 3
public boolean equals()
in aws-datastore/src/main/java/com/amplifyframework/datastore/DataStoreConfiguration.java
37 13 1
private void recurseTree()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteModelTree.java
50 12 3
public boolean equals()
in core/src/main/java/com/amplifyframework/core/model/ModelSchema.java
18 12 1