facebookresearch / Zero-Shot-DST
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 117 units with 2,458 lines of code in units (89.8% of code).
    • 1 very long units (113 lines of code)
    • 10 long units (651 lines of code)
    • 34 medium size units (1,073 lines of code)
    • 28 small units (411 lines of code)
    • 44 very small units (210 lines of code)
4% | 26% | 43% | 16% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py4% | 26% | 43% | 16% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
T5DST9% | 19% | 41% | 19% | 9%
TransferQA0% | 37% | 40% | 15% | 6%
T5DST/utils0% | 0% | 75% | 0% | 24%
TransferQA/utils0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def read_data()
in T5DST/data_loader.py
113 58 6
def read_data()
in TransferQA/data_loader.py
92 51 6
def evaluate_model()
in TransferQA/T5.py
83 30 7
def read_SGD()
in TransferQA/data_loader.py
78 21 4
def divideData()
in T5DST/create_data_2_1.py
61 17 2
def divideData()
in TransferQA/create_data_mwoz.py
61 17 2
def divideData()
in T5DST/create_data.py
59 17 1
def normalize()
in T5DST/create_data.py
55 13 2
def normalize()
in T5DST/create_data_2_1.py
55 13 2
def normalize()
in TransferQA/create_data_mwoz.py
55 13 2
def read_QA_data()
in TransferQA/data_loader.py
52 13 3
def fix_general_label_error()
in T5DST/utils/fix_label.py
49 36 2
def fix_general_label_error()
in TransferQA/utils/fix_label.py
49 36 2
def get_summary_bstate()
in T5DST/create_data.py
48 16 2
def get_summary_bstate()
in T5DST/create_data_2_1.py
48 16 2
def get_summary_bstate()
in TransferQA/create_data_mwoz.py
48 16 2
def evaluate_model()
in T5DST/T5.py
41 10 7
def preprocess_mrqa()
in TransferQA/create_qa_data.py
39 9 0
def SGD_predict()
in TransferQA/T5.py
35 14 5
def train()
in T5DST/T5.py
33 4 2