microsoft / testfx
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
  • 27% duplication:
    • 28,692 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,791 duplicated lines
  • 1,267 duplicates
system27% (7,791 lines)
Duplication per Extension
cs43% (5,343 lines)
yml43% (1,161 lines)
xlf10% (871 lines)
ps15% (216 lines)
props33% (104 lines)
targets63% (84 lines)
psm13% (12 lines)
Duplication per Component (primary)
src/Adapter37% (5,628 lines)
eng/common18% (1,111 lines)
src/TestFramework13% (774 lines)
eng/publishing59% (237 lines)
scripts4% (41 lines)
ROOT0% (0 lines)
eng0% (0 lines)
scripts/build0% (0 lines)
scripts/toolset0% (0 lines)
src/Package0% (0 lines)

Duplication Between Components (50+ lines)

G eng/common eng/common eng/publishing eng/publishing eng/common--eng/publishing 519

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 1,267 duplicates...
Size#FoldersFilesLinesCode
382 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
TestDataConnectionSql.cs
TestDataConnectionSql.cs
24:955 (100%)
24:955 (100%)
view
235 x 2 src/Adapter/PlatformServices.Desktop.Legacy
src/Adapter/PlatformServices.Desktop
AssemblyResolver.cs
AssemblyResolver.cs
23:673 (100%)
23:673 (100%)
view
175 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
VSInstallationUtilities.cs
VSInstallationUtilities.cs
12:258 (100%)
12:258 (100%)
view
137 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
DesktopReflectionUtility.cs
DesktopReflectionUtility.cs
16:311 (100%)
16:311 (100%)
view
130 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopTestSourceHost.cs
DesktopTestSourceHost.cs
20:369 (100%)
20:369 (100%)
view
104 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
DesktopDeploymentUtility.cs
DesktopDeploymentUtility.cs
18:245 (100%)
18:245 (100%)
view
104 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
AppDomainUtilities.cs
AppDomainUtilities.cs
19:249 (100%)
19:249 (100%)
view
102 x 2 src/Adapter/PlatformServ...sktop.Legacy/Deployment
src/Adapter/PlatformServices.Desktop/Deployment
AssemblyLoadWorker.cs
AssemblyLoadWorker.cs
19:263 (100%)
19:263 (100%)
view
101 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
DesktopAssemblyUtility.cs
DesktopAssemblyUtility.cs
19:279 (100%)
19:279 (100%)
view
70 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopTestContextImplementation.cs
DesktopTestContextImplementation.cs
84:285 (44%)
86:287 (44%)
view
67 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
CsvDataConnection.cs
CsvDataConnection.cs
21:167 (100%)
21:167 (100%)
view
65 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
XmlUtilities.cs
XmlUtilities.cs
1:155 (100%)
1:155 (100%)
view
55 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopTestDataSource.cs
DesktopTestDataSource.cs
19:146 (100%)
19:146 (100%)
view
52 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
OdbcDataConnection.cs
OdbcDataConnection.cs
14:117 (100%)
14:117 (100%)
view
50 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
XmlDataConnection.cs
XmlDataConnection.cs
21:126 (100%)
21:126 (100%)
view
49 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
TestDataConnection.cs
TestDataConnection.cs
21:165 (100%)
21:165 (100%)
view
43 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
OleDataConnection.cs
OleDataConnection.cs
14:105 (100%)
14:105 (100%)
view
40 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopThreadOperations.cs
DesktopThreadOperations.cs
1:117 (100%)
1:117 (100%)
view
37 x 2 eng/common/templates/post-build/channels
eng/common/templates/post-build/channels
generic-internal-channel.yml
generic-public-channel.yml
112:154 (21%)
111:153 (21%)
view
36 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopFileOperations.cs
DesktopFileOperations.cs
15:133 (100%)
15:133 (100%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 116 unit duplicates...
Size#FoldersFilesLinesCode
109 x 2 src/Adapter/PlatformServices.Desktop.Legacy
src/Adapter/PlatformServices.Desktop
AssemblyResolver.cs
AssemblyResolver.cs
394:536 
394:536 
view
74 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
DesktopDeploymentUtility.cs
DesktopDeploymentUtility.cs
115:205 
115:205 
view
73 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
TestDataConnectionSql.cs
TestDataConnectionSql.cs
498:596 
498:596 
view
61 x 2 src/Adapter/PlatformServices.Desktop.Legacy
src/Adapter/PlatformServices.Desktop
AssemblyResolver.cs
AssemblyResolver.cs
602:674 
602:674 
view
61 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
CsvDataConnection.cs
CsvDataConnection.cs
81:163 
81:163 
view
58 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
DesktopReflectionUtility.cs
DesktopReflectionUtility.cs
176:243 
176:243 
view
54 x 2 src/Adapter/PlatformServices.Desktop.Legacy
src/Adapter/PlatformServices.Desktop
AssemblyResolver.cs
AssemblyResolver.cs
266:331 
266:331 
view
47 x 2 src/Adapter/PlatformServ...sktop.Legacy/Deployment
src/Adapter/PlatformServices.Desktop/Deployment
AssemblyLoadWorker.cs
AssemblyLoadWorker.cs
157:219 
157:219 
view
45 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopTestDataSource.cs
DesktopTestDataSource.cs
31:89 
31:89 
view
44 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
XmlUtilities.cs
XmlUtilities.cs
102:156 
102:156 
view
42 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
TestDataConnectionSql.cs
TestDataConnectionSql.cs
599:653 
599:653 
view
42 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
AppDomainUtilities.cs
AppDomainUtilities.cs
79:136 
79:136 
view
40 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
DesktopAssemblyUtility.cs
DesktopAssemblyUtility.cs
120:177 
120:177 
view
37 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopTestSourceHost.cs
DesktopTestSourceHost.cs
87:143 
87:143 
view
36 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
AppDomainUtilities.cs
AppDomainUtilities.cs
144:184 
144:184 
view
36 x 2 src/Adapter/PlatformServ...esktop.Legacy/Utilities
src/Adapter/PlatformServices.Desktop/Utilities
DesktopReflectionUtility.cs
DesktopReflectionUtility.cs
245:282 
245:282 
view
34 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
TestDataConnectionSql.cs
TestDataConnectionSql.cs
763:807 
763:807 
view
33 x 2 src/Adapter/PlatformServices.Desktop.Legacy/Data
src/Adapter/PlatformServices.Desktop/Data
TestDataConnectionSql.cs
TestDataConnectionSql.cs
412:472 
412:472 
view
32 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopThreadOperations.cs
DesktopThreadOperations.cs
26:64 
26:64 
view
31 x 2 src/Adapter/PlatformServ...Desktop.Legacy/Services
src/Adapter/PlatformServices.Desktop/Services
DesktopTestSourceHost.cs
DesktopTestSourceHost.cs
169:210 
169:210 
view