microsoft / botframework-solutions
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
  • 49% duplication:
    • 14,412 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,086 duplicated lines
  • 507 duplicates
system49% (7,086 lines)
Duplication per Extension
ps194% (5,078 lines)
ts15% (725 lines)
yml68% (430 lines)
cs15% (387 lines)
js47% (344 lines)
vstemplate46% (122 lines)
Duplication per Component (primary)
templates/typescript/generator-bot-virtualassistant68% (3,309 lines)
templates/csharp/Skill81% (1,578 lines)
templates/csharp/VA69% (1,521 lines)
tools/botskills/src18% (354 lines)
build/yaml/csharp77% (164 lines)
build/yaml/typescript45% (104 lines)
sdk/csharp/libraries1% (19 lines)
sdk/typescript/libraries1% (19 lines)
build7% (18 lines)
sdk/csharp0% (0 lines)
templates/csharp0% (0 lines)
templates/csharp/VSIX0% (0 lines)
tools/scripts0% (0 lines)

Duplication Between Components (50+ lines)

G templates/csharp/Skill templates/csharp/Skill templates/typescript/generator-bot-virtualassistant templates/typescript/generator-bot-virtualassistant templates/csharp/Skill--templates/typescript/generator-bot-virtualassistant 3544 templates/csharp/VA templates/csharp/VA templates/csharp/Skill--templates/csharp/VA 2990 templates/csharp/VA--templates/typescript/generator-bot-virtualassistant 3540 build/yaml/csharp build/yaml/csharp build/yaml/csharp--templates/csharp/Skill 140 build/yaml/typescript build/yaml/typescript build/yaml/csharp--build/yaml/typescript 63 build/yaml/typescript--templates/typescript/generator-bot-virtualassistant 114

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 507 duplicates...
Size#FoldersFilesLinesCode
225 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/csharp/VA/VA/Deployment/Scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
19:274 (65%)
20:275 (65%)
view
204 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/csharp/VA/VA/Deployment/Scripts
deploy.ps1
deploy.ps1
174:417 (56%)
174:417 (56%)
view
195 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/typescript/gen...kill/deployment/scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
18:240 (57%)
18:240 (57%)
view
194 x 2 templates/csharp/VA/VA/Deployment/Scripts
templates/typescript/gen...kill/deployment/scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
20:241 (56%)
19:240 (56%)
view
188 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
19:233 (54%)
20:234 (54%)
view
188 x 2 templates/typescript/gen...tant/deployment/scripts
templates/typescript/gen...kill/deployment/scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
20:234 (54%)
19:233 (54%)
view
188 x 2 templates/csharp/VA/VA/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
20:234 (54%)
20:234 (54%)
view
164 x 2 templates/csharp/VA/VA/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
deploy.ps1
deploy.ps1
138:333 (45%)
141:336 (45%)
view
153 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/csharp/VA/VA/Deployment/Scripts
deploy.ps1
deploy.ps1
1:172 (42%)
1:172 (42%)
view
143 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/csharp/VA/VA/Deployment/Scripts
luis_functions.ps1
luis_functions.ps1
1:164 (100%)
1:164 (100%)
view
137 x 2 templates/csharp/VA/VA/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
luis_functions.ps1
luis_functions.ps1
1:157 (95%)
1:157 (95%)
view
137 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
luis_functions.ps1
luis_functions.ps1
1:157 (95%)
1:157 (95%)
view
134 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
deploy.ps1
deploy.ps1
174:333 (37%)
177:336 (37%)
view
104 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
deploy.ps1
deploy.ps1
22:135 (29%)
25:138 (28%)
view
104 x 2 templates/csharp/VA/VA/Deployment/Scripts
templates/typescript/gen...tant/deployment/scripts
deploy.ps1
deploy.ps1
22:135 (29%)
25:138 (28%)
view
99 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/csharp/VA/VA/Deployment/Scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
276:384 (28%)
277:385 (28%)
view
99 x 2 templates/typescript/gen...tant/deployment/scripts
templates/typescript/gen...kill/deployment/scripts
deploy_cognitive_models.ps1
deploy_cognitive_models.ps1
277:385 (28%)
276:384 (28%)
view
93 x 2 templates/typescript/gen...tant/deployment/scripts
templates/typescript/gen...kill/deployment/scripts
deploy.ps1
deploy.ps1
309:420 (25%)
310:421 (25%)
view
92 x 2 templates/csharp/Skill/Skill/Deployment/Scripts
templates/typescript/gen...kill/deployment/scripts
deploy.ps1
deploy.ps1
1:101 (25%)
1:101 (25%)
view
92 x 2 templates/typescript/gen...tant/deployment/scripts
templates/typescript/gen...kill/deployment/scripts
luis_functions.ps1
luis_functions.ps1
59:164 (64%)
59:164 (64%)
view
Duplicated Units
The list of top 16 duplicated units.
See data for all 16 unit duplicates...
Size#FoldersFilesLinesCode
17 x 2 templates/csharp/Skill/Skill/Dialogs
templates/csharp/VA/VA/Dialogs
MainDialog.cs
MainDialog.cs
290:311 
427:448 
view
12 x 2 templates/csharp/Skill/Skill/Adapters
templates/csharp/VA/VA/Adapters
DefaultAdapter.cs
DefaultAdapter.cs
69:87 
80:98 
view
12 x 2 templates/typescript/gen...-assistant/src/adapters
templates/typescript/gen...mple-skill/src/adapters
defaultAdapter.ts
defaultAdapter.ts
92:111 
85:103 
view
11 x 2 templates/csharp/Skill/Skill
templates/csharp/VA/VA
Startup.cs
Startup.cs
143:158 
169:184 
view
10 x 2 templates/csharp/Skill/Skill/Adapters
templates/csharp/VA/VA/Adapters
DefaultAdapter.cs
DefaultAdapter.cs
109:122 
129:142 
view
10 x 2 templates/csharp/Skill/Skill
templates/csharp/VA/VA
Startup.cs
Startup.cs
32:43 
37:48 
view
10 x 2 templates/typescript/gen...tant/generators/app/src
templates/typescript/gen...nt/generators/skill/src
copier.js
copier.js
18:28 
20:30 
view
9 x 2 templates/csharp/Skill/Skill/Services
templates/csharp/VA/VA/Services
BotServices.cs
BotServices.cs
78:90 
76:88 
view
8 x 2 templates/csharp/Skill/Skill/Bots
templates/csharp/VA/VA/Bots
DefaultActivityHandler.cs
DefaultActivityHandler.cs
51:61 
88:98 
view
8 x 2 templates/typescript/gen...mple-assistant/src/bots
templates/typescript/gen...s/sample-skill/src/bots
defaultActivityHandler.ts
defaultActivityHandler.ts
78:87 
52:61 
view
7 x 2 templates/typescript/gen...-assistant/src/adapters
templates/typescript/gen...mple-skill/src/adapters
defaultAdapter.ts
defaultAdapter.ts
137:147 
121:131 
view
6 x 2 templates/csharp/Skill/Skill/Dialogs
templates/csharp/Skill/Skill/Dialogs
SampleAction.cs
SampleDialog.cs
57:65 
41:48 
view
6 x 2 templates/typescript/gen...es/sample-assistant/src
templates/typescript/gen...plates/sample-skill/src
index.ts
index.ts
45:53 
60:68 
view
6 x 6 tools/botskills/src
tools/botskills/src
tools/botskills/src
tools/botskills/src
tools/botskills/src
tools/botskills/src
botskills-connect.ts
botskills-disconnect.ts
botskills-list.ts
botskills-migrate.ts
botskills-refresh.ts
botskills-update.ts
16:23 
15:22 
15:22 
15:22 
15:22 
16:23 
view
6 x 2 tools/botskills/src
tools/botskills/src
botskills-list.ts
botskills-migrate.ts
24:32 
24:32 
view
6 x 2 tools/botskills/src/functionality
tools/botskills/src/functionality
connectSkill.ts
disconnectSkill.ts
243:249 
67:73 
view