aws-samples / amazon-textract-response-parser
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 405 units with 2,466 lines of code in units (55.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (96 lines of code)
    • 3 medium complex units (74 lines of code)
    • 33 simple units (644 lines of code)
    • 368 very simple units (1,652 lines of code)
0% | 3% | 3% | 26% | 66%
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
ts0% | 12% | 0% | 16% | 70%
py0% | 0% | 5% | 28% | 66%
cs0% | 0% | 0% | 36% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src-js/src0% | 12% | 0% | 16% | 70%
src-python/trp0% | 0% | 6% | 29% | 63%
src-csharp0% | 0% | 0% | 36% | 63%
src-python/a2i0% | 0% | 0% | 24% | 75%
src-python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
96 36 1
def merge_tables()
in src-python/trp/trp2.py
30 22 2
def ExecuteTableValidations()
in src-python/trp/t_tables.py
34 12 3
def __relationships_recursive()
in src-python/trp/trp2.py
10 11 2
def __init__()
in src-python/trp/__init__.py
18 10 3
def __init__()
in src-python/trp/__init__.py
23 10 3
def __init__()
in src-python/trp/__init__.py
15 10 3
def link_tables()
in src-python/trp/trp2.py
17 10 2
def __init__()
in src-python/a2i/a2irp.py
14 9 3
def _parse()
in src-python/trp/__init__.py
26 9 2
def _parseDocumentPagesAndBlockMap()
in src-python/trp/__init__.py
21 9 1
def get_blocks_by_type()
in src-python/trp/trp2.py
18 9 3
constructor()
in src-js/src/document.ts
29 9 2
public Field()
in src-csharp/TextractExtensions.cs
24 9 2
def _parseDocumentPagesAndBlockMap()
in src-python/a2i/a2irp.py
19 8 1
def getLinesInReadingOrder()
in src-python/trp/__init__.py
23 8 1
def add_kv_ocr_confidence()
in src-python/trp/t_pipeline.py
27 8 1
def create_geometry_from_blocks()
in src-python/trp/trp2.py
10 8 1
def processDocument()
in src-python/a2i/a2irptest.py
22 7 1
def __init__()
in src-python/trp/__init__.py
9 7 3