microsoft / nail_agent
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 243 units with 1,624 lines of code in units (80.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (166 lines of code)
    • 4 medium complex units (138 lines of code)
    • 12 simple units (230 lines of code)
    • 226 very simple units (1,090 lines of code)
0% | 10% | 8% | 14% | 67%
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% | 10% | 8% | 14% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
agent/affordance_extractors0% | 40% | 8% | 16% | 34%
agent/decision_modules0% | 0% | 21% | 19% | 59%
agent0% | 0% | 0% | 9% | 90%
agent/valid_detectors0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
agent/entity_detectors0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_log_prob_calibration_thresholds()
in agent/affordance_extractors/lm_affordance_extractor.py
166 47 1
def get_eagerness()
in agent/decision_modules/interactor.py
33 18 1
def extract_single_object_actions()
in agent/affordance_extractors/lm_affordance_extractor.py
33 14 2
def take_control()
in agent/decision_modules/interactor.py
26 14 1
def take_control()
in agent/decision_modules/examiner.py
46 12 1
def take_action()
in agent/nail.py
20 10 2
def shortest_path()
in agent/knowledge_graph.py
15 8 4
def take_control()
in agent/decision_modules/idler.py
17 7 1
def get_action()
in agent/decision_modules/navigator.py
26 7 1
def process_event()
in agent/decision_modules/restart.py
10 7 2
def to_string()
in agent/entity.py
14 7 2
def init_affordable_attributes()
in agent/affordance_extractors/lm_affordance_extractor.py
45 6 1
def extract_unknown_actions_with_log_probs()
in agent/affordance_extractors/lm_affordance_extractor.py
23 6 2
def filter()
in agent/decision_modules/examiner.py
10 6 2
def parse_response()
in agent/decision_modules/hoarder.py
24 6 2
def process_event()
in agent/decision_modules/yes_no.py
9 6 2
def __str__()
in agent/knowledge_graph.py
17 6 1
def extract_double_object_actions()
in agent/affordance_extractors/lm_affordance_extractor.py
21 5 3
def estimate_attribute_prob()
in agent/affordance_extractors/lm_affordance_extractor.py
19 5 3
def process_event()
in agent/decision_modules/darkness.py
6 5 2