facebookresearch / SAFEtorch
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 14 units with 183 lines of code in units (80.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 2 simple units (52 lines of code)
    • 12 very simple units (131 lines of code)
0% | 0% | 0% | 28% | 71%
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% | 0% | 28% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
utils0% | 0% | 0% | 42% | 57%
safetorch0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 14 most complex units
Unit# linesMcCabe index# params
def filter_memory_references()
in utils/capstone_disassembler.py
32 9 1
def disassemble()
in utils/capstone_disassembler.py
20 6 4
def convert_to_ids()
in utils/instructions_converter.py
12 5 2
def get_functions()
in utils/radare_analyzer.py
8 4 1
def forward()
in safetorch/safe_network.py
23 4 3
def get_hexasm()
in utils/radare_analyzer.py
6 2 2
def normalize()
in utils/function_normalizer.py
6 2 2
def normalize_function_pairs()
in utils/function_normalizer.py
9 2 2
def normalize_functions()
in utils/function_normalizer.py
8 2 2
def __init__()
in safetorch/parameters.py
9 2 1
def __init__()
in utils/radare_analyzer.py
15 1 2
def __init__()
in utils/instructions_converter.py
4 1 2
def __init__()
in utils/function_normalizer.py
2 1 2
def __init__()
in safetorch/safe_network.py
29 1 2