amazon-research / question-answering-nlu
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 10 units with 266 lines of code in units (73.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (89 lines of code)
    • 3 medium size units (86 lines of code)
    • 5 small units (82 lines of code)
    • 1 very small units (9 lines of code)
0% | 33% | 32% | 30% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 33% | 32% | 30% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 33% | 32% | 30% | 3%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
def parse()
in atis.py
89 24 4
def qanlu_rec_to_conll()
in calculate_pr.py
42 12 2
22 9 8
def main()
in atis.py
22 5 1
def main()
in calculate_pr.py
20 2 2
def get_rec_intent()
in calculate_pr.py
18 9 2
17 5 1
14 2 1
def load_tsv()
in atis.py
13 2 1
def agg_data()
in atis.py
9 2 2