microsoft / WebTemplateStudio
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
  • 12% duplication:
    • 18,882 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,347 duplicated lines
  • 183 duplicates
system12% (2,347 lines)
Duplication per Extension
ts10% (945 lines)
css23% (593 lines)
js25% (387 lines)
tsx6% (242 lines)
vue23% (132 lines)
html9% (20 lines)
py5% (18 lines)
cs2% (10 lines)
Duplication per Component (primary)
src/client/src13% (1,359 lines)
templates/Web/_composition25% (597 lines)
templates/Web/Pages16% (203 lines)
src/extension/src2% (97 lines)
templates/RN/_composition13% (50 lines)
templates/RN/Pages5% (19 lines)
templates/RN/Projects3% (12 lines)
src/client/public66% (10 lines)
_build0% (0 lines)
src/client/scripts0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 183 duplicates...
Size#FoldersFilesLinesCode
106 x 2 templates/Web/_compositi...ExceptList/backend/data
templates/Web/_compositi...orAllExceptList/backend
sampleData$wts.Page_gpostaction.js
sampleData$wts.Page_gpostaction.js
1:124 (100%)
1:124 (100%)
view
43 x 2 src/client/src/mockData/extensionModules/mockData
src/client/src/mockData/extensionModules/mockData
mockReactNativePlatformData.ts
mockWebPlatformData.ts
111:161 (19%)
241:291 (9%)
view
38 x 2 src/client/src/css
src/client/src/css
mockThemes.css
themeslight.css
263:300 (12%)
263:300 (12%)
view
37 x 2 src/client/src/modals/Ap...viceModal/AppNameEditor
src/client/src/modals/Co...Modal/AccountNameEditor
styles.module.css
styles.module.css
40:82 (52%)
40:82 (52%)
view
32 x 2 src/client/src/modals/Ap...viceModal/AppNameEditor
src/client/src/modals/Co...Modal/AccountNameEditor
styles.module.css
styles.module.css
1:38 (45%)
1:38 (45%)
view
28 x 2 src/client/src/mockData/extensionModules/mockData
src/client/src/mockData/extensionModules/mockData
mockReactNativePlatformData.ts
mockWebPlatformData.ts
163:193 (12%)
293:323 (6%)
view
26 x 2 src/client/src/mockData/extensionModules/mockData
src/client/src/mockData/extensionModules/mockData
mockWebPlatformData.ts
mockWebPlatformData.ts
439:465 (5%)
468:493 (5%)
view
25 x 2 src/client/src/modals/AppServiceModal
src/client/src/modals/CosmosDbModal
styles.module.css
styles.module.css
2:31 (100%)
2:31 (100%)
view
24 x 2 src/client/src/modals/Ap...viceModal/AppNameEditor
src/client/src/modals/Co...Modal/AccountNameEditor
index.tsx
index.tsx
58:84 (32%)
66:92 (29%)
view
19 x 2 src/client/src/mockData/extensionModules/mockData
src/client/src/mockData/extensionModules/mockData
mockWebPlatformData.ts
mockWebPlatformData.ts
359:378 (4%)
386:405 (4%)
view
18 x 2 src/client/src/pages/Sel...worksPage/FrameworkCard
src/client/src/pages/Sel...ypePage/ProjectTypeCard
index.tsx
index.tsx
98:118 (16%)
46:66 (29%)
view
18 x 2 src/client/src/store/templates/frameworks
src/client/src/store/templates/frameworks
backendFrameworkReducer.ts
frontendFrameworkReducer.ts
8:31 (81%)
8:31 (81%)
view
16 x 2 templates/Web/_compositi....Mongo/backend/services
templates/Web/_compositi...os.SQL/backend/services
pages.service_postaction.js
pages.service_postaction.js
1:26 (53%)
1:26 (42%)
view
16 x 2 src/client/src/css
src/client/src/css
mockThemes.css
themeslight.css
79:94 (5%)
79:94 (5%)
view
16 x 2 src/client/src/modals/AppServiceModal
src/client/src/modals/CosmosDbModal
index.tsx
index.tsx
108:123 (18%)
115:130 (16%)
view
16 x 2 templates/Web/_compositi...ct.Angular/frontend/src
templates/Web/_compositi...ject.React/frontend/src
styles.css
App.css
5:25 (84%)
2:22 (94%)
view
15 x 2 templates/Web/_compositi...rc/app/app-shell/footer
templates/Web/_compositi...d/src/components/Footer
footer.component.css
Footer.module.css
1:18 (100%)
1:18 (100%)
view
15 x 2 src/client/src/mockData/extensionModules/mockData
src/client/src/mockData/extensionModules/mockData
mockReactNativePlatformData.ts
mockWebPlatformData.ts
178:193 (6%)
363:378 (3%)
view
15 x 2 src/client/src/mockData/extensionModules/mockData
src/client/src/mockData/extensionModules/mockData
mockReactNativePlatformData.ts
mockWebPlatformData.ts
178:193 (6%)
390:405 (3%)
view
15 x 2 templates/Web/_compositi...leculer/backend/scripts
templates/Web/_compositi...ct.Node/backend/scripts
publish.js
publish.js
1:21 (100%)
1:21 (100%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
9 x 3 templates/Web/Pages/Angu.../Param_SourceName_Kebab
templates/Web/Pages/Angu.../Param_SourceName_Kebab
templates/Web/Pages/Angu.../Param_SourceName_Kebab
Param_SourceName_Kebab.service.ts
Param_SourceName_Kebab.service.ts
Param_SourceName_Kebab.service.ts
16:29 
20:33 
16:29 
view
7 x 2 src/extension/src/utils/generation
src/extension/src/utils/generation/generators
GenerationService.ts
ResourceGroupGenerator.ts
94:101 
36:43 
view