facebookresearch / Zero-Shot-DST
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 117 units with 2,458 lines of code in units (89.8% of code).
    • 2 very complex units (205 lines of code)
    • 3 complex units (181 lines of code)
    • 16 medium complex units (754 lines of code)
    • 28 simple units (633 lines of code)
    • 68 very simple units (685 lines of code)
8% | 7% | 30% | 25% | 27%
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
py8% | 7% | 30% | 25% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
T5DST9% | 0% | 34% | 26% | 29%
TransferQA8% | 7% | 31% | 25% | 27%
T5DST/utils0% | 45% | 0% | 29% | 24%
TransferQA/utils0% | 100% | 0% | 0% | 0%
Most Complex Units
Top 20 most complex 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 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 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.py
59 17 1
def divideData()
in T5DST/create_data_2_1.py
61 17 2
def divideData()
in TransferQA/create_data_mwoz.py
61 17 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 SGD_predict()
in TransferQA/T5.py
35 14 5
def normalize()
in T5DST/create_data.py
55 13 2
def fixDelex()
in T5DST/create_data.py
23 13 5
def normalize()
in T5DST/create_data_2_1.py
55 13 2
def fixDelex()
in T5DST/create_data_2_1.py
23 13 5
def read_QA_data()
in TransferQA/data_loader.py
52 13 3
def normalize()
in TransferQA/create_data_mwoz.py
55 13 2
def fixDelex()
in TransferQA/create_data_mwoz.py
23 13 5