awslabs / durepa-hybrid-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 121 units with 1,536 lines of code in units (44.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (553 lines of code)
    • 10 simple units (255 lines of code)
    • 102 very simple units (728 lines of code)
0% | 0% | 36% | 16% | 47%
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% | 36% | 16% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 36% | 19% | 43%
src0% | 0% | 30% | 18% | 50%
scripts0% | 0% | 45% | 8% | 46%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def evaluation()
in scripts/evaluate_hybrid.py
65 19 4
def _create_examples()
in src/utils_fusion_in_decoder.py
63 18 6
def _parse_data()
in utils_ranking.py
42 16 4
def main()
in run_ranking.py
129 14 0
def get_data_examples()
in src/utils_fusion_in_decoder.py
35 14 7
31 13 1
def get_raw_scores()
in scripts/evaluate_script.py
31 12 2
def main()
in src/run_fusion_in_decoder.py
99 11 0
def parse_sql_str()
in scripts/execute_sqls.py
58 11 1
def configure_optimizers()
in src/run_fusion_in_decoder.py
20 10 1
def parse_data()
in scripts/prepare_hybrid_ranking_data.py
28 10 3
def test_epoch_end()
in run_ranking.py
26 8 2
def process_one()
in utils_ranking.py
30 8 1
def process_one()
in utils_ranking.py
27 8 1
def process_one()
in src/utils_fusion_in_decoder.py
35 8 1
def _create_examples()
in utils_ranking.py
21 7 4
def test_epoch_end()
in src/run_fusion_in_decoder.py
26 7 2
def __iter__()
in src/utils.py
12 6 1
def process_one()
in src/utils_data.py
30 6 1
def _create_examples()
in utils_ranking.py
32 5 1