reactjs / react-codemod
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
  • 24% duplication:
    • 6,978 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,702 duplicated lines
  • 238 duplicates
system24% (1,702 lines)
Duplication per Extension
js24% (1,702 lines)
Duplication per Component (primary)
transforms/__testfixtures__/class45% (875 lines)
transforms/__testfixtures__28% (237 lines)
transforms6% (195 lines)
transforms/__testfixtures__/React-PropTypes-to-prop-types58% (187 lines)
transforms/__testfixtures__/rename-unsafe-lifecycles30% (54 lines)
transforms/__testfixtures__/ReactNative-View-propTypes25% (42 lines)
transforms/utils12% (36 lines)
transforms/__testfixtures__/react-to-react-dom36% (24 lines)
transforms/__testfixtures__/custom-sort75% (18 lines)
transforms/__testfixtures__/manual-bind-to-arrow13% (16 lines)
transforms/__testfixtures__/error-boundaries26% (12 lines)
transforms/__testfixtures__/custom-sort-group21% (6 lines)
transforms/__testfixtures__/React-DOM-to-react-dom-factories0% (0 lines)
transforms/__testfixtures__/update-react-imports0% (0 lines)
jest0% (0 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 238 duplicates...
Size#FoldersFilesLinesCode
33 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
3:38 (100%)
3:38 (100%)
view
26 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
7:32 (78%)
32:57 (45%)
view
26 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
3:30 (49%)
3:30 (89%)
view
22 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
12:33 (66%)
33:54 (41%)
view
22 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
33:54 (41%)
12:33 (66%)
view
17 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
23:39 (47%)
40:56 (32%)
view
16 x 2 transforms/__testfixtures__
transforms/__testfixtures__
10:42 (84%)
10:42 (88%)
view
15 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
5:21 (41%)
5:21 (46%)
view
15 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
73:94 (8%)
74:95 (9%)
view
14 x 2 transforms/__testfixtures__
transforms/__testfixtures__
10:35 (77%)
10:35 (73%)
view
14 x 2 transforms/__testfixture...ctNative-View-propTypes
transforms/__testfixture...ctNative-View-propTypes
11:27 (63%)
13:29 (60%)
view
14 x 2 transforms/__testfixtures__
transforms/__testfixtures__
10:35 (77%)
10:35 (77%)
view
13 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
54:69 (13%)
54:69 (16%)
view
13 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
1:18 (100%)
1:18 (100%)
view
13 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
3:19 (36%)
3:19 (25%)
view
12 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
2:18 (92%)
2:18 (92%)
view
12 x 2 transforms/__testfixture...ename-unsafe-lifecycles
transforms/__testfixture...ename-unsafe-lifecycles
7:24 (36%)
27:44 (36%)
view
12 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
3:17 (35%)
3:17 (40%)
view
12 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
4:20 (80%)
4:20 (80%)
view
12 x 2 transforms/__testfixtures__
transforms/__testfixtures__
30:45 (37%)
40:55 (30%)
view
12 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
2:16 (100%)
10:24 (100%)
view
12 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
2:18 (92%)
2:18 (92%)
view
12 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
72:85 (12%)
73:86 (14%)
view
12 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
1:16 (80%)
1:16 (92%)
view
12 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
1:17 (100%)
1:17 (100%)
view
12 x 2 transforms/__testfixtures__
transforms/__testfixtures__
34:52 (24%)
24:42 (42%)
view
12 x 2 transforms/__testfixture...ename-unsafe-lifecycles
transforms/__testfixture...ename-unsafe-lifecycles
7:24 (36%)
27:44 (36%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
56:67 (11%)
75:86 (13%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
56:67 (13%)
75:86 (13%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
4:18 (100%)
7:21 (68%)
view
11 x 2 transforms/__testfixtures__
transforms/__testfixtures__
1:20 (22%)
1:20 (39%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
4:18 (100%)
4:18 (84%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
219:232 (5%)
249:262 (5%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
4:18 (84%)
7:21 (68%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
74:85 (11%)
56:67 (13%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
16:27 (11%)
74:85 (11%)
view
11 x 2 transforms/__testfixtures__
transforms/__testfixtures__
15:30 (22%)
13:28 (27%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
16:27 (11%)
56:67 (11%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
3:17 (100%)
4:18 (84%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
56:67 (11%)
74:85 (11%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
4:18 (100%)
4:18 (84%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
204:217 (5%)
232:245 (5%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
4:18 (84%)
4:18 (100%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
3:17 (100%)
7:21 (68%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
8:21 (21%)
6:19 (36%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
16:27 (11%)
56:67 (13%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
4:18 (100%)
4:18 (84%)
view
11 x 2 transforms/__testfixture...PropTypes-to-prop-types
transforms/__testfixture...PropTypes-to-prop-types
3:17 (100%)
4:18 (100%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
8:21 (30%)
6:19 (32%)
view
11 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
16:27 (11%)
75:86 (13%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 transforms/__testfixture...ctNative-View-propTypes
transforms/__testfixture...ctNative-View-propTypes
13:28 
15:30 
view
9 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
27:37 
44:54 
view
8 x 2 transforms/__testfixtures__/class
transforms/__testfixtures__/class
20:30 
25:35 
view