aws-samples / mlops-e2e
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
  • 12% duplication:
    • 1,835 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 227 duplicated lines
  • 32 duplicates
system12% (227 lines)
Duplication per Extension
ts9% (89 lines)
tsx24% (58 lines)
py9% (52 lines)
yml57% (28 lines)
Duplication per Component (primary)
consumers/online/website20% (58 lines)
infrastructure/lib12% (45 lines)
ml_pipeline8% (30 lines)
buildspecs57% (28 lines)
consumers/online/infrastructure5% (22 lines)
src10% (22 lines)
model_deploy/customResources/pipelineModel26% (14 lines)
infrastructure/functions/dataSourceMonitor14% (8 lines)
consumers/online/data-type0% (0 lines)
model_deploy/lib0% (0 lines)
configuration0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 32 duplicates...
Size#FoldersFilesLinesCode
14 x 2 buildspecs
buildspecs
build.yml
deploy.yml
1:17 (70%)
1:17 (93%)
view
14 x 2 consumers/online/infrast...mResources/websiteIndex
model_deploy/customResources/pipelineModel
index.ts
index.ts
104:120 (18%)
67:83 (26%)
view
12 x 2 infrastructure/lib
infrastructure/lib
codePipelineConstruct.ts
codePipelineConstruct.ts
235:248 (4%)
253:266 (4%)
view
11 x 2 src
src
preprocess.py
transform.py
35:46 (8%)
32:43 (27%)
view
9 x 2 infrastructure/lib
infrastructure/lib
codePipelineConstruct.ts
codePipelineConstruct.ts
221:230 (3%)
239:248 (3%)
view
9 x 2 infrastructure/lib
infrastructure/lib
codePipelineConstruct.ts
codePipelineConstruct.ts
221:230 (3%)
257:266 (3%)
view
8 x 2 ml_pipeline
ml_pipeline
get_pipeline_definition.py
run_pipeline.py
46:53 (19%)
45:52 (10%)
view
8 x 2 ml_pipeline
ml_pipeline
get_pipeline_definition.py
run_pipeline.py
32:39 (19%)
39:46 (10%)
view
8 x 2 consumers/online/infrast...mResources/websiteIndex
infrastructure/functions/dataSourceMonitor
index.ts
index.ts
31:41 (10%)
48:58 (14%)
view
8 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...s/AbaloneInsight/Result
index.tsx
index.tsx
137:145 (7%)
45:53 (14%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
89:96 (5%)
115:122 (5%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
102:109 (5%)
126:133 (5%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
50:57 (5%)
126:133 (5%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
50:57 (5%)
76:83 (5%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
63:70 (5%)
89:96 (5%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
76:83 (5%)
102:109 (5%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
89:96 (5%)
126:133 (5%)
view
6 x 2 infrastructure/lib
infrastructure/lib
codePipelineConstruct.ts
codePipelineConstruct.ts
273:279 (2%)
291:297 (2%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
50:57 (5%)
89:96 (5%)
view
6 x 2 consumers/online/website...nts/AbaloneInsight/Form
consumers/online/website...nts/AbaloneInsight/Form
index.tsx
index.tsx
63:70 (5%)
102:109 (5%)
view