awslabs / unsupervised-qa
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 120 units with 1,199 lines of code in units (71.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (65 lines of code)
    • 5 simple units (162 lines of code)
    • 114 very simple units (972 lines of code)
0% | 0% | 5% | 13% | 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% | 5% | 13% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
distant_supervision0% | 0% | 6% | 6% | 86%
spark_scripts0% | 0% | 0% | 41% | 58%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _obtain_retrieved_sentences_for_single_article()
in distant_supervision/synthetic_data_creator.py
65 19 6
def _run_stat()
in spark_scripts/stat_for_ner_category_to_wh_words.py
40 9 5
def _get_entity2qpa_list()
in distant_supervision/entity_to_queries_mapper.py
32 9 3
def sent_tokenize()
in distant_supervision/text_preprocessor.py
11 7 3
def main()
in spark_scripts/create_ds_synthetic_dataset.py
54 6 1
def _compute_answer_start()
in distant_supervision/synthetic_data_creator.py
25 6 5
def main()
in spark_scripts/create_squad_ner_dataset.py
23 5 1
def _process_row()
in distant_supervision/input_parser.py
22 5 2
def _perform_subsample_by_count()
in distant_supervision/synthetic_data_creator.py
8 5 5
def run_job()
in distant_supervision/synthetic_data_creator.py
24 5 5
def get_phrases()
in distant_supervision/text_preprocessor.py
10 4 3
def compute_ner_and_noun_chunks()
in distant_supervision/text_preprocessor.py
10 4 2
def __init__()
in distant_supervision/data_models.py
5 4 5
def _process_row()
in distant_supervision/squad_ner_creator.py
14 4 2
def _get_hit_phrases()
in distant_supervision/synthetic_data_creator.py
8 4 2
def _split_by_style_and_write()
in distant_supervision/synthetic_data_creator.py
5 4 2
def _get_valid_context_sentences()
in distant_supervision/entity_to_queries_mapper.py
15 4 3
def _get_unique_entity_pairs()
in distant_supervision/ner_entity_gatherer.py
9 4 2
def _create_jsonl_training_files()
in spark_scripts/create_ds_synthetic_dataset.py
15 3 2
def is_similar()
in distant_supervision/text_preprocessor.py
14 3 6