microsoft / BluetoothLEExplorer
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
  • 22% duplication:
    • 7,686 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,723 duplicated lines
  • 430 duplicates
system22% (1,723 lines)
Duplication per Extension
xaml54% (1,075 lines)
cs11% (648 lines)
Duplication per Component (primary)
BluetoothLEExplorer/BluetoothLEExplorer/Views51% (1,041 lines)
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels26% (360 lines)
BluetoothLEExplorer/BluetoothLEExplorer/Models9% (186 lines)
BluetoothLEExplorer/BluetoothLEExplorer/Styles51% (34 lines)
BluetoothLEExplorer/BluetoothLEExplorer/Services4% (30 lines)
GattServicesLibrary/GattServicesLibrary/Characteristics7% (18 lines)
GattServicesLibrary/GattServicesLibrary8% (18 lines)
GattServicesLibrary/GattServicesLibrary/Services4% (18 lines)
GattServicesLibrary/GattServicesLibrary/Helpers2% (6 lines)
BluetoothLEExplorer/GattHelper/Properties50% (6 lines)
SortedObservableCollection/SortedObservableCollection/Properties50% (6 lines)
BluetoothLEExplorer/BluetoothLEExplorer0% (0 lines)
BluetoothLEExplorer/BluetoothLEExplorer/CustomControls0% (0 lines)
BluetoothLEExplorer/BluetoothLEExplorer/Properties0% (0 lines)
BluetoothLEExplorer/GattHelper/Converters0% (0 lines)
GattServicesLibrary/GattServicesLibrary/CharacteristicParameterValues0% (0 lines)
GattServicesLibrary/GattServicesLibrary/Properties0% (0 lines)
SortedObservableCollection/SortedObservableCollection0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 430 duplicates...
Size#FoldersFilesLinesCode
49 x 2 BluetoothLEExplorer/Blue...Explorer/Views/Services
BluetoothLEExplorer/Blue...Explorer/Views/Services
xaml
BloodPressureServicePage.xaml
HeartRateServicePage.xaml
21:110 (72%)
21:110 (73%)
view
49 x 2 BluetoothLEExplorer/Blue...Explorer/Views/Services
BluetoothLEExplorer/Blue...Explorer/Views/Services
xaml
BatteryServicePage.xaml
HeartRateServicePage.xaml
21:110 (73%)
21:110 (73%)
view
49 x 2 BluetoothLEExplorer/Blue...Explorer/Views/Services
BluetoothLEExplorer/Blue...Explorer/Views/Services
xaml
BatteryServicePage.xaml
BloodPressureServicePage.xaml
21:110 (73%)
21:110 (72%)
view
48 x 2 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
CharacteristicPageViewModel.cs
ServicePageViewModel.cs
122:279 (17%)
83:240 (37%)
view
36 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementBeaconPage.xaml
AdvertisementMonitorPage.xaml
23:80 (24%)
21:78 (26%)
view
36 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementMonitorPage.xaml
Discover.xaml
21:78 (26%)
22:79 (24%)
view
36 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementBeaconPage.xaml
Discover.xaml
23:80 (24%)
22:79 (24%)
view
32 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementPage.xaml
ServicePage.xaml
21:79 (29%)
20:79 (33%)
view
29 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementBeaconDetailsPage.xaml
AdvertisementPage.xaml
22:70 (52%)
21:69 (27%)
view
29 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementBeaconDetailsPage.xaml
ServicePage.xaml
22:70 (52%)
20:69 (30%)
view
21 x 2 BluetoothLEExplorer/Blue...Explorer/Views/Services
BluetoothLEExplorer/Blue...Explorer/Views/Services
xaml
AlertNotificationServicePage.xaml
CurrentTimeServicePage.xaml
104:132 (24%)
77:105 (31%)
view
20 x 2 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
CharacteristicPageViewModel.cs
CharacteristicPageViewModel.cs
612:648 (7%)
686:722 (7%)
view
18 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementPage.xaml
DeviceServicesPage.xaml
46:79 (16%)
60:94 (14%)
view
18 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
DeviceServicesPage.xaml
ServicePage.xaml
60:94 (14%)
45:79 (18%)
view
17 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
VirtualKeyboardPage.xaml
VirtualPeripheralPage.xaml
57:89 (17%)
44:76 (24%)
view
17 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
Discover.xaml
VirtualPeripheralPage.xaml
87:120 (11%)
44:76 (24%)
view
17 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementMonitorPage.xaml
VirtualKeyboardPage.xaml
86:117 (12%)
57:89 (17%)
view
17 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Styles
BluetoothLEExplorer/BluetoothLEExplorer/Styles
xaml
Custom.xaml
Custom.xaml
19:40 (25%)
47:89 (25%)
view
17 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementMonitorPage.xaml
VirtualPeripheralPage.xaml
86:117 (12%)
44:76 (24%)
view
17 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Views
BluetoothLEExplorer/BluetoothLEExplorer/Views
xaml
AdvertisementMonitorPage.xaml
Discover.xaml
86:117 (12%)
87:120 (11%)
view
Duplicated Units
The list of top 10 duplicated units.
See data for all 10 unit duplicates...
Size#FoldersFilesLinesCode
10 x 3 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
ShellViewModel.cs
VirtualKeyboardPageViewModel.cs
VirtualPeripheralPageViewModel.cs
59:70 
132:143 
97:108 
view
8 x 2 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
DeviceServicesPageViewModel.cs
ServicePageViewModel.cs
151:160 
365:374 
view
7 x 2 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
VirtualKeyboardPageViewModel.cs
VirtualPeripheralPageViewModel.cs
195:203 
222:230 
view
7 x 2 GattServicesLibrary/Gatt...Library/Characteristics
GattServicesLibrary/Gatt...Library/Characteristics
NewAlertCharacteristic.cs
UnreadAlertStatusCharacteristic.cs
44:54 
43:51 
view
7 x 2 GattServicesLibrary/Gatt...Library/Characteristics
GattServicesLibrary/Gatt...Library/Characteristics
NewAlertCharacteristic.cs
UnreadAlertStatusCharacteristic.cs
56:76 
53:61 
view
6 x 9 BluetoothLEExplorer/Blue...Explorer/CustomControls
BluetoothLEExplorer/BluetoothLEExplorer/Models
BluetoothLEExplorer/BluetoothLEExplorer/Models
BluetoothLEExplorer/BluetoothLEExplorer/Models
BluetoothLEExplorer/BluetoothLEExplorer/Models
BluetoothLEExplorer/BluetoothLEExplorer/Models
BluetoothLEExplorer/BluetoothLEExplorer/Models
GattServicesLibrary/GattServicesLibrary
GattServicesLibrary/GattServicesLibrary
GattLocalCharacteristicControl.xaml.cs
GattSampleContext.cs
ObservableBluetoothLEAdvertisement.cs
ObservableBluetoothLEAdvertisementFil...
ObservableBluetoothLEDevice.cs
ObservableGattDescriptors.cs
ObservableGattDeviceService.cs
GenericGattCharacteristic.cs
GenericGattService.cs
234:240 
870:876 
90:96 
98:104 
802:808 
262:268 
486:492 
38:44 
82:88 
view
6 x 2 BluetoothLEExplorer/BluetoothLEExplorer/Models
BluetoothLEExplorer/BluetoothLEExplorer/Models
ObservableGattCharacteristics.cs
ObservableGattDescriptors.cs
396:402 
189:195 
view
6 x 2 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
CharacteristicPageViewModel.cs
DeviceServicesPageViewModel.cs
482:488 
200:206 
view
6 x 2 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
DeviceServicesPageViewModel.cs
ShellViewModel.cs
125:132 
45:52 
view
6 x 2 BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
BluetoothLEExplorer/BluetoothLEExplorer/ViewModels
DeviceServicesPageViewModel.cs
ServicePageViewModel.cs
168:175 
382:389 
view