microsoft / powerbi-powershell
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
  • 13% duplication:
    • 6,488 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 888 duplicated lines
  • 94 duplicates
system13% (888 lines)
Duplication per Extension
cs9% (406 lines)
psd165% (369 lines)
ps1xml26% (99 lines)
ps11% (14 lines)
Duplication per Component (primary)
src/Modules/Data27% (227 lines)
src/Modules/Reports30% (188 lines)
src/Modules/Profile16% (105 lines)
src/Modules/Workspaces18% (98 lines)
src/Modules/Admin18% (63 lines)
src/Modules/Capacities39% (62 lines)
src/Modules/All65% (53 lines)
src/Common/Common.Api4% (52 lines)
src/Common/Common.Authentication11% (26 lines)
scripts1% (14 lines)
ROOT0% (0 lines)
build0% (0 lines)
src/Common/Commands.Common0% (0 lines)
src/Common/Common.Abstractions0% (0 lines)
src/Common/Common.Client0% (0 lines)

Duplication Between Components (50+ lines)

G src/Modules/Data src/Modules/Data src/Modules/Reports src/Modules/Reports src/Modules/Data--src/Modules/Reports 275 src/Modules/Admin src/Modules/Admin src/Modules/Admin--src/Modules/Data 118 src/Modules/Capacities src/Modules/Capacities src/Modules/Admin--src/Modules/Capacities 116 src/Modules/Admin--src/Modules/Reports 96 src/Modules/Capacities--src/Modules/Data 112 src/Modules/Capacities--src/Modules/Reports 88 src/Modules/All src/Modules/All src/Modules/Workspaces src/Modules/Workspaces src/Modules/All--src/Modules/Workspaces 106 src/Modules/Profile src/Modules/Profile src/Modules/All--src/Modules/Profile 94 src/Modules/Profile--src/Modules/Workspaces 94

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 94 duplicates...
Size#FoldersFilesLinesCode
40 x 2 src/Modules/Reports/Commands.Reports
src/Modules/Reports/Commands.Reports
GetPowerBIDashboard.cs
GetPowerBIImport.cs
25:73 (50%)
25:73 (49%)
view
30 x 2 src/Modules/Reports/Commands.Reports
src/Modules/Reports/Commands.Reports
GetPowerBIImport.cs
GetPowerBIReport.cs
36:73 (37%)
36:73 (37%)
view
30 x 2 src/Modules/Reports/Commands.Reports
src/Modules/Reports/Commands.Reports
GetPowerBIDashboard.cs
GetPowerBIReport.cs
36:73 (37%)
36:73 (37%)
view
21 x 2 src/Modules/Admin/Commands.Admin
src/Modules/Data/Commands.Data
MicrosoftPowerBIMgmt.Admin.psd1
MicrosoftPowerBIMgmt.Data.psd1
34:64 (25%)
34:64 (25%)
view
21 x 2 src/Modules/All/Commands.All
src/Modules/Workspaces/Commands.Workspaces
MicrosoftPowerBIMgmt.psd1
MicrosoftPowerBIMgmt.Workspaces.psd1
33:63 (25%)
33:63 (25%)
view
21 x 2 src/Modules/Admin/Commands.Admin
src/Modules/Reports/Commands.Reports
MicrosoftPowerBIMgmt.Admin.psd1
MicrosoftPowerBIMgmt.Reports.psd1
34:64 (25%)
34:64 (25%)
view
21 x 2 src/Modules/Capacities/Commands.Capacities
src/Modules/Reports/Commands.Reports
MicrosoftPowerBIMgmt.Capacities.psd1
MicrosoftPowerBIMgmt.Reports.psd1
34:64 (25%)
34:64 (25%)
view
21 x 2 src/Modules/Capacities/Commands.Capacities
src/Modules/Data/Commands.Data
MicrosoftPowerBIMgmt.Capacities.psd1
MicrosoftPowerBIMgmt.Data.psd1
34:64 (25%)
34:64 (25%)
view
21 x 2 src/Modules/Data/Commands.Data
src/Modules/Reports/Commands.Reports
MicrosoftPowerBIMgmt.Data.psd1
MicrosoftPowerBIMgmt.Reports.psd1
34:64 (25%)
34:64 (25%)
view
21 x 2 src/Modules/Admin/Commands.Admin
src/Modules/Capacities/Commands.Capacities
MicrosoftPowerBIMgmt.Admin.psd1
MicrosoftPowerBIMgmt.Capacities.psd1
34:64 (25%)
34:64 (25%)
view
15 x 2 src/Modules/Data/Commands.Data
src/Modules/Reports/Commands.Reports
GetPowerBIDataset.cs
GetPowerBIReport.cs
66:83 (17%)
56:73 (18%)
view
15 x 2 src/Modules/Profile/Commands.Profile
src/Modules/Workspaces/Commands.Workspaces
MicrosoftPowerBIMgmt.Profile.psd1
MicrosoftPowerBIMgmt.Workspaces.psd1
97:119 (18%)
97:119 (18%)
view
15 x 2 src/Modules/Data/Commands.Data
src/Modules/Reports/Commands.Reports
MicrosoftPowerBIMgmt.Data.psd1
MicrosoftPowerBIMgmt.Reports.psd1
99:121 (18%)
99:121 (18%)
view
15 x 2 src/Modules/Data/Commands.Data
src/Modules/Reports/Commands.Reports
GetPowerBIDataset.cs
GetPowerBIDashboard.cs
66:83 (17%)
56:73 (18%)
view
15 x 2 src/Modules/All/Commands.All
src/Modules/Workspaces/Commands.Workspaces
MicrosoftPowerBIMgmt.psd1
MicrosoftPowerBIMgmt.Workspaces.psd1
97:119 (18%)
97:119 (18%)
view
15 x 2 src/Modules/Data/Commands.Data
src/Modules/Reports/Commands.Reports
GetPowerBIDataset.cs
GetPowerBIImport.cs
66:83 (17%)
56:73 (18%)
view
15 x 2 src/Modules/All/Commands.All
src/Modules/Profile/Commands.Profile
MicrosoftPowerBIMgmt.psd1
MicrosoftPowerBIMgmt.Profile.psd1
33:54 (18%)
33:54 (18%)
view
15 x 2 src/Modules/All/Commands.All
src/Modules/Profile/Commands.Profile
MicrosoftPowerBIMgmt.psd1
MicrosoftPowerBIMgmt.Profile.psd1
97:119 (18%)
97:119 (18%)
view
15 x 2 src/Modules/Profile/Commands.Profile
src/Modules/Workspaces/Commands.Workspaces
MicrosoftPowerBIMgmt.Profile.psd1
MicrosoftPowerBIMgmt.Workspaces.psd1
33:54 (18%)
33:54 (18%)
view
13 x 2 src/Modules/Data/Commands.Data
src/Modules/Data/Commands.Data
AddPowerBIRow.cs
RemovePowerBIRow.cs
21:37 (28%)
19:35 (29%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 src/Common/Common.Authentication
src/Common/Common.Authentication
DeviceCodeAuthenticationFactory.cs
WindowsAuthenticationFactory.cs
61:74 
92:105 
view
11 x 2 src/Modules/Workspaces/Commands.Workspaces
src/Modules/Workspaces/Commands.Workspaces
RestorePowerBIWorkspace.cs
SetPowerBIWorkspace.cs
52:65 
57:70 
view
7 x 2 src/Modules/Workspaces/Commands.Workspaces
src/Modules/Workspaces/Commands.Workspaces
AddPowerBIWorkspaceUser.cs
RemovePowerBIWorkspaceUser.cs
67:75 
48:56 
view