aws-samples / aws-appsync-iot-core-realtime-example
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
  • 6% duplication:
    • 902 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 61 duplicated lines
  • 16 duplicates
system6% (61 lines)
Duplication per Extension
js13% (61 lines)
Duplication per Component (primary)
mobile/src/graphql54% (47 lines)
sensor10% (14 lines)
mobile0% (0 lines)
mobile/amplify/backend0% (0 lines)
mobile/android/app0% (0 lines)
mobile/src/api0% (0 lines)
mobile/src0% (0 lines)
mobile/src/screens0% (0 lines)
mobile/src/components0% (0 lines)
mobile/ios/mobileTests0% (0 lines)
mobile/ios/mobile0% (0 lines)
Longest Duplicates
The list of 16 longest duplicates.
See data for all 16 duplicates...
Size#FoldersFilesLinesCode
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
queries.js
10:19 (19%)
15:24 (23%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
mutations.js
10:19 (19%)
26:35 (19%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
queries.js
42:51 (19%)
15:24 (23%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
queries.js
26:35 (19%)
15:24 (23%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
queries.js
subscriptions.js
15:24 (23%)
7:16 (72%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
mutations.js
26:35 (19%)
42:51 (19%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
subscriptions.js
26:35 (19%)
7:16 (72%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
subscriptions.js
42:51 (19%)
7:16 (72%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
subscriptions.js
10:19 (19%)
7:16 (72%)
view
8 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
mutations.js
10:19 (19%)
42:51 (19%)
view
7 x 2 mobile/src/graphql
mobile/src/graphql
queries.js
queries.js
15:21 (20%)
33:39 (20%)
view
7 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
queries.js
42:48 (16%)
33:39 (20%)
view
7 x 2 sensor
sensor
create-sensor.js
delete-sensor.js
1:16 (10%)
1:16 (15%)
view
7 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
queries.js
10:16 (16%)
33:39 (20%)
view
7 x 2 mobile/src/graphql
mobile/src/graphql
queries.js
subscriptions.js
33:39 (20%)
7:13 (63%)
view
7 x 2 mobile/src/graphql
mobile/src/graphql
mutations.js
queries.js
26:32 (16%)
33:39 (20%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 3 mobile/src/graphql
mobile/src/graphql
mobile/src/graphql
subscriptions.js
mutations.js
queries.js
6:14 
9:17 
14:22 
view