facebookresearch / URL-Sanitization
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 21 units with 456 lines of code in units (92.9% 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)
    • 4 simple units (145 lines of code)
    • 17 very simple units (311 lines of code)
0% | 0% | 0% | 31% | 68%
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% | 31% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
modules0% | 0% | 0% | 31% | 68%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def process_multiple_urls()
in modules/url_comparison.py
54 9 2
def remove_pii_params()
in modules/url_parameters_removal.py
26 8 3
def drop_params_via_similarity()
in modules/url_parameters_removal.py
39 7 6
def append_url_similarity()
in modules/url_parameters_removal.py
26 6 2
def process_one_url()
in modules/url_comparison.py
15 5 2
def drop_query_params()
in modules/url_parameters_removal.py
31 4 1
def get_body()
in modules/url_content_fetcher.py
6 4 1
def get_title()
in modules/url_content_fetcher.py
6 4 1
def parse_urls_for_param()
in modules/url_parameters_removal.py
18 3 1
def _qp_no_phone()
in modules/url_parameters_removal.py
9 3 2
def compare_two_soups()
in modules/url_comparison.py
37 3 3
def generate_modified_urls()
in modules/url_comparison.py
13 3 2
def process_urls()
in modules/process_urls.py
37 3 4
def __init__()
in modules/url_parameters_removal.py
18 2 9
def _check_ph_num()
in modules/url_parameters_removal.py
3 2 2
def __init__()
in modules/url_comparison.py
16 2 8
def _chunker()
in modules/url_comparison.py
2 2 3
def read_and_soup()
in modules/url_content_fetcher.py
47 2 1
def build_param_data()
in modules/url_parameters_removal.py
32 1 1
def process_one_url_empty_result()
in modules/url_comparison.py
12 1 3