aws-samples / amazon-personalize-immersion-day
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
  • 19% duplication:
    • 2,402 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 478 duplicated lines
  • 309 duplicates
system19% (478 lines)
Duplication per Extension
yaml26% (478 lines)
Duplication per Component (primary)
automation/ml_ops32% (434 lines)
automation/streaming_events10% (44 lines)
ROOT0% (0 lines)
automation/streaming_events/lambdas/getRecommendations0% (0 lines)
automation/streaming_events/lambdas/putevents0% (0 lines)
automation/ml_ops/shared/python0% (0 lines)
automation/ml_ops/lambdas/wait-delete-datasetgroup0% (0 lines)
automation/ml_ops/lambdas/s3lambda0% (0 lines)
automation/ml_ops/lambdas/wait-delete-dataset0% (0 lines)
automation/ml_ops/lambdas/wait-delete-solution0% (0 lines)
automation/ml_ops/lambdas/list-solutions0% (0 lines)
automation/ml_ops/lambdas/create-solution0% (0 lines)
automation/ml_ops/lambdas/create-campaign0% (0 lines)
automation/ml_ops/lambdas/event-tracker0% (0 lines)
automation/ml_ops/lambdas/notify-delete0% (0 lines)
automation/ml_ops/lambdas/delete-campaign0% (0 lines)
automation/ml_ops/lambdas/list-solution-versions0% (0 lines)
automation/ml_ops/lambdas/wait-delete-campaign0% (0 lines)
automation/ml_ops/lambdas/import-data0% (0 lines)
automation/ml_ops/lambdas/create-dataset0% (0 lines)
automation/ml_ops/lambdas/delete-datasetgroup0% (0 lines)
automation/ml_ops/lambdas/wait-solution-version0% (0 lines)
automation/ml_ops/lambdas/delete-tracker0% (0 lines)
automation/ml_ops/lambdas/notify0% (0 lines)
automation/ml_ops/lambdas/create-datasetgroup0% (0 lines)
automation/ml_ops/lambdas/delete-solution0% (0 lines)
automation/ml_ops/lambdas/list-datasets0% (0 lines)
automation/ml_ops/lambdas/wait-delete-tracker0% (0 lines)
automation/ml_ops/lambdas/list-campaigns0% (0 lines)
automation/ml_ops/lambdas/delete-dataset0% (0 lines)
automation/ml_ops/lambdas/list-trackers0% (0 lines)
notebooks/Automated-Media0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 309 duplicates...
Size#FoldersFilesLinesCode
22 x 2 automation/streaming_events
automation/streaming_events
template.yaml
template.yaml
268:289 (5%)
352:373 (5%)
view
12 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1155:1166 (<1%)
1223:1234 (<1%)
view
12 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1134:1145 (<1%)
1202:1213 (<1%)
view
12 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1087:1098 (<1%)
1155:1166 (<1%)
view
12 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1087:1098 (<1%)
1223:1234 (<1%)
view
11 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1205:1215 (<1%)
1226:1236 (<1%)
view
11 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
896:906 (<1%)
944:954 (<1%)
view
11 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1137:1147 (<1%)
1158:1168 (<1%)
view
11 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
896:906 (<1%)
992:1002 (<1%)
view
11 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
858:868 (<1%)
1261:1271 (<1%)
view
11 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
944:954 (<1%)
992:1002 (<1%)
view
10 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
965:974 (<1%)
1013:1022 (<1%)
view
10 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
917:926 (<1%)
1013:1022 (<1%)
view
10 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
917:926 (<1%)
965:974 (<1%)
view
9 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1158:1166 (<1%)
1261:1269 (<1%)
view
9 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
874:882 (<1%)
1035:1043 (<1%)
view
9 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
858:866 (<1%)
1226:1234 (<1%)
view
9 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1090:1098 (<1%)
1137:1145 (<1%)
view
9 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1090:1098 (<1%)
1205:1213 (<1%)
view
9 x 2 automation/ml_ops
automation/ml_ops
template.yaml
template.yaml
1205:1213 (<1%)
1261:1269 (<1%)
view