aws-samples / amazon-sagemaker-drift-detection
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
  • 37% duplication:
    • 4,082 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,539 duplicated lines
  • 89 duplicates
system37% (1,539 lines)
Duplication per Extension
py38% (1,419 lines)
yml29% (120 lines)
Duplication per Component (primary)
infra52% (827 lines)
batch_pipeline/infra67% (174 lines)
deployment_pipeline/infra35% (159 lines)
ROOT30% (141 lines)
batch_pipeline41% (70 lines)
deployment_pipeline33% (47 lines)
build_pipeline33% (36 lines)
build_pipeline/pipelines7% (35 lines)
batch_pipeline/pipelines14% (35 lines)
build_pipeline/infra28% (15 lines)
lambda/build0% (0 lines)

Duplication Between Components (50+ lines)

G batch_pipeline/infra batch_pipeline/infra deployment_pipeline/infra deployment_pipeline/infra batch_pipeline/infra--deployment_pipeline/infra 318 batch_pipeline batch_pipeline build_pipeline build_pipeline batch_pipeline--build_pipeline 72 deployment_pipeline deployment_pipeline batch_pipeline--deployment_pipeline 70 build_pipeline--deployment_pipeline 58 batch_pipeline/pipelines batch_pipeline/pipelines build_pipeline/pipelines build_pipeline/pipelines batch_pipeline/pipelines--build_pipeline/pipelines 70

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 89 duplicates...
Size#FoldersFilesLinesCode
134 x 2 batch_pipeline/infra
deployment_pipeline/infra
model_registry.py
model_registry.py
8:218 (82%)
8:218 (92%)
view
39 x 2 infra
infra
batch_pipeline_construct.py
build_pipeline_construct.py
147:186 (11%)
178:217 (10%)
view
38 x 2 infra
infra
batch_pipeline_construct.py
build_pipeline_construct.py
341:388 (11%)
360:407 (10%)
view
34 x 2 infra
infra
batch_pipeline_construct.py
deploy_pipeline_construct.py
307:345 (9%)
219:257 (13%)
view
30 x 2 infra
infra
batch_pipeline_construct.py
build_pipeline_construct.py
116:145 (8%)
118:147 (8%)
view
25 x 2 infra
infra
build_pipeline_construct.py
deploy_pipeline_construct.py
90:114 (7%)
88:112 (10%)
view
25 x 2 infra
infra
batch_pipeline_construct.py
build_pipeline_construct.py
38:68 (7%)
38:68 (7%)
view
25 x 2 infra
infra
batch_pipeline_construct.py
build_pipeline_construct.py
259:289 (7%)
312:342 (7%)
view
24 x 2 infra
infra
batch_pipeline_construct.py
build_pipeline_construct.py
74:102 (6%)
75:103 (6%)
view
21 x 2 infra
infra
batch_pipeline_construct.py
deploy_pipeline_construct.py
43:65 (6%)
59:81 (8%)
view
21 x 2 infra
infra
build_pipeline_construct.py
deploy_pipeline_construct.py
43:65 (5%)
59:81 (8%)
view
19 x 2 infra
infra
build_pipeline_construct.py
deploy_pipeline_construct.py
187:205 (5%)
145:163 (7%)
view
19 x 2 infra
infra
batch_pipeline_construct.py
deploy_pipeline_construct.py
156:174 (5%)
145:163 (7%)
view
18 x 2 batch_pipeline/pipelines
build_pipeline/pipelines
pipeline.py
pipeline.py
41:80 (10%)
47:86 (5%)
view
18 x 2 ROOT
ROOT
drift-service-catalog.yml
drift-service-catalog.yml
260:277 (4%)
285:302 (4%)
view
17 x 2 infra
infra
batch_pipeline_construct.py
build_pipeline_construct.py
20:36 (4%)
20:36 (4%)
view
17 x 2 batch_pipeline
build_pipeline
setup.py
setup.py
23:39 (50%)
20:36 (54%)
view
16 x 2 ROOT
ROOT
drift-service-catalog.yml
drift-service-catalog.yml
45:60 (3%)
96:111 (3%)
view
16 x 2 ROOT
ROOT
drift-service-catalog.yml
drift-service-catalog.yml
79:94 (3%)
96:111 (3%)
view
16 x 2 ROOT
ROOT
drift-service-catalog.yml
drift-service-catalog.yml
62:77 (3%)
96:111 (3%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
10 x 2 deployment_pipeline/infra
batch_pipeline/infra
model_registry.py
model_registry.py
0:0 
0:0 
view
16 x 2 build_pipeline/pipelines
batch_pipeline/pipelines
pipeline.py
pipeline.py
0:0 
0:0 
view
12 x 2 deployment_pipeline/infra
batch_pipeline/infra
model_registry.py
model_registry.py
0:0 
0:0 
view