aws-samples / amazon-textract-textractor
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 289 units with 3,054 lines of code in units (79.4% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (286 lines of code)
    • 10 medium complex units (427 lines of code)
    • 30 simple units (744 lines of code)
    • 246 very simple units (1,597 lines of code)
0% | 9% | 13% | 24% | 52%
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% | 9% | 13% | 24% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tpipelinegeofinder/textractgeofinder0% | 10% | 22% | 17% | 50%
caller/textractcaller0% | 35% | 9% | 28% | 25%
overlayer/textractoverlayer0% | 43% | 0% | 2% | 53%
src0% | 0% | 10% | 28% | 61%
tpipelinepagedimensions/textractpagedimensions0% | 0% | 45% | 0% | 54%
prettyprinter/textractprettyprinter0% | 0% | 0% | 59% | 40%
helper0% | 0% | 0% | 0% | 100%
tpipelinegeofinder0% | 0% | 0% | 0% | 100%
caller0% | 0% | 0% | 0% | 100%
prettyprinter0% | 0% | 0% | 0% | 100%
overlayer0% | 0% | 0% | 0% | 100%
tpipelinepagedimensions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in tpipelinegeofinder/textractgeofinder/tword.py
116 35 19
def get_bounding_boxes()
in overlayer/textractoverlayer/t_overlay.py
70 33 3
def call_textract()
in caller/textractcaller/t_call.py
100 27 12
def __find_phrase_on_page()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
70 20 7
def __init__()
in src/tdp.py
32 19 7
def find_phrase_in_lines()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
50 17 4
def __fill_sql_from_textract_json()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
100 15 1
32 14 1
def get_values_for_phrase_coordinate()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
31 12 2
def processDocument()
in src/trptest.py
31 12 1
def generate_request_params()
in caller/textractcaller/t_call.py
28 12 8
def getInputParameters()
in src/textractor.py
26 11 2
def add_page_dimensions()
in tpipelinepagedimensions/textractpagedimensions/t_pagedimensions.py
27 11 3
def combine_multiple_words_to_phrase()
in tpipelinegeofinder/textractgeofinder/tword.py
26 10 1
def convert_expensesummary_to_list()
in prettyprinter/textractprettyprinter/t_pretty_print_expense.py
28 10 4
def get_selection_values_in_area()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
18 9 3
def __init__()
in src/trp.py
14 9 3
def __init__()
in src/trp.py
21 9 3
56 9 9
def get_s3_output_config_keys()
in caller/textractcaller/t_call.py
14 9 3