amazon-research / pizza-semantic-parsing-dataset
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 35 units with 400 lines of code in units (93.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (202 lines of code)
    • 7 small units (99 lines of code)
    • 20 very small units (99 lines of code)
0% | 0% | 50% | 24% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 50% | 24% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
utils0% | 0% | 50% | 24% | 24%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def resolve_entities()
in utils/entity_resolution.py
31 12 2
29 7 2
def parse_sexp()
in utils/sexp_reader.py
27 5 4
25 11 3
23 12 2
23 11 2
def is_unordered_exact_match_post_ER()
in utils/semantic_matchers.py
23 11 3
def build_parent_group_mapping()
in utils/sexp_reader.py
21 4 1
def __init__()
in utils/trees.py
19 10 6
def is_unordered_exact_match()
in utils/semantic_matchers.py
18 11 3
def make_tree_if_possible()
in utils/semantic_matchers.py
14 1 2
def _init_entities_files()
in utils/entity_resolution.py
14 1 1
12 2 2
11 7 1
def tokenize()
in utils/trees.py
11 5 1
def pretty_string()
in utils/trees.py
9 2 1
9 1 2
def tree_factory()
in utils/semantic_matchers.py
9 2 2
def _add_defaults()
in utils/entity_resolution.py
9 8 2
def to_prefix_notation()
in utils/express_utils.py
8 3 1