amazon-research / pizza-semantic-parsing-dataset
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 35 units with 400 lines of code in units (93.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (143 lines of code)
    • 4 simple units (68 lines of code)
    • 25 very simple units (189 lines of code)
0% | 0% | 35% | 17% | 47%
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% | 35% | 17% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
utils0% | 0% | 35% | 17% | 47%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
23 12 2
def resolve_entities()
in utils/entity_resolution.py
31 12 2
def is_unordered_exact_match()
in utils/semantic_matchers.py
18 11 3
23 11 2
def is_unordered_exact_match_post_ER()
in utils/semantic_matchers.py
23 11 3
25 11 3
def __init__()
in utils/trees.py
19 10 6
def _add_defaults()
in utils/entity_resolution.py
9 8 2
11 7 1
29 7 2
def tokenize()
in utils/trees.py
11 5 1
def parse_sexp()
in utils/sexp_reader.py
27 5 4
def build_parent_group_mapping()
in utils/sexp_reader.py
21 4 1
def to_prefix_notation()
in utils/express_utils.py
8 3 1
def load_catalog_file()
in utils/express_utils.py
8 3 1
def pretty_string()
in utils/trees.py
9 2 1
def children()
in utils/trees.py
5 2 1
def children()
in utils/trees.py
6 2 1
12 2 2
def tree_factory()
in utils/semantic_matchers.py
9 2 2