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).
def lambda_handler() in cross-account-register-ztp/python/lambda/lambda_function.py
84
9
2
def find_key_name() in greengrass-v2/poll-api/artifacts/com.greengrass.GGUtils/1.0.0/GGUtils.py
7
8
3
public CertificateBasedStack() in cross-account-publish/certificate-based-stack/src/main/java/com/awssamples/crossaccountpublish/CertificateBasedStack.java
104
8
2
def process_message_list() in greengrass-v2/poll-api/artifacts/com.greengrass.ProcessApiStream/1.0.0/process.py
13
7
7
static void Main() in cross-account-publish/c-sharp/ConsoleApp1/ConsoleApp1/Program.cs
69
7
1
def lambda_handler() in cloudwatch-events/python/customer-triggered-on-create-thing.py
32
7
2
public String detect() in serverless-ui/jwt-stack/src/main/java/com/awssamples/server/StaticFileServlet.java
12
7
2
def inner_clean_up() in greengrass-v2/poll-api/artifacts/com.greengrass.CleanUpExportFiles/1.0.0/cleanup.py