microsoft / malmo
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 1,678 units with 20,093 lines of code in units (57.7% of code).
    • 1 very complex units (189 lines of code)
    • 5 complex units (443 lines of code)
    • 78 medium complex units (4,298 lines of code)
    • 163 simple units (4,419 lines of code)
    • 1,431 very simple units (10,744 lines of code)
<1% | 2% | 21% | 21% | 53%
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
java1% | 2% | 21% | 24% | 50%
cpp0% | 2% | 20% | 15% | 62%
py0% | 4% | 18% | 10% | 67%
h0% | 0% | 20% | 12% | 66%
hpp0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Minecraft/src1% | 2% | 21% | 24% | 50%
Malmo/src0% | 2% | 19% | 14% | 63%
MalmoEnv/malmoenv0% | 10% | 29% | 4% | 56%
Minecraft0% | 0% | 90% | 0% | 9%
MalmoEnv/proxyenv0% | 0% | 0% | 22% | 77%
scripts/python-wheel0% | 0% | 0% | 0% | 100%
scripts/scoring0% | 0% | 0% | 0% | 100%
MalmoEnv0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
protected boolean onExecute()
in Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/DiscreteMovementCommandsImplementation.java
189 70 3
protected void initialiseComms()
in Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java
180 33 0
def _fill_command_list()
in MalmoEnv/malmoenv/commands.py
30 29 5
protected StateEpisode getStateEpisodeForState()
in Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java
58 29 1
vector MissionSpec::getAllowedCommands()
in Malmo/src/MissionSpec.cpp
77 28 2
private void step()
in Minecraft/src/main/java/com/microsoft/Malmo/Client/MalmoEnvServer.java
98 26 3
def get_actions()
in MalmoEnv/malmoenv/commands.py
57 25 2
public void onClientTick()
in Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java
79 25 1
public static void glBindTexture()
in Minecraft/src/main/java/com/microsoft/Malmo/Utils/TextureHelper.java
73 24 2
92 23 1
static public float eval()
in Minecraft/src/main/java/com/microsoft/Malmo/Utils/EvaluationHelper.java
88 23 3
void VideoFrameWriter::writeSingleFrame()
in Malmo/src/VideoFrameWriter.cpp
66 22 2
private ArrayList createRooms()
in Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/ClassroomDecoratorImplementation.java
96 22 0
public void update()
in Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/MovingTargetDecoratorImplementation.java
88 22 1
public static void buildMouseOverData()
in Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/ObservationFromRayImplementation.java
105 22 2
public static List getIngredients()
in Minecraft/src/main/java/com/microsoft/Malmo/Utils/CraftingHelper.java
50 21 1
private void sendData()
in Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java
74 20 0
private void placeBlocks()
in Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/MazeDecoratorImplementation.java
55 20 4
private void updateAndScorePlayerVolume()
in Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/BuildBattleDecoratorImplementation.java
77 19 2
public void buildOnWorld()
in Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/ClassroomDecoratorImplementation.java
80 19 2