aws-samples / appsync-refarch-realtime
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
  • 18% duplication:
    • 1,704 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 311 duplicated lines
  • 107 duplicates
system18% (311 lines)
Duplication per Extension
js22% (185 lines)
graphql37% (79 lines)
yaml14% (33 lines)
yml4% (14 lines)
Duplication per Component (primary)
src/graphql62% (93 lines)
sam-app/get-movie46% (92 lines)
sam-app14% (33 lines)
amplify/backend/api/realtime/build18% (29 lines)
amplify/backend/api/realtime100% (25 lines)
ROOT39% (25 lines)
amplify/backend/auth/realtime99d78ebe4% (14 lines)
src0% (0 lines)
public0% (0 lines)

Duplication Between Components (50+ lines)

G sam-app/get-movie sam-app/get-movie src/graphql src/graphql sam-app/get-movie--src/graphql 127 amplify/backend/api/realtime amplify/backend/api/realtime ROOT ROOT amplify/backend/api/realtime--ROOT 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 107 duplicates...
Size#FoldersFilesLinesCode
25 x 2 amplify/backend/api/realtime
ROOT
schema.graphql
schema.graphql
1:29 (100%)
1:29 (100%)
view
12 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
155:166 (6%)
217:228 (6%)
view
12 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
176:187 (6%)
217:228 (6%)
view
12 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
155:166 (6%)
176:187 (6%)
view
11 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
135:145 (5%)
197:207 (5%)
view
11 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
135:145 (5%)
218:228 (5%)
view
11 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
135:145 (5%)
156:166 (5%)
view
11 x 2 amplify/backend/api/realtime/build
ROOT
schema.graphql
schema.graphql
10:22 (6%)
10:22 (44%)
view
11 x 2 amplify/backend/api/realtime/build
amplify/backend/api/realtime
schema.graphql
schema.graphql
10:22 (6%)
10:22 (44%)
view
11 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
135:145 (5%)
177:187 (5%)
view
11 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
197:207 (5%)
218:228 (5%)
view
11 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
177:187 (5%)
197:207 (5%)
view
11 x 2 sam-app/get-movie
sam-app/get-movie
app.js
app.js
156:166 (5%)
197:207 (5%)
view
7 x 2 sam-app
sam-app
template.yaml
template.yaml
91:97 (3%)
217:223 (3%)
view
7 x 2 sam-app/get-movie
src/graphql
app.js
mutations.js
22:30 (3%)
12:20 (13%)
view
7 x 2 sam-app/get-movie
src/graphql
app.js
mutations.js
56:64 (3%)
52:60 (13%)
view
7 x 2 amplify/backend/auth/realtime99d78ebe
amplify/backend/auth/realtime99d78ebe
realtime99d78ebe-cloudformation-templ...
realtime99d78ebe-cloudformation-templ...
262:268 (2%)
283:289 (2%)
view
7 x 2 sam-app/get-movie
src/graphql
app.js
mutations.js
32:40 (3%)
22:30 (13%)
view
6 x 2 src/graphql
src/graphql
subscriptions.js
subscriptions.js
23:30 (11%)
33:40 (11%)
view
6 x 2 sam-app/get-movie
src/graphql
app.js
subscriptions.js
23:30 (3%)
13:20 (11%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
6 x 4 src/graphql
src/graphql
src/graphql
sam-app/get-movie
mutations.js
mutations.js
queries.js
app.js
12:18 
22:28 
5:11 
12:18 
view
6 x 4 src/graphql
src/graphql
src/graphql
sam-app/get-movie
mutations.js
mutations.js
queries.js
app.js
42:48 
52:58 
32:38 
56:62 
view