microsoft / ReportingServicesTools
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
  • 26% duplication:
    • 9,442 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,515 duplicated lines
  • 1,249 duplicates
system26% (2,515 lines)
Duplication per Extension
ps127% (2,515 lines)
Duplication per Component (primary)
ReportingServicesTools/Functions/CatalogItems/Rest35% (960 lines)
ReportingServicesTools/Functions/CatalogItems20% (658 lines)
ReportingServicesTools/Functions/Admin36% (394 lines)
ReportingServicesTools/Functions/Security/Rest52% (212 lines)
ReportingServicesTools/Functions/Security30% (184 lines)
ReportingServicesTools/Functions/Common10% (39 lines)
ReportingServicesTools/Functions/Admin/Rest32% (25 lines)
ReportingServicesTools/Functions/Utilities5% (24 lines)
Templates44% (19 lines)
ROOT0% (0 lines)
ReportingServicesTools/Libraries0% (0 lines)
ReportingServicesTools0% (0 lines)

Duplication Between Components (50+ lines)

G ReportingServicesTools/Functions/CatalogItems ReportingServicesTools/Functions/CatalogItems ReportingServicesTools/Functions/Security ReportingServicesTools/Functions/Security ReportingServicesTools/Functions/CatalogItems--ReportingServicesTools/Functions/Security 533 Templates Templates ReportingServicesTools/Functions/CatalogItems--Templates 339 ReportingServicesTools/Functions/Security--Templates 87 ReportingServicesTools/Functions/CatalogItems/Rest ReportingServicesTools/Functions/CatalogItems/Rest ReportingServicesTools/Functions/Security/Rest ReportingServicesTools/Functions/Security/Rest ReportingServicesTools/Functions/CatalogItems/Rest--ReportingServicesTools/Functions/Security/Rest 499 ReportingServicesTools/Functions/CatalogItems/Rest--ReportingServicesTools/Functions/CatalogItems 158 ReportingServicesTools/Functions/Admin/Rest ReportingServicesTools/Functions/Admin/Rest ReportingServicesTools/Functions/Admin/Rest--ReportingServicesTools/Functions/CatalogItems/Rest 407 ReportingServicesTools/Functions/Admin/Rest--ReportingServicesTools/Functions/Security/Rest 96 ReportingServicesTools/Functions/Admin ReportingServicesTools/Functions/Admin ReportingServicesTools/Functions/Utilities ReportingServicesTools/Functions/Utilities ReportingServicesTools/Functions/Admin--ReportingServicesTools/Functions/Utilities 188

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,249 duplicates...
Size#FoldersFilesLinesCode
56 x 2 ReportingServicesTools/Functions/Security/Rest
ReportingServicesTools/Functions/Security/Rest
Grant-RsRestItemAccessPolicy.ps1
Revoke-RsRestItemAccessPolicy.ps1
76:135 (41%)
61:120 (49%)
view
28 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Remove-RsRestCacheRefreshPlan.ps1
Start-RsRestCacheRefreshPlan.ps1
42:75 (24%)
65:98 (21%)
view
27 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Remove-RsRestCacheRefreshPlan.ps1
Start-RsRestCacheRefreshPlan.ps1
77:103 (23%)
100:126 (20%)
view
24 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Get-RsRestItem.ps1
Get-RsRestItemDataSource.ps1
41:69 (22%)
51:79 (24%)
view
24 x 2 ReportingServicesTools/Functions/Admin
ReportingServicesTools/Functions/Admin
Set-PbiRsUrlReservation.ps1
Set-RsUrlReservation.ps1
52:82 (26%)
52:82 (22%)
view
22 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Out-RsRestCatalogItem.ps1
Out-RsRestCatalogItemId.ps1
70:97 (20%)
40:67 (17%)
view
22 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Get-RsRestItem.ps1
Remove-RsRestCatalogItem.ps1
47:72 (20%)
39:64 (28%)
view
21 x 2 ReportingServicesTools/Functions/Admin
ReportingServicesTools/Functions/Admin
Backup-RsEncryptionKey.ps1
Restore-RsEncryptionKey.ps1
53:79 (24%)
46:72 (14%)
view
20 x 2 ReportingServicesTools/Functions/Admin
ReportingServicesTools/Functions/Admin
Set-RsDatabase.ps1
Set-RsDatabaseCredentials.ps1
133:154 (8%)
92:113 (14%)
view
20 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Get-RsRestCacheRefreshPlanHistory.ps1
Test-RsRestItemDataSource.ps1
69:90 (17%)
56:77 (15%)
view
19 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Get-RsRestItemDataSource.ps1
Remove-RsRestCatalogItem.ps1
57:79 (19%)
39:61 (24%)
view
18 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Out-RsRestCatalogItem.ps1
Write-RsRestFolderContent.ps1
75:97 (16%)
79:100 (9%)
view
18 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/Security/Rest
Get-RsRestFolderContent.ps1
Get-RsRestItemAccessPolicy.ps1
49:70 (13%)
63:84 (11%)
view
18 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Out-RsRestCatalogItemId.ps1
Write-RsRestFolderContent.ps1
45:67 (14%)
79:100 (9%)
view
17 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Get-RsRestItem.ps1
Get-RsRestItemDataSource.ps1
70:87 (15%)
81:98 (17%)
view
17 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Get-RsRestItem.ps1
Get-RsRestItemDataModelParameters.ps1
70:87 (15%)
78:95 (17%)
view
17 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Test-RsRestItemDataSource.ps1
Test-RsRestItemDataSource.ps1
100:116 (13%)
126:142 (13%)
view
17 x 2 ReportingServicesTools/Functions/CatalogItems
ReportingServicesTools/Functions/CatalogItems
New-RsDataSource.ps1
New-RsFolder.ps1
214:232 (9%)
91:109 (18%)
view
17 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/CatalogItems/Rest
Get-RsRestItemDataModelParameters.ps1
Get-RsRestItemDataSource.ps1
78:95 (17%)
81:98 (17%)
view
16 x 2 ReportingServicesTools/Functions/CatalogItems/Rest
ReportingServicesTools/Functions/Security/Rest
Remove-RsRestFolder.ps1
Grant-RsRestItemAccessPolicy.ps1
42:60 (20%)
76:94 (11%)
view