aws / amazon-chime-sdk-component-library-react
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
  • 10% duplication:
    • 14,899 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,598 duplicated lines
  • 150 duplicates
system10% (1,598 lines)
Duplication per Extension
tsx11% (1,310 lines)
ts8% (248 lines)
js4% (40 lines)
Duplication per Component (primary)
src/components12% (1,134 lines)
src/theme16% (236 lines)
src/providers7% (164 lines)
scripts8% (40 lines)
src/hooks4% (24 lines)
ROOT0% (0 lines)
src0% (0 lines)
src/constants0% (0 lines)
src/utils0% (0 lines)
src/versioning0% (0 lines)
src/types0% (0 lines)
tst0% (0 lines)
integration/utils0% (0 lines)
integration/app0% (0 lines)
integration/pages0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 150 duplicates...
Size#FoldersFilesLinesCode
58 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
136:193 (17%)
194:251 (17%)
view
50 x 2 src/components/ui/ControlBar
src/components/ui/ControlBar
ControlBar.stories.tsx
ControlBar.stories.tsx
29:89 (26%)
122:182 (26%)
view
25 x 2 src/theme
src/theme
dark.ts
light.ts
312:339 (5%)
312:339 (5%)
view
19 x 2 src/theme
src/theme
dark.ts
light.ts
450:468 (4%)
450:468 (4%)
view
19 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
176:194 (5%)
193:211 (5%)
view
18 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
136:153 (5%)
177:194 (5%)
view
18 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
193:210 (5%)
234:251 (5%)
view
18 x 2 src/components/ui/ControlBar
src/components/ui/Navbar
ControlBar.stories.tsx
Navbar.stories.tsx
93:110 (9%)
66:83 (26%)
view
17 x 2 src/components/ui/ControlBar
src/components/ui/ControlBar
ControlBar.stories.tsx
ControlBar.stories.tsx
92:108 (8%)
209:225 (8%)
view
17 x 2 src/theme
src/theme
dark.ts
light.ts
62:80 (3%)
62:80 (3%)
view
17 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
136:152 (5%)
235:251 (5%)
view
16 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
137:152 (4%)
307:322 (4%)
view
16 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
236:251 (4%)
307:322 (4%)
view
16 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
178:193 (4%)
307:322 (4%)
view
16 x 2 src/components/ui/Modal
src/components/ui/Modal
Modal.stories.tsx
Modal.stories.tsx
195:210 (4%)
307:322 (4%)
view
16 x 2 src/components/ui/ControlBar
src/components/ui/Navbar
ControlBar.stories.tsx
Navbar.stories.tsx
210:225 (8%)
66:81 (23%)
view
16 x 2 src/components/ui/Notification
src/components/ui/Notification
Notification.stories.tsx
Notification.stories.tsx
52:68 (18%)
81:97 (18%)
view
15 x 2 src/components/ui/FormField
src/components/ui/FormField
FormField.stories.tsx
FormField.stories.tsx
43:58 (4%)
139:154 (4%)
view
14 x 2 src/components/ui/Roster
src/components/ui/Roster
Roster.stories.tsx
Roster.stories.tsx
150:166 (6%)
183:199 (6%)
view
14 x 2 src/components/ui/FormField
src/components/ui/Select
FormField.stories.tsx
Select.stories.tsx
301:318 (3%)
12:29 (29%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 integration/pages
integration/pages
BaseTestPage.js
BaseTestPage.js
35:42 
51:58 
view