aws-samples / aws-amplify-react-iot-pub-sub-using-lambda
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
  • 60% duplication:
    • 1,849 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,124 duplicated lines
  • 31 duplicates
system60% (1,124 lines)
Duplication per Extension
yml71% (872 lines)
js44% (240 lines)
css16% (12 lines)
Duplication per Component (primary)
amplify/#current-cloud-backend/auth/cognito81d9f49f100% (397 lines)
amplify/backend/auth/cognito81d9f49f100% (397 lines)
amplify/#current-cloud-backend/function/amplifyiotlambda/src100% (96 lines)
amplify/backend/function/amplifyiotlambda/src100% (96 lines)
amplify/backend/awscloudformation18% (78 lines)
src14% (60 lines)
public0% (0 lines)

Duplication Between Components (50+ lines)

G amplify/#current-cloud-backend/auth/cognito81d9f49f amplify/#current-cloud-backend/auth/cognito81d9f49f amplify/backend/auth/cognito81d9f49f amplify/backend/auth/cognito81d9f49f amplify/#current-cloud-backend/auth/cognito81d9f49f--amplify/backend/auth/cognito81d9f49f 794 amplify/#current-cloud-backend/function/amplifyiotlambda/src amplify/#current-cloud-backend/function/amplifyiotlambda/src amplify/backend/function/amplifyiotlambda/src amplify/backend/function/amplifyiotlambda/src amplify/#current-cloud-backend/function/amplifyiotlambda/src--amplify/backend/function/amplifyiotlambda/src 192

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 31 duplicates...
Size#FoldersFilesLinesCode
397 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
1:397 (100%)
1:397 (100%)
view
89 x 2 amplify/#current-cloud-b...on/amplifyiotlambda/src
amplify/backend/function/amplifyiotlambda/src
app.js
app.js
5:157 (100%)
5:157 (100%)
view
18 x 2 src
src
MQTTDisplay.js
MQTTDisplay.js
42:71 (11%)
181:208 (11%)
view
16 x 2 amplify/backend/awscloudformation
amplify/backend/awscloudformation
nested-cloudformation-stack.yml
nested-cloudformation-stack.yml
46:61 (3%)
67:82 (3%)
view
14 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/#current-cloud-b...nd/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
256:269 (3%)
281:294 (3%)
view
14 x 2 amplify/backend/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
256:269 (3%)
281:294 (3%)
view
14 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
256:269 (3%)
281:294 (3%)
view
14 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
281:294 (3%)
256:269 (3%)
view
12 x 2 amplify/#current-cloud-b...on/amplifyiotlambda/src
amplify/backend/function/amplifyiotlambda/src
app.js
app.js
94:111 (13%)
72:89 (13%)
view
12 x 2 amplify/backend/function/amplifyiotlambda/src
amplify/backend/function/amplifyiotlambda/src
app.js
app.js
72:89 (13%)
94:111 (13%)
view
12 x 2 amplify/#current-cloud-b...on/amplifyiotlambda/src
amplify/backend/function/amplifyiotlambda/src
app.js
app.js
72:89 (13%)
94:111 (13%)
view
12 x 2 amplify/#current-cloud-b...on/amplifyiotlambda/src
amplify/#current-cloud-b...on/amplifyiotlambda/src
app.js
app.js
72:89 (13%)
94:111 (13%)
view
7 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/#current-cloud-b...nd/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
198:204 (1%)
258:264 (1%)
view
7 x 2 amplify/#current-cloud-b...on/amplifyiotlambda/src
amplify/backend/function/amplifyiotlambda/src
index.js
index.js
1:9 (100%)
1:9 (100%)
view
7 x 2 amplify/backend/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
198:204 (1%)
283:289 (1%)
view
7 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
336:342 (1%)
345:351 (1%)
view
7 x 2 amplify/backend/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
198:204 (1%)
258:264 (1%)
view
7 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
198:204 (1%)
283:289 (1%)
view
7 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/#current-cloud-b...nd/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
198:204 (1%)
283:289 (1%)
view
7 x 2 amplify/#current-cloud-b...nd/auth/cognito81d9f49f
amplify/backend/auth/cognito81d9f49f
cognito81d9f49f-cloudformation-templa...
cognito81d9f49f-cloudformation-templa...
198:204 (1%)
258:264 (1%)
view