microsoft / BaselineManagement
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
  • 18% duplication:
    • 4,550 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 862 duplicated lines
  • 1,270 duplicates
system18% (862 lines)
Duplication per Extension
ps117% (492 lines)
psd136% (320 lines)
psm16% (50 lines)
Duplication per Component (primary)
src/Parsers/GPO21% (408 lines)
src/Helpers23% (388 lines)
src6% (50 lines)
convertgpotodsc20% (16 lines)
tools0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 1,270 duplicates...
Size#FoldersFilesLinesCode
26 x 2 src/Helpers
src/Helpers
Functions.ps1
Functions.ps1
591:619 (4%)
641:669 (4%)
view
20 x 2 src/Parsers/GPO
src/Parsers/GPO
PowerOptions.ps1
PowerOptions.ps1
204:224 (7%)
258:278 (7%)
view
13 x 2 src/Parsers/GPO
src/Parsers/GPO
ScheduledTasks.ps1
ScheduledTasks.ps1
454:469 (2%)
472:487 (2%)
view
13 x 2 src/Parsers/GPO
src/Parsers/GPO
ScheduledTasks.ps1
ScheduledTasks.ps1
437:451 (2%)
472:487 (2%)
view
13 x 2 src/Parsers/GPO
src/Parsers/GPO
ScheduledTasks.ps1
ScheduledTasks.ps1
437:451 (2%)
454:469 (2%)
view
13 x 2 src/Parsers/GPO
src/Parsers/GPO
SecuritySettings.ps1
SecuritySettings.ps1
21:34 (15%)
69:82 (15%)
view
12 x 2 src/Parsers/GPO
src/Parsers/GPO
ScheduledTasks.ps1
ScheduledTasks.ps1
454:468 (2%)
490:504 (2%)
view
12 x 2 src/Parsers/GPO
src/Parsers/GPO
ScheduledTasks.ps1
ScheduledTasks.ps1
437:450 (2%)
490:504 (2%)
view
12 x 2 src/Parsers/GPO
src/Parsers/GPO
ScheduledTasks.ps1
ScheduledTasks.ps1
472:486 (2%)
490:504 (2%)
view
11 x 2 src/Parsers/GPO
src/Parsers/GPO
SecuritySettings.ps1
SecuritySettings.ps1
3:15 (13%)
40:52 (13%)
view
10 x 2 src/Parsers/GPO
src/Parsers/GPO
Folders.ps1
Shortcuts.ps1
3:12 (83%)
3:12 (83%)
view
10 x 2 src/Parsers/GPO
src/Parsers/GPO
Folders.ps1
NetworkOptions.ps1
3:12 (83%)
3:12 (83%)
view
10 x 2 src
src
BaselineManagement.psm1
BaselineManagement.psm1
259:268 (1%)
277:286 (1%)
view
10 x 2 src/Parsers/GPO
src/Parsers/GPO
Folders.ps1
StartMenu.ps1
3:12 (83%)
3:12 (83%)
view
10 x 2 src/Parsers/GPO
src/Parsers/GPO
NetworkOptions.ps1
Shortcuts.ps1
3:12 (83%)
3:12 (83%)
view
10 x 2 src/Parsers/GPO
src/Parsers/GPO
Shortcuts.ps1
StartMenu.ps1
3:12 (83%)
3:12 (83%)
view
10 x 2 src/Parsers/GPO
src/Parsers/GPO
NetworkOptions.ps1
StartMenu.ps1
3:12 (83%)
3:12 (83%)
view
9 x 2 src/Parsers/GPO
src/Parsers/GPO
Groups.ps1
PowerOptions.ps1
3:12 (15%)
172:181 (3%)
view
9 x 2 src/Parsers/GPO
src/Parsers/GPO
Groups.ps1
RegionalOptions.ps1
3:12 (15%)
3:11 (40%)
view
9 x 2 src/Parsers/GPO
src/Parsers/GPO
PowerOptions.ps1
RegionalOptions.ps1
172:181 (3%)
3:11 (40%)
view