aws-samples / amazon-location-service-pettracker-demo
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
  • 14% duplication:
    • 2,455 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 367 duplicated lines
  • 60 duplicates
system14% (367 lines)
Duplication per Extension
js38% (110 lines)
py33% (96 lines)
ts12% (74 lines)
yaml16% (71 lines)
graphql10% (16 lines)
Duplication per Component (primary)
cdk/lib/position-lambda25% (77 lines)
cdk/lib12% (74 lines)
ROOT16% (71 lines)
cdk/lib/custom-tracker-handler70% (49 lines)
web/src/graphql56% (49 lines)
cdk/lib/custom-certificate-handler38% (35 lines)
emulator11% (12 lines)
cdk/lib/tracker-lambda0% (0 lines)
cdk0% (0 lines)
web/amplify/backend0% (0 lines)
web/src0% (0 lines)
web/src/components0% (0 lines)
web/public0% (0 lines)

Duplication Between Components (50+ lines)

G cdk/lib/custom-certificate-handler cdk/lib/custom-certificate-handler cdk/lib/custom-tracker-handler cdk/lib/custom-tracker-handler cdk/lib/custom-certificate-handler--cdk/lib/custom-tracker-handler 70

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 60 duplicates...
Size#FoldersFilesLinesCode
28 x 2 cdk/lib/custom-certificate-handler
cdk/lib/custom-tracker-handler
cfnresponse.py
cfnresponse.py
7:42 (100%)
7:42 (100%)
view
13 x 2 ROOT
ROOT
cloud9-cfn.yaml
cloud9-cfn.yaml
186:198 (3%)
309:321 (3%)
view
13 x 2 cdk/lib
cdk/lib
pettracker-als-lambda.ts
pettracker-position-lambda.ts
70:88 (22%)
73:91 (22%)
view
12 x 2 cdk/lib
cdk/lib
pettracker-als-lambda.ts
pettracker-position-lambda.ts
45:59 (21%)
46:60 (20%)
view
11 x 2 ROOT
ROOT
cloud9-cfn.yaml
cloud9-cfn.yaml
365:375 (2%)
405:415 (2%)
view
11 x 2 ROOT
ROOT
cloud9-cfn.yaml
cloud9-cfn.yaml
365:375 (2%)
384:394 (2%)
view
11 x 2 ROOT
ROOT
cloud9-cfn.yaml
cloud9-cfn.yaml
384:394 (2%)
405:415 (2%)
view
8 x 2 cdk/lib/position-lambda
cdk/lib/position-lambda
schema.graphql
schema.graphql
103:110 (5%)
130:137 (5%)
view
7 x 2 cdk/lib/position-lambda/graphql
web/src/graphql
queries.js
queries.js
16:22 (29%)
16:22 (29%)
view
7 x 2 cdk/lib/custom-tracker-handler
cdk/lib/custom-tracker-handler
custom-tracker-lambda.py
custom-tracker-lambda.py
24:31 (16%)
42:49 (16%)
view
7 x 2 cdk/lib/custom-certificate-handler
cdk/lib/custom-tracker-handler
custom-certificate-lambda.py
custom-tracker-lambda.py
71:78 (11%)
58:65 (16%)
view
7 x 2 cdk/lib
cdk/lib
custom-certificate-resource.ts
custom-tracker-resource.ts
48:54 (6%)
46:52 (10%)
view
6 x 2 web/src/graphql
web/src/graphql
mutations.js
subscriptions.js
10:17 (16%)
29:36 (22%)
view
6 x 2 cdk/lib/position-lambda/graphql
cdk/lib/position-lambda/graphql
mutations.js
subscriptions.js
10:17 (16%)
18:25 (22%)
view
6 x 2 cdk/lib/position-lambda/graphql
cdk/lib/position-lambda/graphql
queries.js
subscriptions.js
7:14 (25%)
29:36 (22%)
view
6 x 2 cdk/lib/position-lambda/graphql
cdk/lib/position-lambda/graphql
mutations.js
mutations.js
24:31 (16%)
38:45 (16%)
view
6 x 2 web/src/graphql
web/src/graphql
mutations.js
queries.js
38:45 (16%)
7:14 (25%)
view
6 x 2 cdk/lib/position-lambda/graphql
cdk/lib/position-lambda/graphql
mutations.js
subscriptions.js
38:45 (16%)
29:36 (22%)
view
6 x 2 web/src/graphql
web/src/graphql
mutations.js
subscriptions.js
10:17 (16%)
7:14 (22%)
view
6 x 2 cdk/lib/position-lambda/graphql
cdk/lib/position-lambda/graphql
mutations.js
subscriptions.js
38:45 (16%)
18:25 (22%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
25 x 2 cdk/lib/custom-tracker-handler
cdk/lib/custom-certificate-handler
cfnresponse.py
cfnresponse.py
0:0 
0:0 
view
6 x 3 cdk/lib/position-lambda/graphql
cdk/lib/position-lambda/graphql
cdk/lib/position-lambda/graphql
mutations.js
mutations.js
queries.js
9:15 
23:29 
6:12 
view
6 x 3 web/src/graphql
web/src/graphql
web/src/graphql
mutations.js
mutations.js
queries.js
9:15 
23:29 
6:12 
view