aws-samples / amazon-personalize-samples
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
  • 21% duplication:
    • 3,492 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 757 duplicated lines
  • 363 duplicates
system21% (757 lines)
Duplication per Extension
yaml34% (741 lines)
py1% (16 lines)
Duplication per Component (primary)
operations/ml_ops/personalize-step-functions25% (475 lines)
workshops/POC_in_a_box98% (95 lines)
workshops/POC_in_a_box/completed97% (94 lines)
operations/streaming_events10% (44 lines)
workshops/Reinvent_201980% (33 lines)
data_science/diagnose4% (16 lines)
operations/lambda_examples0% (0 lines)
operations/streaming_events/lambdas0% (0 lines)
operations/ml_ops_ds_sdk/lambda0% (0 lines)
operations/filter_rotator0% (0 lines)
operations/filter_rotator/src0% (0 lines)
data_science/offline_performance_evaluation0% (0 lines)

Duplication Between Components (50+ lines)

G workshops/POC_in_a_box workshops/POC_in_a_box workshops/POC_in_a_box/completed workshops/POC_in_a_box/completed workshops/POC_in_a_box--workshops/POC_in_a_box/completed 188 workshops/Reinvent_2019 workshops/Reinvent_2019 workshops/POC_in_a_box--workshops/Reinvent_2019 97 workshops/POC_in_a_box/completed--workshops/Reinvent_2019 95

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 363 duplicates...
Size#FoldersFilesLinesCode
44 x 2 next_steps/workshops/POC_in_a_box
next_steps/workshops/POC_in_a_box/completed
PersonalizePOCEE.yaml
PersonalizePOCEE.yaml
16:66 (80%)
16:66 (80%)
view
40 x 2 next_steps/workshops/POC_in_a_box
next_steps/workshops/POC_in_a_box/completed
PersonalizePOC.yaml
PersonalizePOC.yaml
1:48 (97%)
1:48 (97%)
view
33 x 2 next_steps/workshops/POC_in_a_box
next_steps/workshops/Reinvent_2019
PersonalizePOC.yaml
RI_PersonalizeWorkshop.yaml
13:49 (80%)
13:49 (80%)
view
32 x 2 next_steps/workshops/POC_in_a_box/completed
next_steps/workshops/Reinvent_2019
PersonalizePOC.yaml
RI_PersonalizeWorkshop.yaml
13:48 (78%)
13:48 (78%)
view
25 x 2 next_steps/workshops/POC_in_a_box
next_steps/workshops/Reinvent_2019
PersonalizePOCEE.yaml
RI_PersonalizeWorkshop.yaml
37:65 (45%)
21:48 (60%)
view
25 x 2 next_steps/workshops/POC_in_a_box/completed
next_steps/workshops/POC_in_a_box/completed
PersonalizePOC.yaml
PersonalizePOCEE.yaml
21:48 (60%)
37:65 (45%)
view
25 x 2 next_steps/workshops/POC_in_a_box
next_steps/workshops/POC_in_a_box/completed
PersonalizePOCEE.yaml
PersonalizePOC.yaml
37:65 (45%)
21:48 (60%)
view
25 x 2 next_steps/workshops/POC_in_a_box/completed
next_steps/workshops/Reinvent_2019
PersonalizePOCEE.yaml
RI_PersonalizeWorkshop.yaml
37:65 (45%)
21:48 (60%)
view
25 x 2 next_steps/workshops/POC_in_a_box
next_steps/workshops/POC_in_a_box/completed
PersonalizePOC.yaml
PersonalizePOCEE.yaml
21:48 (60%)
37:65 (45%)
view
25 x 2 next_steps/workshops/POC_in_a_box
next_steps/workshops/POC_in_a_box
PersonalizePOC.yaml
PersonalizePOCEE.yaml
21:48 (60%)
37:65 (45%)
view
22 x 2 next_steps/operations/streaming_events
next_steps/operations/streaming_events
template.yaml
template.yaml
268:289 (5%)
352:373 (5%)
view
12 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
1194:1205 (<1%)
1262:1273 (<1%)
view
12 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
1215:1226 (<1%)
1283:1294 (<1%)
view
12 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
1147:1158 (<1%)
1215:1226 (<1%)
view
12 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
1147:1158 (<1%)
1283:1294 (<1%)
view
11 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
1197:1207 (<1%)
1218:1228 (<1%)
view
11 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
956:966 (<1%)
1052:1062 (<1%)
view
11 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
956:966 (<1%)
1004:1014 (<1%)
view
11 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
1321:1331 (<1%)
1342:1352 (<1%)
view
11 x 2 next_steps/operations/ml...sonalize-step-functions
next_steps/operations/ml...sonalize-step-functions
template.yaml
template.yaml
918:928 (<1%)
1342:1352 (<1%)
view