microsoft / reactxp
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
  • 10% duplication:
    • 15,736 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,617 duplicated lines
  • 106 duplicates
system10% (1,617 lines)
Duplication per Extension
tsx9% (1,013 lines)
ts12% (604 lines)
Duplication per Component (primary)
src/web12% (721 lines)
src/windows26% (258 lines)
src/native-common8% (228 lines)
src/macos86% (160 lines)
src/ios88% (144 lines)
src/android53% (80 lines)
src/common<1% (14 lines)
src/native-desktop4% (12 lines)
ROOT0% (0 lines)
extensions/imagesvg0% (0 lines)
extensions/navigation0% (0 lines)
extensions/netinfo0% (0 lines)
extensions/video0% (0 lines)
extensions/virtuallistview0% (0 lines)
extensions/webview0% (0 lines)
src0% (0 lines)
src/tslint0% (0 lines)

Duplication Between Components (50+ lines)

G src/ios src/ios src/macos src/macos src/ios--src/macos 288 src/windows src/windows src/ios--src/windows 162 src/web src/web src/ios--src/web 126 src/macos--src/windows 194 src/macos--src/web 126 src/web--src/windows 208 src/native-common src/native-common src/native-common--src/web 186 src/android src/android src/android--src/ios 160 src/android--src/macos 160 src/android--src/windows 160 src/android--src/web 126

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 106 duplicates...
Size#FoldersFilesLinesCode
54 x 2 src/ios
src/windows
ReactXP.ts
ReactXP.ts
47:104 (79%)
48:105 (72%)
view
54 x 2 src/ios
src/macos
ReactXP.ts
ReactXP.ts
47:104 (79%)
48:105 (73%)
view
54 x 2 src/android
src/ios
ReactXP.ts
ReactXP.ts
48:105 (75%)
47:104 (79%)
view
54 x 2 src/macos
src/windows
ReactXP.ts
ReactXP.ts
48:105 (73%)
48:105 (72%)
view
54 x 2 src/android
src/macos
ReactXP.ts
ReactXP.ts
48:105 (75%)
48:105 (73%)
view
54 x 2 src/android
src/windows
ReactXP.ts
ReactXP.ts
48:105 (75%)
48:105 (72%)
view
53 x 2 src/ios
src/web
ReactXP.ts
ReactXP.ts
52:104 (77%)
55:107 (73%)
view
53 x 2 src/macos
src/web
ReactXP.ts
ReactXP.ts
53:105 (72%)
55:107 (73%)
view
53 x 2 src/android
src/web
ReactXP.ts
ReactXP.ts
53:105 (73%)
55:107 (73%)
view
53 x 2 src/web
src/windows
ReactXP.ts
ReactXP.ts
55:107 (73%)
53:105 (71%)
view
36 x 2 src/ios
src/macos
Accessibility.ts
Accessibility.ts
15:84 (72%)
15:84 (76%)
view
30 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
245:279 (4%)
283:317 (4%)
view
30 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
349:383 (4%)
387:421 (4%)
view
30 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
453:487 (4%)
491:525 (4%)
view
25 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
557:585 (4%)
589:617 (4%)
view
14 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
406:421 (2%)
472:487 (2%)
view
14 x 2 src/ios
src/macos
GestureView.tsx
GestureView.tsx
13:42 (100%)
13:42 (100%)
view
14 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
368:383 (2%)
472:487 (2%)
view
14 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
368:383 (2%)
510:525 (2%)
view
14 x 2 src/web
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
406:421 (2%)
510:525 (2%)
view
Duplicated Units
The list of top 11 duplicated units.
See data for all 11 unit duplicates...
Size#FoldersFilesLinesCode
11 x 2 src/native-common
src/web
ActivityIndicator.tsx
ActivityIndicator.tsx
29:41 
661:673 
view
10 x 2 src/native-common
src/native-common
Button.tsx
View.tsx
55:65 
45:55 
view
10 x 2 src/native-common
src/web
View.tsx
View.tsx
475:485 
272:282 
view
9 x 4 src/android
src/ios
src/macos
src/windows
GestureView.tsx
GestureView.tsx
GestureView.tsx
GestureView.tsx
25:39 
25:39 
25:39 
25:39 
view
9 x 2 src/common
src/common/utils
GestureView.tsx
EventHelpers.ts
606:616 
8:18 
view
9 x 2 src/ios
src/macos
Linking.ts
Linking.ts
15:26 
15:26 
view
9 x 2 src/web
src/windows
View.tsx
View.tsx
439:449 
121:131 
view
7 x 2 src/ios
src/macos
Accessibility.ts
Accessibility.ts
68:77 
68:77 
view
6 x 2 src/ios
src/macos
Accessibility.ts
Accessibility.ts
27:37 
27:37 
view
6 x 3 src/native-common
src/native-common
src/web
Button.tsx
View.tsx
View.tsx
280:286 
578:584 
492:498 
view
6 x 2 src/windows
src/windows
Link.tsx
View.tsx
167:174 
505:512 
view