amazon-research / nl2sql-omop-cdm
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 135 units with 1,430 lines of code in units (76.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (30 lines of code)
    • 3 simple units (96 lines of code)
    • 131 very simple units (1,304 lines of code)
0% | 0% | 2% | 6% | 91%
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% | 2% | 6% | 91%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/engine/step10% | 0% | 28% | 0% | 71%
src/engine/step4/model_dev/utils0% | 0% | 0% | 13% | 86%
src/engine/step50% | 0% | 0% | 33% | 66%
src/ui0% | 0% | 0% | 0% | 100%
src/engine/step4/model_dev0% | 0% | 0% | 0% | 100%
src/engine/step20% | 0% | 0% | 0% | 100%
src/engine0% | 0% | 0% | 0% | 100%
src/engine/step60% | 0% | 0% | 0% | 100%
src/engine/step30% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _add_cm_entity()
in src/engine/step1/_extraction_helpers.py
30 13 3
def render_template_query()
in src/engine/step5/sql_processing.py
37 9 3
def configure_optimizers()
in src/engine/step4/model_dev/utils/model.py
31 7 1
def execute_matching()
in src/engine/step4/model_dev/utils/metrics.py
28 6 3
def get_descendent_concepts_template_from_vocab_code()
in src/engine/step5/template_definitions.py
23 5 3
def __init__()
in src/engine/step4/model_dev/utils/model.py
29 5 2
def on_test_end()
in src/engine/step4/model_dev/utils/callback.py
12 5 3
14 5 2
def _display_main()
in src/ui/ui.py
26 5 4
def _update_options()
in src/ui/ui.py
10 5 1
def freeze_embeds()
in src/engine/step4/model_dev/utils/model.py
10 4 1
def on_train_end()
in src/engine/step4/model_dev/utils/callback.py
7 4 3
def on_validation_end()
in src/engine/step4/model_dev/utils/callback.py
7 4 3
def do_inference()
in src/engine/step4/model_dev/t5_evaluation.py
45 4 1
def _use_pattern_dict()
in src/engine/step2/disambiguation_helpers.py
9 4 2
21 4 2
10 4 2
10 4 2
18 4 1
18 4 1