aws-samples / amazon-sagemaker-built-in-algorithms-mlops-pipeline-using-aws-cdk
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:
    • 937 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 180 duplicated lines
  • 30 duplicates
system19% (180 lines)
Duplication per Extension
ts21% (180 lines)
Duplication per Component (primary)
lib/template/pattern25% (82 lines)
infra/stack/mlops19% (62 lines)
lib/template/construct45% (18 lines)
lib/template/stack30% (18 lines)
codes/lambda/mlops-trigger-statemachine0% (0 lines)
codes/lambda/mlops-query-endpoint0% (0 lines)
codes/lambda/mlops-query-accuracy0% (0 lines)
codes/glue/churn-xgboost0% (0 lines)
lib/template0% (0 lines)
infra0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 30 duplicates...
Size#FoldersFilesLinesCode
18 x 2 lib/template/construct/base
lib/template/stack/base
base-construct.ts
base-stack.ts
56:81 (45%)
74:99 (36%)
view
11 x 2 infra/stack/mlops
infra/stack/mlops
mlops-pipeline-stack.ts
mlops-pipeline-stack.ts
348:360 (3%)
368:380 (3%)
view
9 x 2 infra/stack/mlops
lib/template/pattern
mlops-pipeline-stack.ts
glue-job-construct.ts
255:263 (2%)
30:38 (17%)
view
8 x 2 infra/stack/mlops
infra/stack/mlops
mlops-pipeline-stack.ts
mlops-pipeline-stack.ts
290:297 (2%)
301:308 (2%)
view
8 x 2 infra/stack/mlops
infra/stack/mlops
mlops-pipeline-stack.ts
mlops-pipeline-stack.ts
281:288 (2%)
301:308 (2%)
view
8 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
216:223 (3%)
232:239 (3%)
view
8 x 2 infra/stack/mlops
infra/stack/mlops
mlops-pipeline-stack.ts
mlops-pipeline-stack.ts
281:288 (2%)
290:297 (2%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
124:130 (3%)
263:269 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
248:254 (3%)
263:269 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
146:152 (3%)
263:269 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
146:152 (3%)
248:254 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
146:152 (3%)
197:203 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
102:108 (3%)
276:282 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
197:203 (3%)
263:269 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
124:130 (3%)
197:203 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
124:130 (3%)
146:152 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
124:130 (3%)
248:254 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
197:203 (3%)
248:254 (3%)
view
6 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
249:254 (2%)
277:282 (2%)
view
6 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-dashboard-construct.ts
cloudwatch-dashboard-construct.ts
198:203 (2%)
277:282 (2%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
7 x 2 lib/template/construct/base
lib/template/stack/base
base-construct.ts
base-stack.ts
64:73 
82:91 
view
6 x 2 lib/template/construct/base
lib/template/stack/base
base-construct.ts
base-stack.ts
75:82 
93:100 
view