aws-samples / aws-iot-kickstart
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
  • 15% duplication:
    • 21,717 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,305 duplicated lines
  • 602 duplicates
system15% (3,305 lines)
Duplication per Extension
yml35% (1,127 lines)
ts15% (946 lines)
css10% (730 lines)
html21% (255 lines)
js7% (181 lines)
py4% (66 lines)
Duplication per Component (primary)
source/console/src13% (1,931 lines)
source/cf33% (1,097 lines)
source/cf/defaults5% (96 lines)
source/resources/utils10% (46 lines)
source/resources/cf-helper-s323% (46 lines)
source/services/devices8% (45 lines)
source/services/deployments5% (27 lines)
source/services/admin3% (11 lines)
source/services/systems3% (6 lines)
source/console/tools0% (0 lines)
source/resources/usage-metrics0% (0 lines)
source/services/settings0% (0 lines)
source/services/just-in-time-on-boarding0% (0 lines)
deployment/utils0% (0 lines)

Duplication Between Components (50+ lines)

G source/cf/defaults source/cf/defaults source/cf source/cf source/cf/defaults--source/cf 216 source/resources/cf-helper-s3 source/resources/cf-helper-s3 source/resources/utils source/resources/utils source/resources/cf-helper-s3--source/resources/utils 92

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 602 duplicates...
Size#FoldersFilesLinesCode
46 x 2 source/console/src/app/public/auth/login
source/console/src/assets/css
login.component.css
login.css
62:115 (35%)
58:111 (35%)
view
34 x 2 source/resources/cf-helper-s3
source/resources/utils
index.js
index.js
60:102 (44%)
168:210 (19%)
view
29 x 2 source/console/src/app/public/auth/forgot
source/console/src/app/public/auth/forgot
forgot-password-step-2.component.html
forgot-password.component.html
1:43 (87%)
1:43 (93%)
view
29 x 2 source/console/src/app/public/auth/login
source/console/src/assets/css
login.component.css
login.css
126:160 (22%)
121:155 (22%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
61:86 (5%)
131:156 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
131:156 (5%)
298:323 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-helpers.yml
sputnik-lambda-services.yml
46:71 (14%)
367:392 (5%)
view
26 x 2 source/console/src/app/public/auth/newpassword
source/console/src/app/public/auth/resend
new-password.component.html
resend-code.component.html
1:40 (72%)
1:40 (83%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
298:323 (5%)
469:494 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
131:156 (5%)
367:392 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
61:86 (5%)
221:246 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-helpers.yml
sputnik-lambda-services.yml
46:71 (14%)
298:323 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
367:392 (5%)
469:494 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
221:246 (5%)
298:323 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
61:86 (5%)
298:323 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-helpers.yml
sputnik-lambda-services.yml
46:71 (14%)
221:246 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
131:156 (5%)
469:494 (5%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-services.yml
sputnik-lambda-services.yml
61:86 (5%)
367:392 (5%)
view
26 x 2 source/console/src/app/public/auth/forgot
source/console/src/app/public/auth/resend
forgot-password.component.html
resend-code.component.html
1:40 (83%)
1:40 (83%)
view
26 x 2 source/cf
source/cf
sputnik-lambda-helpers.yml
sputnik-lambda-services.yml
46:71 (14%)
131:156 (5%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
33 x 2 source/resources/utils
source/resources/cf-helper-s3
index.js
index.js
173:210 
65:102 
view
12 x 5 source/console/src/app/graphql/queries
source/console/src/app/graphql/mutations
source/console/src/app/graphql/mutations
source/console/src/app/graphql/mutations
source/console/src/app/graphql/mutations
user.get.ts
user.delete.ts
user.update.ts
user.enable.ts
user.disable.ts
5:17 
5:17 
5:17 
5:17 
5:17 
view
11 x 2 source/console/src/app/public/auth/confirm
source/console/src/app/public/auth/forgot
confirm-registration.component.ts
forgot-password.component.ts
42:55 
73:85 
view
9 x 2 source/console/src/app/graphql/queries
source/console/src/app/graphql/mutations
device-blueprint.get.ts
device-blueprint.delete.ts
5:14 
5:14 
view
8 x 3 source/console/src/app/graphql/queries
source/console/src/app/graphql/mutations
source/console/src/app/graphql/mutations
system-blueprint.get.ts
system-blueprint.delete.ts
system-blueprint.update.ts
5:13 
5:13 
5:13 
view
8 x 3 source/console/src/app/graphql/queries
source/console/src/app/graphql/mutations
source/console/src/app/graphql/mutations
system.get.ts
system.update.ts
system.delete.ts
5:13 
5:13 
5:13 
view
7 x 2 source/console/src/app/public/auth/resend
source/console/src/app/public/auth/forgot
resend-code.component.ts
forgot-password.component.ts
29:36 
27:34 
view
6 x 2 source/console/src/app/secure/devices
source/console/src/app/secure/deployments
devices.component.ts
deployments.component.ts
128:134 
100:106 
view
6 x 2 source/console/src/app/graphql/queries
source/console/src/app/graphql/mutations
setting.get.ts
setting.update.ts
5:11 
5:11 
view