microsoft / emat
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
  • 50% duplication:
    • 649 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 326 duplicated lines
  • 20 duplicates
system50% (326 lines)
Duplication per Extension
ps150% (326 lines)
Duplication per Component (primary)
binary/Step 1 - Export Permissions Tools68% (255 lines)
binary/Step 1 - Export Permissions Tools/Beta25% (71 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G binary/Step 1 - Export Permissions Tools/Beta binary/Step 1 - Export Permissions Tools/Beta binary/Step 1 - Export Permissions Tools binary/Step 1 - Export Permissions Tools binary/Step 1 - Export Permissions Tools/Beta--binary/Step 1 - Export Permissions Tools 193

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 20 duplicates...
Size#FoldersFilesLinesCode
43 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.ps1
ExportScript.with_details.ps1
142:194 (27%)
94:146 (37%)
view
29 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.ps1
ExportScript.with_details.ps1
1:43 (18%)
1:43 (25%)
view
23 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
3_Groups.ps1
ExportScript.ps1
2:26 (100%)
90:114 (14%)
view
21 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
3_Groups.ps1
ExportScript.with_details.ps1
5:26 (91%)
51:72 (18%)
view
21 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.ps1
ExportScript.with_details.ps1
93:114 (13%)
51:72 (18%)
view
18 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.T2T.ps1
ExportScript.ps1
71:91 (21%)
149:169 (11%)
view
18 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
5_FP.ps1
ExportScript.with_details.ps1
2:22 (51%)
101:121 (15%)
view
18 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.T2T.ps1
ExportScript.with_details.ps1
71:91 (21%)
101:121 (15%)
view
18 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
5_FP.ps1
ExportScript.T2T.ps1
2:22 (51%)
71:91 (21%)
view
18 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
5_FP.ps1
ExportScript.ps1
2:22 (51%)
149:169 (11%)
view
14 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
5_FP.ps1
ExportScript.ps1
28:42 (40%)
190:204 (8%)
view
10 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.T2T.ps1
ExportScript.ps1
28:38 (12%)
93:103 (6%)
view
10 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.T2T.ps1
ExportScript.with_details.ps1
28:38 (12%)
51:61 (8%)
view
10 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
3_Groups.ps1
ExportScript.T2T.ps1
5:15 (43%)
28:38 (12%)
view
8 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.T2T.ps1
ExportScript.ps1
97:104 (9%)
190:197 (5%)
view
8 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
5_FP.ps1
ExportScript.T2T.ps1
28:35 (22%)
97:104 (9%)
view
8 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...issions Tools/Beta
2_MP.ps1
4_SnB.ps1
7:15 (22%)
8:16 (19%)
view
8 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.ps1
ExportScript.with_details.ps1
196:204 (5%)
148:156 (6%)
view
8 x 2 binary/Step 1 ...issions Tools/Beta
binary/Step 1 ...;Permissions Tools
5_FP.ps1
ExportScript.with_details.ps1
34:42 (22%)
148:156 (6%)
view
7 x 2 binary/Step 1 ...;Permissions Tools
binary/Step 1 ...;Permissions Tools
ExportScript.ps1
ExportScript.with_details.ps1
125:133 (4%)
77:85 (6%)
view