aws-samples / amplify-video-community
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
  • 40% duplication:
    • 10,135 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,081 duplicated lines
  • 2,594 duplicates
system40% (4,081 lines)
Duplication per Extension
ts65% (2,726 lines)
js60% (802 lines)
tsx10% (427 lines)
graphql67% (126 lines)
Duplication per Component (primary)
apps/community-website/src72% (1,518 lines)
apps/community-website/src/graphql82% (1,079 lines)
apps/community-website/src/models77% (547 lines)
apps/community-website/amplify/backend/function50% (255 lines)
apps/community-website/src/shared/components10% (214 lines)
apps/community-website/src/shared/admin19% (133 lines)
apps/community-website/src/shared/api17% (129 lines)
apps/community-website/amplify/backend/api67% (126 lines)
apps/community-website/src/pages/videos18% (80 lines)
apps/community-website/amplify/backend/auth0% (0 lines)
apps/community-website0% (0 lines)
apps/community-website/src/shared/constants0% (0 lines)
apps/community-website/src/shared/theme0% (0 lines)
apps/community-website/src/shared/home0% (0 lines)
apps/community-website/src/shared/hooks0% (0 lines)
apps/community-website/src/styles0% (0 lines)
apps/community-website/src/pages0% (0 lines)
apps/community-website/src/pages/admin0% (0 lines)
apps/community-website/src/pages/video0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G apps/community-website/amplify/backend/function apps/community-website/amplify/backend/function apps/community-website/src/graphql apps/community-website/src/graphql apps/community-website/amplify/backend/function--apps/community-website/src/graphql 1093 apps/community-website/src/shared/api apps/community-website/src/shared/api apps/community-website/amplify/backend/function--apps/community-website/src/shared/api 159 apps/community-website/src/graphql--apps/community-website/src/shared/api 656 apps/community-website/src/pages/videos apps/community-website/src/pages/videos apps/community-website/src/shared/components apps/community-website/src/shared/components apps/community-website/src/pages/videos--apps/community-website/src/shared/components 68

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 2,594 duplicates...
Size#FoldersFilesLinesCode
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
852:895 (2%)
1937:1980 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
852:895 (2%)
1890:1933 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
800:843 (2%)
1408:1451 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
852:895 (2%)
1984:2027 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
1937:1980 (2%)
1984:2027 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
904:947 (2%)
1408:1451 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
852:895 (2%)
904:947 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
904:947 (2%)
1937:1980 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
904:947 (2%)
1984:2027 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
904:947 (2%)
1890:1933 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
800:843 (2%)
904:947 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
1890:1933 (2%)
1937:1980 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
800:843 (2%)
852:895 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
1408:1451 (2%)
1890:1933 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
1890:1933 (2%)
1984:2027 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
800:843 (2%)
1984:2027 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
1408:1451 (2%)
1984:2027 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
1408:1451 (2%)
1937:1980 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
800:843 (2%)
1890:1933 (2%)
view
44 x 2 apps/community-website/src
apps/community-website/src
API.ts
API.ts
800:843 (2%)
1937:1980 (2%)
view
Duplicated Units
The list of top 13 duplicated units.
See data for all 13 unit duplicates...
Size#FoldersFilesLinesCode
37 x 3 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
apps/community-website/src/graphql
gql.js
queries.ts
mutations.ts
159:196 
188:225 
283:320 
view
27 x 4 apps/community-website/a...on/resourcesManager/src
apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
apps/community-website/src/graphql
gql.js
gql.js
queries.ts
mutations.ts
7:34 
79:106 
12:39 
10:37 
view
27 x 2 apps/community-website/src/graphql
apps/community-website/src/graphql
queries.ts
mutations.ts
325:352 
520:547 
view
26 x 2 apps/community-website/src/graphql
apps/community-website/src/graphql
queries.ts
mutations.ts
266:292 
418:444 
view
16 x 3 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
apps/community-website/src/graphql
gql.js
queries.ts
mutations.ts
239:255 
146:162 
211:227 
view
10 x 2 apps/community-website/src/graphql
apps/community-website/src/graphql
queries.ts
mutations.ts
76:86 
115:125 
view
6 x 2 apps/community-website/src/graphql
apps/community-website/src/graphql
queries.ts
mutations.ts
117:123 
169:175 
view
32 x 2 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
gql.js
mutations.ts
3:35 
6:38 
view
32 x 2 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
gql.js
mutations.ts
120:152 
76:108 
view
42 x 2 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
gql.js
mutations.ts
155:197 
369:411 
view
32 x 2 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
gql.js
mutations.ts
200:232 
41:73 
view
21 x 2 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
gql.js
mutations.ts
235:256 
255:276 
view
29 x 2 apps/community-website/a...on/resourcesManager/src
apps/community-website/src/graphql
gql.js
queries.ts
78:107 
11:40 
view