aws-samples / saas-tenant-isolation-architecture
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 65 units with 400 lines of code in units (40.5% 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)
    • 1 simple units (24 lines of code)
    • 64 very simple units (376 lines of code)
0% | 0% | 0% | 6% | 94%
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% | 0% | 6% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
TokenVendingLayer/src/main/java/tenant/vendinglayer/token0% | 0% | 0% | 23% | 76%
ExportTenantData/src/main/java/tenant/export0% | 0% | 0% | 0% | 100%
TokenVendingLayer/src/main/java/tenant/vendinglayer/template0% | 0% | 0% | 0% | 100%
ExportTenantData/src/main/java/tenant/export/models0% | 0% | 0% | 0% | 100%
TokenVendingLayer/src/main/java/tenant/vendinglayer0% | 0% | 0% | 0% | 100%
ExportTenantData/src/main/java/tenant/export/errors0% | 0% | 0% | 0% | 100%
AssumeRoleWatchDog/src/main/java/tenant/watchdog/models0% | 0% | 0% | 0% | 100%
AssumeRoleWatchDog/src/main/java/tenant/watchdog0% | 0% | 0% | 0% | 100%
TokenVendingLayer/src/main/java/tenant/vendinglayer/policy0% | 0% | 0% | 0% | 100%
TokenVendingLayer/src/main/java/tenant/vendinglayer/exceptions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private String getBearerToken()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/token/JwtTokenVendor.java
24 7 1
public void handleRequest()
in AssumeRoleWatchDog/src/main/java/tenant/watchdog/WatchdogHandler.java
23 5 3
public AwsCredentialsProvider getCredentialsForTenant()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/token/JwtTokenVendor.java
18 4 2
public APIGatewayProxyResponseEvent handleRequest()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
11 3 2
public TokenVendor()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/TokenVendor.java
17 3 0
private static String stringifyFile()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/template/PolicyLoader.java
12 3 1
public AwsCredentialsProvider vendToken()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/token/JwtTokenVendor.java
17 3 0
public APIGatewayProxyResponseEvent handlePostRequest()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
23 2 2
public APIGatewayProxyResponseEvent handleGetRequest()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
23 2 2
private String createBadRequestResponse()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
9 2 2
private static Stream streamFiles()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/template/PolicyLoader.java
5 2 1
public GatewayError()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
6 1 4
public String getErrorType()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 0
public void setErrorType()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 1
public String getHttpStatus()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 0
public void setHttpStatus()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 1
public String getRequestId()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 0
public void setRequestId()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 1
public String getMessage()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 0
public void setMessage()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
3 1 1