aws-samples / aws-appsync-iot-core-realtime-dashboard
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
  • 26% duplication:
    • 1,754 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 458 duplicated lines
  • 126 duplicates
system26% (458 lines)
Duplication per Extension
ts58% (406 lines)
js12% (38 lines)
tsx3% (14 lines)
Duplication per Component (primary)
web/src53% (272 lines)
web/src/graphql60% (134 lines)
sensor14% (24 lines)
web/amplify/backend/function11% (14 lines)
web/src/pages/MapPage8% (7 lines)
web/src/pages/SensorPage8% (7 lines)
web0% (0 lines)
web/amplify/backend/api0% (0 lines)
web/amplify/backend/auth0% (0 lines)
web/src/api0% (0 lines)
web/src/components/SensorChart0% (0 lines)
web/src/components/SensorValuePanel0% (0 lines)
web/src/components/AppBar0% (0 lines)
web/src/components/Layout0% (0 lines)
web/public0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 126 duplicates...
Size#FoldersFilesLinesCode
14 x 2 web/src
web/src
API.ts
API.ts
20:33 (3%)
180:193 (3%)
view
13 x 2 web/src
web/src
API.ts
API.ts
408:420 (2%)
454:466 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
276:288 (2%)
318:330 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
276:288 (2%)
297:309 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
276:288 (2%)
408:420 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
454:466 (2%)
470:482 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
408:420 (2%)
470:482 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
297:309 (2%)
470:482 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
318:330 (2%)
470:482 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
276:288 (2%)
470:482 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
297:309 (2%)
454:466 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
318:330 (2%)
454:466 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
276:288 (2%)
454:466 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
318:330 (2%)
408:420 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
297:309 (2%)
318:330 (2%)
view
13 x 2 web/src
web/src
API.ts
API.ts
297:309 (2%)
408:420 (2%)
view
11 x 2 web/src/graphql
web/src/graphql
mutations.ts
mutations.ts
53:65 (12%)
72:84 (12%)
view
11 x 2 web/src/graphql
web/src/graphql
mutations.ts
mutations.ts
53:65 (12%)
91:103 (12%)
view
11 x 2 web/src/graphql
web/src/graphql
mutations.ts
queries.ts
53:65 (12%)
65:77 (13%)
view
11 x 2 web/src
web/src
API.ts
API.ts
276:286 (2%)
432:442 (2%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
11 x 3 web/src/graphql
web/src/graphql
web/src/graphql
subscriptions.ts
queries.ts
mutations.ts
7:18 
64:75 
52:63 
view
6 x 2 web/src/graphql
web/src/graphql
queries.ts
mutations.ts
35:41 
10:16 
view