aws-samples / amazon-rekognition-id-verification-sample-with-amplify
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
  • 32% duplication:
    • 4,719 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,556 duplicated lines
  • 356 duplicates
system32% (1,556 lines)
Duplication per Extension
ts48% (730 lines)
js38% (424 lines)
tsx26% (402 lines)
Duplication per Component (primary)
src49% (423 lines)
components25% (339 lines)
src/graphql58% (307 lines)
amplify/backend22% (284 lines)
src/models71% (140 lines)
pages49% (63 lines)
ROOT0% (0 lines)
infra/lib0% (0 lines)
infra0% (0 lines)
common0% (0 lines)
components/Layout0% (0 lines)
styles0% (0 lines)
pages/api0% (0 lines)

Duplication Between Components (50+ lines)

G amplify/backend amplify/backend src/graphql src/graphql amplify/backend--src/graphql 378

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 356 duplicates...
Size#FoldersFilesLinesCode
42 x 2 components
components
register-new-user-with-idcard.tsx
register-new-user.tsx
282:331 (9%)
192:241 (15%)
view
41 x 2 components
components
register-new-user-with-idcard.tsx
register-new-user.tsx
76:116 (9%)
52:92 (15%)
view
30 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
queries.ts
24:56 (14%)
102:134 (13%)
view
30 x 2 src/models
src/models
schema.js
schema.js
72:107 (15%)
175:211 (15%)
view
28 x 2 amplify/backend/function/idvworkflowfn/src
amplify/backend/function/idvworkflowfn/src
idvfunctions.js
idvfunctions.js
469:507 (5%)
544:582 (5%)
view
26 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
queries.ts
93:121 (12%)
225:253 (11%)
view
23 x 2 components
components
register-new-user-with-idcard.tsx
register-new-user.tsx
207:237 (5%)
123:153 (8%)
view
19 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
queries.ts
35:56 (9%)
147:168 (8%)
view
19 x 2 src/graphql
src/graphql
queries.ts
queries.ts
113:134 (8%)
147:168 (8%)
view
18 x 2 src
src
API.ts
API.ts
708:725 (2%)
738:755 (2%)
view
18 x 2 src
src
API.ts
API.ts
678:695 (2%)
708:725 (2%)
view
18 x 2 src
src
API.ts
API.ts
678:695 (2%)
738:755 (2%)
view
18 x 2 src/models
src/models
schema.js
schema.js
40:58 (9%)
131:149 (9%)
view
15 x 2 components
components
register-new-user-with-idcard.tsx
register-new-user.tsx
424:438 (3%)
306:320 (5%)
view
15 x 2 src/models
src/models
schema.js
schema.js
5:19 (7%)
110:124 (7%)
view
15 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
queries.ts
39:56 (7%)
83:100 (6%)
view
15 x 2 src/graphql
src/graphql
queries.ts
queries.ts
83:100 (6%)
117:134 (6%)
view
15 x 2 src/graphql
src/graphql
queries.ts
queries.ts
83:100 (6%)
151:168 (6%)
view
14 x 2 src
src
API.ts
API.ts
423:436 (1%)
445:458 (1%)
view
14 x 2 src
src
API.ts
API.ts
423:436 (1%)
843:856 (1%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
31 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
queries.ts
24:55 
102:133 
view
27 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
queries.ts
93:120 
225:252 
view
12 x 2 src/graphql
src/graphql
queries.ts
mutations.ts
52:64 
88:100 
view
8 x 3 amplify/backend/function/idvworkflowfn/src
amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
graphqlhelpers.js
mutations.ts
63:71 
80:88 
190:198 
view
6 x 3 amplify/backend/function/idvworkflowfn/src
src/graphql
src/graphql
graphqlhelpers.js
queries.ts
mutations.ts
13:19 
171:177 
148:154 
view
13 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
mutations.ts
59:72 
186:199 
view
13 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
mutations.ts
76:89 
218:231 
view
8 x 2 amplify/backend/function/idvworkflowfn/src
src/graphql
graphqlhelpers.js
queries.ts
12:20 
170:178 
view