aws-samples / digital-user-engagement-reference-architectures
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
  • 52% duplication:
    • 8,511 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,487 duplicated lines
  • 2,883 duplicates
system52% (4,487 lines)
Duplication per Extension
yaml57% (4,247 lines)
yml37% (134 lines)
js13% (106 lines)
Duplication per Component (primary)
cloudformation56% (4,259 lines)
integrations/amplitude-sam50% (122 lines)
lambda/Message_Archiver/archiver/lib9% (37 lines)
lambda/Message_Archiver/queuer93% (31 lines)
lambda/Message_Archiver/archiver83% (31 lines)
lambda/Message_Archiver/queuer/lib6% (7 lines)
integrations/amplitude-sam/src/handlers/s3-trigger-processor0% (0 lines)
integrations/amplitude-sam/src/handlers/sqs-queue-processor0% (0 lines)

Duplication Between Components (50+ lines)

G cloudformation cloudformation integrations/amplitude-sam integrations/amplitude-sam cloudformation--integrations/amplitude-sam 779 lambda/Message_Archiver/archiver lambda/Message_Archiver/archiver lambda/Message_Archiver/queuer lambda/Message_Archiver/queuer lambda/Message_Archiver/archiver--lambda/Message_Archiver/queuer 62

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 2,883 duplicates...
Size#FoldersFilesLinesCode
107 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
S3_triggered_import.yaml
512:627 (18%)
1018:1133 (10%)
view
67 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
Federated_Segmentation.yaml
89:156 (11%)
427:494 (8%)
view
57 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
S3_triggered_import.yaml
244:302 (9%)
713:771 (5%)
view
56 x 2 cloudformation
integrations/amplitude-sam
Simple_CMS.yaml
template.yml
25:80 (29%)
108:163 (24%)
view
55 x 2 cloudformation
cloudformation
External_Attributes.yaml
External_Templates.yaml
4:66 (62%)
4:66 (59%)
view
54 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
S3_triggered_import.yaml
450:510 (9%)
955:1016 (5%)
view
43 x 2 cloudformation
cloudformation
S3_Data_Lake.yaml
SMS_S3_drop.yaml
66:109 (4%)
94:138 (11%)
view
43 x 2 cloudformation
cloudformation
Pinpoint_Event_Processing.yaml
SMS_S3_drop.yaml
58:101 (15%)
94:138 (11%)
view
43 x 2 cloudformation
cloudformation
Pinpoint_Event_Processing.yaml
S3_Data_Lake.yaml
58:101 (15%)
66:109 (4%)
view
37 x 2 cloudformation
cloudformation
S3_triggered_import.yaml
S3_triggered_import.yaml
175:211 (3%)
436:472 (3%)
view
37 x 2 cloudformation
cloudformation
S3_triggered_import.yaml
S3_triggered_import.yaml
175:211 (3%)
270:306 (3%)
view
37 x 2 cloudformation
cloudformation
S3_triggered_import.yaml
S3_triggered_import.yaml
270:306 (3%)
436:472 (3%)
view
37 x 2 cloudformation
cloudformation
Advanced_Segmentation_S3.yaml
Federated_Segmentation.yaml
355:391 (8%)
183:219 (4%)
view
33 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
S3_triggered_import.yaml
207:240 (5%)
557:590 (3%)
view
32 x 2 cloudformation
cloudformation
Federated_Segmentation.yaml
S3_triggered_import.yaml
560:591 (4%)
559:590 (3%)
view
32 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
S3_triggered_import.yaml
132:164 (5%)
480:512 (3%)
view
32 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
Federated_Segmentation.yaml
209:240 (5%)
560:591 (4%)
view
31 x 2 cloudformation
cloudformation
Advanced_Segmentation_S3.yaml
Federated_Segmentation.yaml
416:446 (7%)
317:347 (4%)
view
30 x 2 cloudformation
cloudformation
Amazon_S3_triggered_import.yaml
S3_triggered_import.yaml
86:117 (5%)
418:448 (2%)
view
30 x 2 cloudformation
cloudformation
Create_campaign.yaml
S3_triggered_import.yaml
234:263 (9%)
680:709 (2%)
view