microsoft / Xaml-Controls-Gallery
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
  • 9% duplication:
    • 14,844 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,349 duplicated lines
  • 281 duplicates
system9% (1,349 lines)
Duplication per Extension
xaml12% (1,088 lines)
cs4% (261 lines)
Duplication per Component (primary)
XamlControlsGallery/ControlPages9% (979 lines)
XamlControlsGallery14% (196 lines)
XamlControlsGallery/SamplePages42% (133 lines)
XamlControlsGallery/Navigation5% (17 lines)
XamlControlsGallery/ConnectedAnimationPages7% (12 lines)
XamlControlsGallery/TabViewPages7% (12 lines)
XamlControlsGallery/Behaviors0% (0 lines)
XamlControlsGallery/Common0% (0 lines)
XamlControlsGallery/ControlPagesSampleCode0% (0 lines)
XamlControlsGallery/Controls0% (0 lines)
XamlControlsGallery/DataModel0% (0 lines)
XamlControlsGallery/Helper0% (0 lines)
XamlControlsGallery/Properties0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 281 duplicates...
Size#FoldersFilesLinesCode
22 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
xaml
PullToRefreshPage.xaml
PullToRefreshPage.xaml
26:51 (26%)
76:101 (26%)
view
21 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
AppBarButtonPage.xaml.cs
AppBarToggleButtonPage.xaml.cs
31:66 (44%)
31:66 (47%)
view
19 x 2 XamlControlsGallery/SamplePages
XamlControlsGallery/SamplePages
xaml
SamplePage5.xaml
SamplePage6.xaml
3:24 (67%)
3:24 (65%)
view
16 x 2 XamlControlsGallery
XamlControlsGallery
xaml
AllControlsPage.xaml
NewControlsPage.xaml
71:87 (21%)
74:90 (20%)
view
15 x 2 XamlControlsGallery/SamplePages
XamlControlsGallery/SamplePages
xaml
SamplePage2.xaml
SamplePage7.xaml
3:20 (71%)
3:20 (71%)
view
15 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
AppBarButtonPage.xaml.cs
AppBarSeparatorPage.xaml.cs
31:55 (31%)
31:55 (55%)
view
15 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
AppBarSeparatorPage.xaml.cs
AppBarToggleButtonPage.xaml.cs
31:55 (55%)
31:55 (34%)
view
13 x 2 XamlControlsGallery
XamlControlsGallery
xaml
ItemPage.xaml
ItemPage.xaml
62:78 (7%)
85:101 (7%)
view
12 x 2 XamlControlsGallery/SamplePages
XamlControlsGallery/SamplePages
xaml
SamplePage1.xaml
SamplePage7.xaml
3:16 (44%)
3:16 (57%)
view
12 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
TreeViewPage.xaml.cs
TreeViewPage.xaml.cs
28:42 (9%)
53:67 (9%)
view
12 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
TabViewPage.xaml.cs
TabViewPage.xaml.cs
58:73 (8%)
99:113 (8%)
view
12 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
xaml
MenuFlyoutPage.xaml
MenuFlyoutPage.xaml
126:140 (7%)
176:190 (7%)
view
12 x 2 XamlControlsGallery/SamplePages
XamlControlsGallery/SamplePages
xaml
SamplePage1.xaml
SamplePage2.xaml
3:16 (44%)
3:16 (57%)
view
11 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
StackPanelPage.xaml.cs
VariableSizedWrapGridPage.xaml.cs
24:40 (78%)
19:35 (78%)
view
11 x 2 XamlControlsGallery
XamlControlsGallery
xaml
AllControlsPage.xaml
NewControlsPage.xaml
24:38 (15%)
27:41 (13%)
view
11 x 2 XamlControlsGallery/SamplePages
XamlControlsGallery/SamplePages
xaml
SamplePage3.xaml
SamplePage5.xaml
3:15 (39%)
3:15 (39%)
view
11 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
xaml
DropDownButtonPage.xaml
MenuBarPage.xaml
2:13 (30%)
2:12 (11%)
view
11 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
xaml
RevealPage.xaml
RevealPage.xaml
93:103 (11%)
106:116 (11%)
view
11 x 2 XamlControlsGallery/SamplePages
XamlControlsGallery/SamplePages
xaml
SamplePage3.xaml
SamplePage6.xaml
3:15 (39%)
3:15 (37%)
view
11 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/Navigation
AutoSuggestBoxPage.xaml.cs
NavigationRootPage.xaml.cs
254:276 (6%)
352:374 (4%)
view
Duplicated Units
The list of top 7 duplicated units.
See data for all 7 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
StackPanelPage.xaml.cs
VariableSizedWrapGridPage.xaml.cs
27:43 
22:38 
view
12 x 3 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
AppBarButtonPage.xaml.cs
AppBarSeparatorPage.xaml.cs
AppBarToggleButtonPage.xaml.cs
37:53 
37:53 
37:53 
view
9 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
AppBarButtonPage.xaml.cs
AppBarToggleButtonPage.xaml.cs
55:64 
55:64 
view
7 x 2 XamlControlsGallery/SamplePages
XamlControlsGallery/SamplePages
SampleCompactSizingPage.xaml.cs
SampleStandardSizingPage.xaml.cs
18:25 
31:38 
view
6 x 3 XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
XamlControlsGallery/ControlPages
AppBarButtonPage.xaml.cs
AppBarSeparatorPage.xaml.cs
AppBarToggleButtonPage.xaml.cs
29:35 
29:35 
29:35 
view
6 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery
SoundPage.xaml.cs
SettingsPage.xaml.cs
35:41 
95:101 
view
6 x 2 XamlControlsGallery/ControlPages
XamlControlsGallery
SoundPage.xaml.cs
SettingsPage.xaml.cs
43:49 
130:136 
view