microsoft / Bing-Maps-Fleet-Tracker
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
  • 6% duplication:
    • 12,617 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 881 duplicated lines
  • 60 duplicates
system6% (881 lines)
Duplication per Extension
cs9% (676 lines)
ts3% (127 lines)
css15% (78 lines)
Duplication per Component (primary)
Backend/src/System.Device26% (400 lines)
Frontend/src/app4% (183 lines)
Backend/src/Trackable.EntityFramework6% (70 lines)
Backend/src/Trackable.Web6% (66 lines)
Backend/src/Trackable.TripDetection6% (58 lines)
Backend/src/Trackable.Services3% (33 lines)
Backend/src/Trackable.Repositories3% (30 lines)
MobileClient/src/app23% (16 lines)
Backend/src/Trackable.Configurations16% (12 lines)
Backend/src/Trackable.Models2% (7 lines)
MobileClient/src/providers1% (6 lines)
Backend/src/Trackable.Common0% (0 lines)
Backend/src/Trackable.Func0% (0 lines)
Frontend/src/environments0% (0 lines)
Frontend/src0% (0 lines)
MobileClient/src0% (0 lines)
MobileClient/src/pages0% (0 lines)
MobileClient/src/theme0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 60 duplicates...
Size#FoldersFilesLinesCode
48 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinate.cs
LocationCoordinate.cs
186:303 (38%)
94:211 (55%)
view
37 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
CivicAddress.cs
CivicAddressResolver.cs
31:90 (64%)
32:91 (39%)
view
22 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcherInternal.cs
LocationProviderInternal.cs
563:617 (7%)
507:560 (8%)
view
17 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcherInternal.cs
LocationProviderInternal.cs
729:762 (5%)
596:629 (6%)
view
14 x 2 Backend/src/Trackable.TripDetection/TripDetectors
Backend/src/Trackable.TripDetection/TripDetectors
PointOfInterestTripDetector.cs
TimeBasedTripDetector.cs
29:47 (38%)
29:46 (38%)
view
13 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcherInternal.cs
LocationProviderInternal.cs
104:135 (4%)
79:111 (5%)
view
13 x 2 Frontend/src/app/maps
Frontend/src/app/maps
bing-maps.service.ts
bing-maps.service.ts
728:743 (2%)
778:793 (2%)
view
11 x 2 Frontend/src/app/devices/device-list
Frontend/src/app/geofences/geofence-list
device-list.component.css
geofence-list.component.css
4:16 (100%)
4:16 (100%)
view
11 x 2 Backend/src/Trackable.Services/DataClasses
Frontend/src/app/dispatching
DispatchingParameters.cs
dispatching-parameters.ts
98:108 (18%)
72:82 (17%)
view
11 x 2 Backend/src/Trackable.Services/Services
Backend/src/Trackable.Services/Services
DispatchingService.cs
DispatchingService.cs
507:518 (4%)
542:553 (4%)
view
10 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcherInternal.cs
LocationProviderInternal.cs
434:446 (3%)
382:394 (3%)
view
10 x 2 Frontend/src/app/dispatching
Frontend/src/app/dispatching
dispatching-editor-options.ts
dispatching-editor-options.ts
22:31 (25%)
37:46 (25%)
view
10 x 2 Frontend/src/app/dispatching/dispatching-editor
Frontend/src/app/users/user-editor
dispatching-editor.component.css
user-editor.component.css
4:15 (12%)
4:15 (66%)
view
9 x 2 Frontend/src/app/maps
Frontend/src/app/maps
bing-maps.service.ts
bing-maps.service.ts
508:516 (1%)
820:828 (1%)
view
9 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcherInternal.cs
LocationProviderInternal.cs
407:418 (2%)
358:369 (3%)
view
9 x 2 Frontend/src/app/geofences/geofence-editor
Frontend/src/app/users/user-editor
geofence-editor.component.css
user-editor.component.css
7:18 (50%)
6:17 (60%)
view
9 x 2 Backend/src/Trackable.Web/Auth
Backend/src/Trackable.Web/Auth
RoleRequirementHandler.cs
RoleRequirementHandler.cs
106:118 (7%)
122:134 (7%)
view
9 x 2 Backend/src/Trackable.Web/DTOs
Backend/src/Trackable.Web/DTOs
NestedTrackingDeviceDto.cs
TrackingDeviceDto.cs
13:46 (81%)
13:46 (75%)
view
9 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcher.cs
LocationProvider.cs
175:190 (4%)
135:150 (6%)
view
9 x 2 Backend/src/Trackable.EntityFramework
Backend/src/Trackable.Web/DTOs
AssetPropertiesData.cs
AssetPropertiesDto.cs
11:27 (75%)
11:51 (90%)
view
Duplicated Units
The list of top 12 duplicated units.
See data for all 12 unit duplicates...
Size#FoldersFilesLinesCode
48 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
CivicAddress.cs
CivicAddressResolver.cs
41:92 
42:93 
view
21 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinate.cs
LocationCoordinate.cs
190:239 
98:147 
view
19 x 2 Backend/src/Trackable.Services/Services
Backend/src/Trackable.Services/Services
InstrumentationService.cs
InstrumentationService.cs
58:77 
79:98 
view
16 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcherInternal.cs
LocationProviderInternal.cs
588:606 
531:549 
view
15 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcherInternal.cs
LocationProviderInternal.cs
569:586 
512:529 
view
12 x 2 Backend/src/Trackable.TripDetection/TripDetectors
Backend/src/Trackable.TripDetection/TripDetectors
PointOfInterestTripDetector.cs
TimeBasedTripDetector.cs
28:40 
28:40 
view
11 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinate.cs
LocationCoordinate.cs
263:274 
171:182 
view
10 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
CivicAddress.cs
CivicAddressResolver.cs
29:39 
30:40 
view
10 x 2 Backend/src/Trackable.EntityFramework/Migrations
Backend/src/Trackable.EntityFramework/Migrations
201702121521460_RenameDateTimes.cs
201702121521460_RenameDateTimes.cs
11:21 
23:33 
view
7 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinate.cs
LocationCoordinate.cs
279:286 
187:194 
view
7 x 2 Backend/src/Trackable.Repositories/Repositories
Backend/src/Trackable.Repositories/Repositories
GeoFenceRepository.cs
LocationRepository.cs
24:32 
37:45 
view
6 x 2 Backend/src/System.Device/Location
Backend/src/System.Device/Location
GeoCoordinateWatcher.cs
LocationProvider.cs
402:408 
316:322 
view