facebookresearch / hypernymysuite
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 70 units with 595 lines of code in units (79.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (39 lines of code)
    • 6 simple units (154 lines of code)
    • 63 very simple units (402 lines of code)
0% | 0% | 6% | 25% | 67%
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% | 6% | 25% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 24% | 57% | 17%
hypernymysuite0% | 0% | 0% | 14% | 85%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in main.py
39 14 0
def main()
in compile_table.py
33 8 0
def __init__()
in hypernymysuite/base.py
16 8 2
def __load_sparse_matrix()
in hypernymysuite/reader.py
31 7 2
def gather_metrics()
in compile_table.py
37 6 1
def read_json_log()
in compile_table.py
20 6 1
def read_sparse_matrix()
in hypernymysuite/reader.py
17 6 3
def weeds_prec()
in hypernymysuite/unsup.py
4 5 2
def __init__()
in hypernymysuite/evaluation.py
24 5 4
def __flatten_dict()
in compile_table.py
9 4 2
def __getitem__()
in hypernymysuite/unsup.py
8 4 2
def __init__()
in hypernymysuite/unsup.py
15 4 3
def bibless_setup()
in hypernymysuite/evaluation.py
26 4 1
def __try_three_columns()
in hypernymysuite/reader.py
10 4 1
def fprint()
in compile_table.py
7 3 1
def __init__()
in hypernymysuite/unsup.py
16 3 3
def compute_row_entropy()
in hypernymysuite/unsup.py
14 3 2
def wbless_setup()
in hypernymysuite/evaluation.py
21 3 1
def siege_setup()
in hypernymysuite/evaluation.py
24 3 2
def all_evaluations()
in hypernymysuite/evaluation.py
12 3 2