microsoft / diskspd
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
  • 14% duplication:
    • 20,547 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,010 duplicated lines
  • 923 duplicates
system14% (3,010 lines)
Duplication per Extension
psm112% (1,093 lines)
ps123% (959 lines)
vcxproj84% (693 lines)
cpp4% (211 lines)
h1% (32 lines)
psd114% (22 lines)
Duplication per Component (primary)
Frameworks16% (2,057 lines)
diskspd_vs84% (693 lines)
XmlProfileParser15% (119 lines)
Common1% (32 lines)
IORequestGenerator1% (32 lines)
ResultParser4% (30 lines)
XmlResultParser8% (30 lines)
ROOT9% (17 lines)
CmdLineParser0% (0 lines)
CmdRequestCreator0% (0 lines)

Duplication Between Components (50+ lines)

G Frameworks Frameworks ROOT ROOT Frameworks--ROOT 612 ResultParser ResultParser XmlResultParser XmlResultParser ResultParser--XmlResultParser 60

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 923 duplicates...
Size#FoldersFilesLinesCode
132 x 2 Frameworks/VMFleet
Frameworks/VMFleet1.0
WatchCluster.psm1
watch-cluster.ps1
30:177 (29%)
51:198 (30%)
view
90 x 2 diskspd_vs/IORequestGenerator
diskspd_vs/ResultParser
vcxproj
IORequestGenerator.vcxproj
ResultParser.vcxproj
24:139 (75%)
24:139 (79%)
view
90 x 2 diskspd_vs/CmdLineParser
diskspd_vs/IORequestGenerator
vcxproj
CmdLineParser.vcxproj
IORequestGenerator.vcxproj
24:139 (79%)
24:139 (75%)
view
90 x 2 diskspd_vs/CmdLineParser
diskspd_vs/ResultParser
vcxproj
CmdLineParser.vcxproj
ResultParser.vcxproj
24:139 (79%)
24:139 (79%)
view
56 x 2 Frameworks/VMFleet
Frameworks/VMFleet
VMFleet.psm1
VMFleet.psm1
266:330 (<1%)
1009:1073 (<1%)
view
48 x 2 diskspd_vs/IORequestGenerator
diskspd_vs/XmlProfileParser
vcxproj
IORequestGenerator.vcxproj
XmlProfileParser.vcxproj
79:139 (40%)
79:139 (41%)
view
48 x 2 diskspd_vs/CmdLineParser
diskspd_vs/XmlProfileParser
vcxproj
CmdLineParser.vcxproj
XmlProfileParser.vcxproj
79:139 (42%)
79:139 (41%)
view
48 x 2 diskspd_vs/ResultParser
diskspd_vs/XmlProfileParser
vcxproj
ResultParser.vcxproj
XmlProfileParser.vcxproj
79:139 (42%)
79:139 (41%)
view
47 x 2 diskspd_vs/Common
diskspd_vs/XmlProfileParser
vcxproj
Common.vcxproj
XmlProfileParser.vcxproj
70:128 (43%)
81:139 (40%)
view
47 x 2 diskspd_vs/Common
diskspd_vs/IORequestGenerator
vcxproj
Common.vcxproj
IORequestGenerator.vcxproj
70:128 (43%)
81:139 (39%)
view
47 x 2 diskspd_vs/CmdLineParser
diskspd_vs/Common
vcxproj
CmdLineParser.vcxproj
Common.vcxproj
81:139 (41%)
70:128 (43%)
view
47 x 2 diskspd_vs/Common
diskspd_vs/ResultParser
vcxproj
Common.vcxproj
ResultParser.vcxproj
70:128 (43%)
81:139 (41%)
view
39 x 2 diskspd_vs/ResultParser
diskspd_vs/XmlResultParser
vcxproj
ResultParser.vcxproj
XmlResultParser.vcxproj
24:73 (34%)
25:74 (30%)
view
39 x 2 diskspd_vs/IORequestGenerator
diskspd_vs/XmlResultParser
vcxproj
IORequestGenerator.vcxproj
XmlResultParser.vcxproj
24:73 (32%)
25:74 (30%)
view
39 x 2 diskspd_vs/CmdLineParser
diskspd_vs/XmlResultParser
vcxproj
CmdLineParser.vcxproj
XmlResultParser.vcxproj
24:73 (34%)
25:74 (30%)
view
35 x 2 diskspd_vs/Common
diskspd_vs/XmlResultParser
vcxproj
Common.vcxproj
XmlResultParser.vcxproj
24:68 (32%)
25:69 (27%)
view
35 x 2 diskspd_vs/Common
diskspd_vs/IORequestGenerator
vcxproj
Common.vcxproj
IORequestGenerator.vcxproj
24:68 (32%)
24:68 (29%)
view
35 x 2 diskspd_vs/Common
diskspd_vs/ResultParser
vcxproj
Common.vcxproj
ResultParser.vcxproj
24:68 (32%)
24:68 (30%)
view
35 x 2 diskspd_vs/CmdLineParser
diskspd_vs/Common
vcxproj
CmdLineParser.vcxproj
Common.vcxproj
24:68 (30%)
24:68 (32%)
view
34 x 2 Frameworks/VMFleet
Frameworks/VMFleet1.0
VMFleet.psm1
start-sweep.ps1
4780:4816 (<1%)
148:184 (8%)
view