aws-samples / amazon-sagemaker-cdk-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
  • 23% duplication:
    • 1,514 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 350 duplicated lines
  • 42 duplicates
system23% (350 lines)
Duplication per Extension
yaml36% (202 lines)
py16% (148 lines)
Duplication per Component (primary)
notebook-teams31% (170 lines)
cron-inference80% (46 lines)
dask-fargate/cdk.out30% (40 lines)
cron-train28% (36 lines)
kinesis-inference52% (28 lines)
dask-fargate40% (16 lines)
dask-fargate/dockerstuff100% (8 lines)
api-lambda-sm16% (6 lines)
auto-model-deploy0% (0 lines)
auto-model-deploy/lambda0% (0 lines)
ROOT0% (0 lines)
notebook-teams/multinotebookefs0% (0 lines)
dask-fargate/binderhub0% (0 lines)
dask-fargate/dask_fargate0% (0 lines)
stepfn-batch0% (0 lines)

Duplication Between Components (50+ lines)

G cron-inference cron-inference kinesis-inference kinesis-inference cron-inference--kinesis-inference 56

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 42 duplicates...
Size#FoldersFilesLinesCode
16 x 2 dask-fargate
notebook-teams
setup.py
setup.py
31:53 (43%)
26:48 (50%)
view
13 x 2 cron-inference
kinesis-inference
app.py
app.py
20:34 (30%)
32:45 (33%)
view
11 x 2 cron-inference
cron-train
app.py
app.py
44:58 (25%)
47:61 (25%)
view
11 x 2 cron-inference
cron-train
app.py
app.py
11:23 (25%)
19:31 (25%)
view
9 x 2 notebook-teams
notebook-teams
out.yaml
out.yaml
285:293 (1%)
298:306 (1%)
view
9 x 2 cron-inference
kinesis-inference
lambda-handler.py
lambda-handler.py
15:24 (64%)
15:24 (64%)
view
8 x 2 dask-fargate/cdk.out/ass...6649baf3d9e3c7e1a9aef0f
dask-fargate/cdk.out/ass...164b8ded5fda12a8e38d012
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 dask-fargate/cdk.out/ass...164b8ded5fda12a8e38d012
dask-fargate/cdk.out/ass...111c79971ef4dee6e48ffcf
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 dask-fargate/cdk.out/ass...6649baf3d9e3c7e1a9aef0f
dask-fargate/cdk.out/ass...7b10dc61aa00ce715a2aca9
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 notebook-teams
notebook-teams
out.yaml
out.yaml
148:155 (1%)
197:204 (1%)
view
8 x 2 notebook-teams
notebook-teams
out.yaml
out.yaml
387:394 (1%)
406:413 (1%)
view
8 x 2 dask-fargate/cdk.out/ass...7b10dc61aa00ce715a2aca9
dask-fargate/cdk.out/ass...3d8a81971816320b2d6f12d
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 dask-fargate/cdk.out/ass...164b8ded5fda12a8e38d012
dask-fargate/cdk.out/ass...3d8a81971816320b2d6f12d
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 dask-fargate/cdk.out/ass...6649baf3d9e3c7e1a9aef0f
dask-fargate/cdk.out/ass...111c79971ef4dee6e48ffcf
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 dask-fargate/cdk.out/ass...164b8ded5fda12a8e38d012
dask-fargate/cdk.out/ass...7b10dc61aa00ce715a2aca9
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 dask-fargate/cdk.out/ass...164b8ded5fda12a8e38d012
dask-fargate/dockerstuff
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 dask-fargate/cdk.out/ass...111c79971ef4dee6e48ffcf
dask-fargate/dockerstuff
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 notebook-teams
notebook-teams
out.yaml
out.yaml
377:384 (1%)
415:422 (1%)
view
8 x 2 dask-fargate/cdk.out/ass...6649baf3d9e3c7e1a9aef0f
dask-fargate/dockerstuff
dask.yaml
dask.yaml
1:10 (100%)
1:10 (100%)
view
8 x 2 notebook-teams
notebook-teams
out.yaml
out.yaml
23:30 (1%)
97:104 (1%)
view