aws-samples / aws-multi-region-bc-dr-workshop
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
  • 48% duplication:
    • 2,364 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,154 duplicated lines
  • 71 duplicates
system48% (1,154 lines)
Duplication per Extension
yml40% (722 lines)
py69% (325 lines)
html82% (107 lines)
Duplication per Component (primary)
cfn38% (557 lines)
app/mysfits-service/service67% (195 lines)
app/hints50% (125 lines)
web82% (107 lines)
app/like-service/service80% (93 lines)
lab-1-xray/answers97% (37 lines)
app/like-service85% (23 lines)
app/mysfits-service62% (17 lines)
lab-1-xray/utils0% (0 lines)

Duplication Between Components (50+ lines)

G app/mysfits-service/service app/mysfits-service/service web web app/mysfits-service/service--web 214 app/like-service/service app/like-service/service app/like-service/service--app/mysfits-service/service 144 app/hints app/hints cfn cfn app/hints--cfn 140 app/like-service app/like-service app/hints--app/like-service 53

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 71 duplicates...
Size#FoldersFilesLinesCode
56 x 2 app/like-service/service
app/mysfits-service/service
mysfitsTableClient.py
mysfitsTableClient.py
13:105 (65%)
13:105 (77%)
view
39 x 2 app/mysfits-service/service
web
mythicalMysfitsService.py
index.html
113:160 (18%)
75:122 (30%)
view
35 x 2 cfn
cfn
core.yml
core.yml
441:475 (3%)
529:563 (3%)
view
28 x 2 cfn
cfn
core.yml
core.yml
891:918 (2%)
935:962 (2%)
view
23 x 2 cfn
cfn
core.yml
core.yml
498:520 (2%)
586:608 (2%)
view
22 x 2 app/hints
cfn
cwdashboard_with_replacements.yml
cwdashboard.yml
69:90 (12%)
80:101 (16%)
view
21 x 2 app/like-service/service
lab-1-xray/answers
mysfits_like.py
mysfits_like.py
45:69 (72%)
53:77 (55%)
view
16 x 2 app/like-service/service
app/mysfits-service/service
mysfitsTableClient.py
mysfitsTableClient.py
129:148 (18%)
108:127 (22%)
view
16 x 2 cfn
cfn
cicd.yml
cicd.yml
181:196 (4%)
201:216 (4%)
view
15 x 2 cfn
cfn
cicd.yml
cicd.yml
231:245 (4%)
286:300 (4%)
view
15 x 2 app/mysfits-service/service
web
mythicalMysfitsService.py
index.html
163:183 (6%)
125:145 (11%)
view
14 x 2 cfn
cfn
core.yml
core.yml
691:704 (1%)
707:720 (1%)
view
14 x 2 cfn
cfn
cicd.yml
cicd.yml
247:260 (3%)
302:315 (3%)
view
13 x 2 cfn
cfn
core.yml
core.yml
484:496 (1%)
572:584 (1%)
view
13 x 2 cfn
cfn
cicd.yml
cicd.yml
262:274 (3%)
317:329 (3%)
view
12 x 2 app/hints
cfn
cwdashboard_with_replacements.yml
cwdashboard.yml
46:57 (6%)
60:71 (8%)
view
12 x 2 cfn
cfn
core.yml
core.yml
461:472 (1%)
506:517 (1%)
view
12 x 2 cfn
cfn
core.yml
core.yml
549:560 (1%)
594:605 (1%)
view
12 x 2 cfn
cfn
core.yml
core.yml
461:472 (1%)
594:605 (1%)
view
12 x 2 cfn
cfn
core.yml
core.yml
506:517 (1%)
549:560 (1%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 app/like-service/service
app/mysfits-service/service
mysfitsTableClient.py
mysfitsTableClient.py
0:0 
0:0 
view
21 x 2 app/like-service/service
app/mysfits-service/service
mysfitsTableClient.py
mysfitsTableClient.py
0:0 
0:0 
view
14 x 2 lab-1-xray/answers
app/like-service/service
mysfits_like.py
mysfits_like.py
0:0 
0:0 
view
18 x 2 app/like-service/service
app/mysfits-service/service
mysfitsTableClient.py
mysfitsTableClient.py
0:0 
0:0 
view