microsoft / vsts-team-calendar
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
  • 12% duplication:
    • 4,782 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 581 duplicated lines
  • 48 duplicates
system12% (581 lines)
Duplication per Extension
ts11% (317 lines)
tsx11% (195 lines)
html53% (55 lines)
scss6% (14 lines)
Duplication per Component (primary)
legacy/src/Calendar/EventSources29% (255 lines)
src14% (233 lines)
legacy/static56% (55 lines)
legacy/src/Calendar1% (24 lines)
legacy/src/Calendar/Style9% (14 lines)
ROOT0% (0 lines)
legacy0% (0 lines)
legacy/src/Calendar/Enhancers0% (0 lines)
legacy/src/Calendar/Utils0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 48 duplicates...
Size#FoldersFilesLinesCode
33 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
120:160 (6%)
177:218 (6%)
view
23 x 2 src
src
AddEditDaysOffDialog.tsx
AddEditEventDialog.tsx
138:160 (12%)
120:142 (16%)
view
21 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
330:352 (3%)
398:419 (3%)
view
20 x 2 src
src
Calendar.tsx
Calendar.tsx
456:478 (4%)
486:508 (4%)
view
16 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
261:277 (3%)
309:325 (3%)
view
15 x 2 src
src
AddEditDaysOffDialog.tsx
AddEditEventDialog.tsx
174:188 (8%)
161:175 (10%)
view
15 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
310:325 (2%)
377:392 (2%)
view
15 x 2 src
src
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
397:419 (3%)
464:485 (3%)
view
15 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
262:277 (2%)
377:392 (2%)
view
14 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
279:293 (2%)
403:416 (2%)
view
14 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
279:293 (2%)
335:349 (2%)
view
13 x 2 src
src
AddEditDaysOffDialog.tsx
AddEditEventDialog.tsx
126:138 (7%)
104:116 (9%)
view
11 x 2 legacy/static
legacy/static
daysOffControls.html
freeFormControls.html
14:25 (44%)
14:25 (44%)
view
10 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
82:91 (1%)
232:241 (1%)
view
10 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
82:91 (1%)
377:386 (1%)
view
10 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
232:241 (1%)
310:319 (1%)
view
10 x 2 src
src
FreeFormEventSource.ts
VSOCapacityEventSource.ts
60:70 (5%)
113:123 (2%)
view
10 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
82:91 (1%)
262:271 (1%)
view
10 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
232:241 (1%)
377:386 (1%)
view
10 x 2 legacy/src/Calendar/EventSources
legacy/src/Calendar/EventSources
VSOCapacityEventSource.ts
VSOCapacityEventSource.ts
232:241 (1%)
262:271 (1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
7 x 2 legacy/src/Calendar
src
Views.tsx
Calendar.tsx
237:244 
276:283 
view
6 x 2 legacy/src/Calendar
legacy/src/Calendar
Dialogs.ts
Dialogs.ts
551:557 
658:664 
view