awslabs / smithy-intellij
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 332 units with 1,622 lines of code in units (48.3% 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)
    • 17 simple units (236 lines of code)
    • 314 very simple units (1,277 lines of code)
0% | 6% | 0% | 14% | 78%
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% | 6% | 0% | 14% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/gen/software/amazon/smithy/plugin/language/psi0% | 50% | 0% | 0% | 49%
src/main/gen/software/amazon/smithy/plugin/parser0% | 0% | 0% | 34% | 65%
src/main/java/software/amazon/smithy/plugin0% | 0% | 0% | 24% | 75%
src/main/gen/software/amazon/smithy/plugin/language/psi/impl0% | 0% | 0% | 0% | 100%
src/main/java/software/amazon/smithy/plugin/language0% | 0% | 0% | 0% | 100%
src/main/java/software/amazon/smithy/plugin/language/psi0% | 0% | 0% | 0% | 100%
src/main/java/software/amazon/smithy/plugin/services0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static PsiElement createElement()
in src/main/gen/software/amazon/smithy/plugin/language/psi/SmithyTypes.java
109 36 1
public static boolean metadata_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
16 10 2
public static boolean apply_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
14 8 2
private void bootstrapCoursier()
in src/main/java/software/amazon/smithy/plugin/SmithyPostStartupActivity.java
31 7 1
public static boolean complex_shape_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean node_object_kvp()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean node_object_shape_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean shape_member_kvp()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean shape_members()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean trait_body()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean trait_structure_kvp()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
static boolean idl()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean namespace_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean node_array()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean node_object()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean node_value()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean number()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean use_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean metadata_section()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
11 5 2
private static boolean namespace_1()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
9 5 2