aws-samples / i-love-my-local-farmer
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 381 units with 3,743 lines of code in units (60.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (109 lines of code)
    • 0 medium complex units (0 lines of code)
    • 10 simple units (260 lines of code)
    • 370 very simple units (3,374 lines of code)
0% | 2% | 0% | 6% | 90%
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% | 2% | 0% | 6% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
FlywayLambdaService/src/main0% | 10% | 0% | 15% | 73%
DeliveryApi/ApiHandlers/src0% | 0% | 0% | 8% | 91%
DeliveryApi/cdk/src0% | 0% | 0% | 2% | 97%
JavaSpringMigration/cdk/src0% | 0% | 0% | 6% | 93%
WorkingFromHome/ClientConnection/src0% | 0% | 0% | 7% | 92%
DeliveryApi/ApiHandlers/tst0% | 0% | 0% | 0% | 100%
JavaSpringMigration/app/src0% | 0% | 0% | 0% | 100%
WorkingFromHome/ClientConnection/AdConnectorCustomResource0% | 0% | 0% | 0% | 100%
WorkingFromHome/SiteToSiteConnection/src0% | 0% | 0% | 0% | 100%
WorkingFromHome/CustomResourceUtils/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public Flyway configure()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/FlywayService.java
109 33 0
public static R value()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/request/ValueManager.java
13 9 4
public MigrationInfoService call()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/FlywayService.java
28 7 0
public Response handleRequest()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/FlywayHandler.java
36 7 2
public void cloneRepo()
in FlywayLambdaService/src/main/java/com/geekoosh/lambda/git/GitService.java
32 7 0
public static String latestSecret()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/request/ValueManager.java
26 6 1
public void log()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/response/Response.java
27 6 0
private static void collectFiles()
in WorkingFromHome/ClientConnection/src/main/java/com/ilmlf/clientconnection/Hashing.java
17 6 3
private static void collectFiles()
in JavaSpringMigration/cdk/src/main/java/com/ilmlf/product/api/Hashing.java
17 6 3
private static void collectFiles()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/api/Hashing.java
17 6 3
public APIGatewayProxyResponseEvent handleRequest()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/BookDelivery.java
47 6 2
protected Connection refreshDbConnection()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/service/SlotService.java
20 5 0
public APIGatewayProxyResponseEvent handleRequest()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/CreateSlots.java
35 5 2
public static void waitForCompletion()
in FlywayLambdaService/src/main/java/com/geekoosh/lambda/s3/S3Service.java
11 4 1
public HashMap handleRequest()
in WorkingFromHome/ClientConnection/AdConnectorCustomResource/src/main/java/com/ilmlf/adconnector/customresource/OnEventHandler.java
44 4 2
public int insertSlotList()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/service/SlotService.java
21 4 1
public APIGatewayProxyResponseEvent handleRequest()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/GetSlots.java
33 4 2
public boolean isExecuteScript()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/PopulateFarmDb.java
10 4 1
public String buildReturnJson()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/PopulateFarmDb.java
12 4 3
public JSONObject constructSlotJson()
in DeliveryApi/ApiHandlers/tst/com/ilmlf/delivery/api/handlers/CreateSlotsTest.java
13 4 3