aws-samples / iot-all-the-things-special-projects-edition
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 56 units with 356 lines of code in units (65.7% 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 (16 lines of code)
    • 55 very simple units (340 lines of code)
0% | 0% | 0% | 4% | 95%
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
py0% | 0% | 0% | 17% | 82%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
hue-python0% | 0% | 0% | 17% | 82%
hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue0% | 0% | 0% | 0% | 100%
hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/lifx0% | 0% | 0% | 0% | 100%
hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in s1e1-totally-lit/hue-python/danceparty.py
16 10 0
public static String getHueBridgeIp()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/HueShared.java
13 3 0
def dance_party_mode()
in s1e1-totally-lit/hue-python/danceparty.py
7 3 1
def print_groups_and_lights()
in s1e1-totally-lit/hue-python/lightbulb_discovery.py
8 3 2
public static void initializeLiFXClient()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/lifx/LiFXShared.java
10 2 0
public static void requireAtLeastOneLight()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/lifx/LiFXShared.java
8 2 0
private static void run()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/lifx/LiFXDanceParty.java
9 2 0
public static void main()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/ListHueRooms.java
16 2 1
public static void main()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/HueRainbow.java
11 2 1
private static Color getNextColor()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/HueRainbow.java
7 2 0
public static Hue getHue()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/HueShared.java
7 2 0
public static List getFullLightListOrExitIfEmpty()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/HueShared.java
10 2 3
public static void exitAndShowUsageIfNoArgs()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/HueShared.java
16 2 2
public static void main()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/ListHueLights.java
13 2 1
public static void main()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/hue/HueDanceParty.java
10 2 1
def get_rooms()
in s1e1-totally-lit/hue-python/danceparty.py
12 2 2
def get_lights()
in s1e1-totally-lit/hue-python/danceparty.py
11 2 2
def print_lights()
in s1e1-totally-lit/hue-python/lightbulb_discovery.py
3 2 1
private static long getLightCount()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/lifx/LiFXShared.java
3 1 0
public static Stream getLightStream()
in s1e1-totally-lit/hue-lifx-java/src/main/java/com/awslabs/iot_all_the_things/special_projects_edition/totally_lit/lifx/LiFXShared.java
4 1 0