aws-samples / aws-ecs-devops-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
  • 12% duplication:
    • 1,255 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 163 duplicated lines
  • 29 duplicates
system12% (163 lines)
Duplication per Extension
ts14% (163 lines)
Duplication per Component (primary)
lib/template/pattern26% (73 lines)
lib/template/stack35% (39 lines)
lib/template/construct61% (29 lines)
infra/ecs-service/construct3% (12 lines)
infra/common-infra24% (10 lines)
codes/sample-frontend-flask/app0% (0 lines)
codes/sample-backend-fastapi/app0% (0 lines)
lib/template0% (0 lines)
lib/template/common0% (0 lines)
infra0% (0 lines)
infra/ecs-service0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G lib/template/construct lib/template/construct lib/template/stack lib/template/stack lib/template/construct--lib/template/stack 50

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 29 duplicates...
Size#FoldersFilesLinesCode
19 x 2 lib/template/construct/base
lib/template/stack/base
base-construct.ts
base-stack.ts
61:96 (40%)
64:98 (40%)
view
10 x 2 infra/common-infra
lib/template/stack/vpc
vpc-infra-stack.ts
vpc-base-stack.ts
33:43 (24%)
50:60 (25%)
view
8 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
216:223 (3%)
232:239 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
197:203 (3%)
263:269 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
124:130 (3%)
197:203 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
124:130 (3%)
146:152 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
124:130 (3%)
248:254 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
146:152 (3%)
197:203 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
146:152 (3%)
248:254 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
102:108 (3%)
276:282 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
146:152 (3%)
263:269 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
248:254 (3%)
263:269 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
197:203 (3%)
248:254 (3%)
view
7 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
124:130 (3%)
263:269 (3%)
view
6 x 2 lib/template/construct/base
lib/template/stack/base
base-construct.ts
base-stack.ts
53:59 (12%)
56:62 (12%)
view
6 x 2 lib/template/stack/base
lib/template/stack/base
base-stack.ts
base-stack.ts
53:58 (12%)
61:66 (12%)
view
6 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
103:108 (2%)
264:269 (2%)
view
6 x 2 infra/ecs-service/construct
infra/ecs-service/construct
ecs-infra-const.ts
ecs-infra-const.ts
125:131 (4%)
143:149 (4%)
view
6 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
125:130 (2%)
277:282 (2%)
view
6 x 2 lib/template/pattern
lib/template/pattern
cloudwatch-pattern.ts
cloudwatch-pattern.ts
249:254 (2%)
277:282 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
13 x 2 lib/template/stack/vpc
infra/common-infra
vpc-base-stack.ts
vpc-infra-stack.ts
49:62 
32:45 
view