amazon-research / nlu-slot-constraints
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 39 units with 766 lines of code in units (2.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (527 lines of code)
    • 7 simple units (115 lines of code)
    • 20 very simple units (124 lines of code)
0% | 0% | 68% | 15% | 16%
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% | 68% | 15% | 16%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 71% | 11% | 16%
data0% | 0% | 0% | 100% | 0%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
88 22 3
77 21 3
55 16 4
45 16 2
def entity_sorting()
in entity_linking.py
35 15 5
def entity_linking()
in entity_linking.py
31 13 5
26 13 5
def create_csv()
in generate_result_table.py
43 12 1
def find_violations()
in violation_detection.py
14 12 3
37 12 2
32 11 2
44 11 2
def find_violations_probs()
in violation_detection.py
13 10 3
def passing_atomic_value()
in violation_detection.py
15 9 2
def calculate_prf_entity()
in entity_linking.py
10 8 4
def vocab_process()
in data/vocab_process.py
30 8 1
22 7 1
def entity_linking_probs()
in entity_linking.py
15 6 5
10 6 2
def bi_jaccard_similarity()
in entity_linking.py
6 5 2