microsoft / configmgr-hub
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
  • 9% duplication:
    • 3,306 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 308 duplicated lines
  • 22 duplicates
system9% (308 lines)
Duplication per Extension
ps19% (308 lines)
Duplication per Component (primary)
objects/Script9% (308 lines)
pipelines0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 22 duplicates...
Size#FoldersFilesLinesCode
28 x 2 objects/Script
objects/Script
Start-WindowsCleanup.ps1
Start-WindowsCleanup.ps1
2:29 (2%)
821:848 (2%)
view
18 x 2 objects/Script
objects/Script
2012R2InstallWSUSwPreloadedSUSDB.ps1
2016orlater-InstallWSUSwPreloadedSUSD...
14:35 (60%)
20:42 (51%)
view
17 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Get-ScheduledTaskInfo.ps1
2:18 (10%)
67:83 (10%)
view
14 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Start-WindowsCleanup.ps1
148:163 (9%)
1073:1088 (1%)
view
9 x 2 objects/Script
objects/Script
Start-WindowsCleanup.ps1
Start-WindowsCleanup.ps1
670:678 (<1%)
759:767 (<1%)
view
9 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Get-ScheduledTaskInfo.ps1
20:28 (5%)
85:93 (5%)
view
8 x 2 objects/Script
objects/Script
Set-CM Client Logging Option.ps1
Start-WindowsCleanup.ps1
115:123 (7%)
1080:1088 (<1%)
view
8 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Set-CM Client Logging Option.ps1
155:163 (5%)
115:123 (7%)
view
8 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Start-WindowsCleanup.ps1
54:62 (5%)
84:92 (<1%)
view
8 x 2 objects/Script
objects/Script
2012R2InstallWSUSwPreloadedSUSDB.ps1
2016orlater-InstallWSUSwPreloadedSUSD...
4:11 (26%)
4:11 (22%)
view
8 x 2 objects/Script
objects/Script
Set-CM Client Logging Option.ps1
Start-WindowsCleanup.ps1
54:62 (7%)
84:92 (<1%)
view
8 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Set-CM Client Logging Option.ps1
54:62 (5%)
54:62 (7%)
view
7 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Set-CM Client Logging Option.ps1
28:36 (4%)
28:36 (6%)
view
7 x 2 objects/Script
objects/Script
Invoke-Command.ps1
Start-WindowsCleanup.ps1
16:22 (12%)
759:765 (<1%)
view
7 x 2 objects/Script
objects/Script
Start-WindowsCleanup.ps1
Start-WindowsCleanup.ps1
590:596 (<1%)
601:607 (<1%)
view
7 x 2 objects/Script
objects/Script
Invoke-Command.ps1
Start-WindowsCleanup.ps1
16:22 (12%)
670:676 (<1%)
view
6 x 2 objects/Script
objects/Script
Start-WindowsCleanup.ps1
Start-WindowsCleanup.ps1
267:272 (<1%)
1073:1078 (<1%)
view
6 x 2 objects/Script
objects/Script
Start-WindowsCleanup.ps1
Start-WindowsCleanup.ps1
658:663 (<1%)
733:738 (<1%)
view
6 x 2 objects/Script
objects/Script
Get-ScheduledTaskInfo.ps1
Start-WindowsCleanup.ps1
148:153 (3%)
267:272 (<1%)
view
6 x 2 objects/Script
objects/Script
Get-Windows11Compatibility.ps1
Start-WindowsCleanup.ps1
14:19 (<1%)
24:29 (<1%)
view