aws-samples / research-pacs-on-aws
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 144 units with 2,217 lines of code in units (43.2% of code).
    • 2 very complex units (267 lines of code)
    • 1 complex units (111 lines of code)
    • 18 medium complex units (598 lines of code)
    • 20 simple units (510 lines of code)
    • 103 very simple units (731 lines of code)
12% | 5% | 26% | 23% | 32%
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
py12% | 5% | 26% | 23% | 32%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
python/de-identifier/research_pacs36% | 0% | 46% | 7% | 10%
python/website-worker/research_pacs0% | 50% | 21% | 0% | 28%
python/shared/research_pacs0% | 0% | 16% | 28% | 55%
python/website/research_pacs0% | 0% | 10% | 51% | 38%
python/change-pooler/research_pacs0% | 0% | 64% | 0% | 36%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def apply_transformations()
in python/de-identifier/research_pacs/de_identifier/dicom.py
167 72 2
def _validate_and_adapt_config_file()
in python/de-identifier/research_pacs/de_identifier/dicom.py
100 58 1
def process_new_export()
in python/website-worker/research_pacs/website_worker/main.py
111 28 2
def translate_query_to_jsonpath()
in python/shared/research_pacs/shared/dicom_json.py
81 23 1
def deidentify_dicom_orthanc()
in python/de-identifier/research_pacs/de_identifier/main.py
54 22 4
def convert_dicom_to_json()
in python/shared/research_pacs/shared/dicom_json.py
26 21 1
def main()
in python/change-pooler/research_pacs/change_pooler/main.py
48 20 0
def _elem_sequence_match_tag_path_pattern()
in python/de-identifier/research_pacs/de_identifier/dicom_tag_path_pattern.py
14 20 2
def process_new_dicom_orthanc()
in python/de-identifier/research_pacs/de_identifier/main.py
52 19 2
def main()
in python/website-worker/research_pacs/website_worker/main.py
48 17 0
def _elem_match_tag_pattern()
in python/de-identifier/research_pacs/de_identifier/dicom_tag_path_pattern.py
17 17 2
def _validate_and_adapt_permissions_file()
in python/website/research_pacs/website/permission.py
29 16 1
def process_new_dicom()
in python/de-identifier/research_pacs/de_identifier/main.py
34 16 1
def main()
in python/de-identifier/research_pacs/de_identifier/main.py
50 15 0
def enumerate_elements_match_tag_path_patterns()
in python/de-identifier/research_pacs/de_identifier/dicom_tag_path_pattern.py
22 13 4
def get_box_coordinates()
in python/de-identifier/research_pacs/de_identifier/ocr.py
32 12 4
def get_env()
in python/de-identifier/research_pacs/de_identifier/env.py
27 12 0
def _does_orthanc_request_match_patterns()
in python/website/research_pacs/website/permission.py
12 11 3
def get_jsonpath_query()
in python/website/research_pacs/website/permission.py
14 11 2
def _find_transformations_to_apply()
in python/de-identifier/research_pacs/de_identifier/dicom.py
18 11 1