microsoft / csa-misc-utils
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
  • 32% duplication:
    • 4,000 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,288 duplicated lines
  • 236 duplicates
system32% (1,288 lines)
Duplication per Extension
ps139% (1,027 lines)
csl49% (111 lines)
yaml54% (78 lines)
yml58% (38 lines)
asp2% (20 lines)
py6% (14 lines)
Duplication per Component (primary)
sample-UpdateManagement65% (738 lines)
psh-b2c-custom-attributes64% (112 lines)
psh-exo-encrypted-mailsend-script62% (92 lines)
psh-B2B-two-tenant-sync22% (83 lines)
sample-k8sRefArch41% (78 lines)
sa-dsml-many-models21% (52 lines)
sample-AzGuardRails-Governance25% (50 lines)
psh-RBAC-CopyPaste15% (38 lines)
psh-GetArmLimitsViaAPI51% (25 lines)
sample-EasyAuth-ClassicASP2% (20 lines)
psh-BlobDataSync-Workflow0% (0 lines)
psh-ManagedDiskUtils0% (0 lines)
psh-aad-b2b-batch-invite0% (0 lines)
psh-poison-queue0% (0 lines)
psh-sql-update-firewall0% (0 lines)
sample-Python-KeyVault-Function0% (0 lines)

Duplication Between Components (50+ lines)

G psh-B2B-two-tenant-sync psh-B2B-two-tenant-sync psh-b2c-custom-attributes psh-b2c-custom-attributes psh-B2B-two-tenant-sync--psh-b2c-custom-attributes 96 psh-GetArmLimitsViaAPI psh-GetArmLimitsViaAPI sample-UpdateManagement sample-UpdateManagement psh-GetArmLimitsViaAPI--sample-UpdateManagement 75

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 236 duplicates...
Size#FoldersFilesLinesCode
43 x 2 sample-UpdateManagement/...atedComplianceReporting
sample-UpdateManagement/...ll/UpdateAgentReadiness
01-BearerToken.ps1
01-BearerToken.ps1
1:46 (100%)
1:46 (100%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
JRE.ps1
Wireshark.ps1
1:36 (62%)
1:37 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
7Zip.ps1
Wireshark.ps1
1:36 (62%)
1:37 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
JRE.ps1
VNC.ps1
1:36 (62%)
1:36 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
7Zip.ps1
WinZip.ps1
1:36 (62%)
1:36 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
WinZip.ps1
Wireshark.ps1
1:36 (62%)
1:37 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
7Zip.ps1
JRE.ps1
1:36 (62%)
1:36 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
7Zip.ps1
VNC.ps1
1:36 (62%)
1:36 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
VNC.ps1
WinZip.ps1
1:36 (62%)
1:36 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
JRE.ps1
WinZip.ps1
1:36 (62%)
1:36 (62%)
view
31 x 2 sample-UpdateManagement/...nbooks/3rdPartyPatching
sample-UpdateManagement/...nbooks/3rdPartyPatching
VNC.ps1
Wireshark.ps1
1:36 (62%)
1:37 (62%)
view
28 x 2 sample-UpdateManagement/PowerShell/GroupSchedule
sample-UpdateManagement/PowerShell/GroupSchedule
02-WinSvrSched.ps1
03-LinuxSvrSched.ps1
22:51 (54%)
22:51 (54%)
view
25 x 2 psh-GetArmLimitsViaAPI
sample-UpdateManagement/...ll/UpdateAgentReadiness
GetArmLimits.ps1
01-BearerToken.ps1
18:44 (51%)
19:45 (58%)
view
25 x 2 psh-GetArmLimitsViaAPI
sample-UpdateManagement/...atedComplianceReporting
GetArmLimits.ps1
01-BearerToken.ps1
18:44 (51%)
19:45 (58%)
view
24 x 2 sample-UpdateManagement/...atedComplianceReporting
sample-UpdateManagement/...atedComplianceReporting
03-PreAnalysisAutomation-Linux.ps1
04-PreAnalysisAutomation-Windows.ps1
1:26 (50%)
1:26 (51%)
view
19 x 2 sa-dsml-many-models/code/deployment
sa-dsml-many-models/code/deployment
1-sai-create-endpoint.yml
many_model.yml
8:28 (79%)
9:29 (73%)
view
18 x 2 sample-UpdateManagement/Kusto/Compliance
sample-UpdateManagement/Kusto/Compliance
csl
NotAssessedHosts.csl
UncompliantHosts.csl
1:18 (33%)
1:18 (78%)
view
18 x 2 sample-k8sRefArch/appGw
sample-k8sRefArch/k8s
helm-rbac.yaml
helm-rbac.yaml
1:18 (100%)
1:18 (100%)
view
18 x 2 psh-exo-encrypted-mailsend-script
psh-exo-encrypted-mailsend-script
SendEXOMailTest1.ps1
SendEXOMailTest2.ps1
45:63 (23%)
37:55 (25%)
view
18 x 2 sample-k8sRefArch/apim-appGw
sample-k8sRefArch/k8s
helm-rbac.yaml
helm-rbac.yaml
1:18 (100%)
1:18 (100%)
view