aws-samples / aws-stepfunctions-examples
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 31% duplication:
    • 2,390 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 746 duplicated lines
  • 76 duplicates
system31% (746 lines)
Duplication per Extension
yaml29% (462 lines)
py38% (258 lines)
yml21% (26 lines)
Duplication per Component (primary)
app-s3-athena-dataprocessing43% (192 lines)
app-decompose-for-parallelism33% (136 lines)
app-order-management51% (134 lines)
app-control-concurrency-with-dynamodb46% (81 lines)
demo-forecast-service-integration20% (67 lines)
app-kyc-with-eventbridge19% (55 lines)
util-sfntoolkit19% (32 lines)
demo-video-transcription21% (26 lines)
demo-asl-features16% (23 lines)
app-local-testing-mock-config0% (0 lines)

Duplication Between Components (50+ lines)

G app-decompose-for-parallelism app-decompose-for-parallelism app-s3-athena-dataprocessing app-s3-athena-dataprocessing app-decompose-for-parallelism--app-s3-athena-dataprocessing 244 app-control-concurrency-with-dynamodb app-control-concurrency-with-dynamodb app-control-concurrency-with-dynamodb--app-s3-athena-dataprocessing 128 app-order-management app-order-management app-control-concurrency-with-dynamodb--app-order-management 131 app-order-management--app-s3-athena-dataprocessing 104

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 76 duplicates...
Size#FoldersFilesLinesCode
72 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
12:100 (44%)
12:100 (45%)
view
31 x 2 sam/app-control-concurrency-with-dynamodb
sam/app-s3-athena-dataprocessing
template.yaml
template.yaml
31:61 (18%)
45:75 (13%)
view
28 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
103:141 (17%)
102:140 (17%)
view
23 x 2 sam/app-control-concurrency-with-dynamodb
sam/app-order-management
template.yaml
template.yaml
16:40 (13%)
7:31 (10%)
view
19 x 2 sam/app-order-management
sam/app-s3-athena-dataprocessing
template.yaml
template.yaml
36:54 (8%)
59:77 (8%)
view
17 x 2 sam/app-order-management
sam/app-order-management
template.yaml
template.yaml
140:156 (7%)
199:215 (7%)
view
17 x 2 sam/app-control-concurrency-with-dynamodb
sam/app-order-management
template.yaml
template.yaml
45:61 (10%)
36:52 (7%)
view
15 x 2 sam/app-order-management
sam/app-order-management
template.yaml
template.yaml
124:138 (6%)
183:197 (6%)
view
15 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
201:218 (9%)
202:219 (9%)
view
13 x 2 sam/app-order-management
sam/app-s3-athena-dataprocessing
template.yaml
template.yaml
7:21 (5%)
29:43 (5%)
view
13 x 2 sam/app-control-concurrency-with-dynamodb
sam/app-s3-athena-dataprocessing
template.yaml
template.yaml
16:30 (7%)
29:43 (5%)
view
12 x 2 sam/app-order-management
sam/demo-video-transcription
template.yaml
template.yml
7:20 (5%)
5:17 (10%)
view
12 x 2 sam/app-s3-athena-dataprocessing
sam/demo-video-transcription
template.yaml
template.yml
29:42 (5%)
5:17 (10%)
view
12 x 2 sam/app-control-concurrency-with-dynamodb
sam/demo-video-transcription
template.yaml
template.yml
16:29 (7%)
5:17 (10%)
view
11 x 2 sam/app-s3-athena-dataprocessing
sam/demo-asl-features
template.yaml
template.yaml
29:41 (4%)
14:26 (8%)
view
11 x 2 sam/app-order-management
sam/demo-asl-features
template.yaml
template.yaml
7:19 (5%)
14:26 (8%)
view
11 x 2 sam/app-control-concurrency-with-dynamodb
sam/demo-asl-features
template.yaml
template.yaml
16:28 (6%)
14:26 (8%)
view
11 x 2 sam/demo-asl-features
sam/demo-video-transcription
template.yaml
template.yml
14:26 (8%)
5:16 (9%)
view
10 x 2 sam/app-control-concurrency-with-dynamodb
sam/demo-video-transcription
template.yaml
template.yml
31:40 (6%)
19:28 (8%)
view
10 x 2 sam/util-sfntoolkit
sam/util-sfntoolkit
template.yaml
template.yaml
23:32 (6%)
107:116 (6%)
view
Duplicated Units
The list of top 7 duplicated units.
See data for all 7 unit duplicates...
Size#FoldersFilesLinesCode
22 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
0:0 
0:0 
view
14 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
0:0 
0:0 
view
12 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
0:0 
0:0 
view
9 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
0:0 
0:0 
view
8 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
0:0 
0:0 
view
7 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
0:0 
0:0 
view
7 x 2 sam/app-decompose-for-parallelism
sam/app-s3-athena-dataprocessing
ctl.py
ctl.py
0:0 
0:0 
view