facebookresearch / CCQA
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 41 units with 957 lines of code in units (81.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (426 lines of code)
    • 6 simple units (143 lines of code)
    • 23 very simple units (388 lines of code)
0% | 0% | 44% | 14% | 40%
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% | 47% | 14% | 37%
rs0% | 0% | 37% | 15% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
python0% | 0% | 47% | 14% | 37%
rust/src0% | 0% | 37% | 15% | 47%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def generate_passage_retrieval_files()
in python/passage_retrieval_processing.py
42 20 4
def vote_info()
in python/passage_retrieval_processing.py
47 18 3
def generate_closed_book_format()
in python/closed_book_processing.py
37 16 4
def search_tree()
in python/mhtml_to_json.py
33 16 2
fn inside_props()
in rust/src/main.rs
36 16 1
def full_info()
in python/passage_retrieval_processing.py
32 15 3
fn transform_inside()
in rust/src/main.rs
44 15 1
def collect_question()
in python/mhtml_to_json.py
51 14 1
fn remove_empty_nodes()
in rust/src/main.rs
23 13 1
def collect_answer()
in python/mhtml_to_json.py
42 11 1
def clean_answer()
in python/passage_retrieval_processing.py
13 11 2
def acc_sugg_info()
in python/passage_retrieval_processing.py
26 11 3
def find_markup_options()
in python/passage_retrieval_processing.py
13 8 1
def update_datapoint()
in python/json_duplicate_filter.py
34 8 2
def generate_structured_json()
in python/mhtml_to_json.py
46 7 4
fn transform_outside()
in rust/src/main.rs
25 7 1
def remove_all_but_text_nodes()
in python/mhtml_to_json.py
8 6 2
fn find_lang_tag()
in rust/src/main.rs
17 6 1
def predict_majority_language()
in python/mhtml_to_json.py
13 5 1
def find_itemprop()
in python/mhtml_to_json.py
9 5 2