facebookresearch / mmd
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 90 units with 597 lines of code in units (80.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (90 lines of code)
    • 1 simple units (22 lines of code)
    • 86 very simple units (485 lines of code)
0% | 0% | 15% | 3% | 81%
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% | 15% | 3% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
rules0% | 0% | 23% | 0% | 76%
ROOT0% | 0% | 0% | 10% | 89%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def generate_conjuncts()
in rules/conjuncts.py
51 17 4
def implies()
in rules/predicate.py
24 14 2
def check_useless()
in rules/rule.py
15 13 2
22 8 3
def eval()
in rules/predicate.py
11 5 2
def filter()
in rules/predicate.py
17 5 5
def generate()
in rules/predicate.py
11 5 5
def equi_freq()
in rules/predicate.py
16 5 2
def implies()
in rules/rule.py
10 5 2
def is_irrelevant()
in rules/conjuncts.py
9 5 3
7 4 3
def is_subset()
in rules/ruleset.py
6 4 2
def from_string()
in rules/predicate.py
7 4 2
def num_positive()
in rules/predicate.py
2 4 2
12 4 4
def is_subset()
in rules/rule.py
6 4 2
def get_worst_rule()
in rules/conjuncts.py
10 4 2
7 3 2
7 3 2
def filter_by_rule()
in rules/ruleset.py
5 3 2