facebook / fbt
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:
    • 13,466 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,669 duplicated lines
  • 290 duplicates
system12% (1,669 lines)
Duplication per Extension
js12% (1,669 lines)
Duplication per Component (primary)
packages/babel-plugin-fbt11% (775 lines)
runtime/nonfb41% (706 lines)
demo-app/src9% (61 lines)
auto-param-new-string-helper15% (52 lines)
packages/babel-plugin-standalone11% (44 lines)
runtime/shared2% (31 lines)
flow-types/libdef0% (0 lines)
flow-types/nonfb0% (0 lines)
ROOT0% (0 lines)
website/static0% (0 lines)
website0% (0 lines)
website/src0% (0 lines)
runtime/shared_deps0% (0 lines)
packages/fb-babel-plugin-utils0% (0 lines)
packages/babel-plugin-fbt-runtime0% (0 lines)
packages/gulp-rewrite-flowtyped-modules0% (0 lines)
packages/react-native-fbt0% (0 lines)
packages/gulp-strip-docblock-pragmas0% (0 lines)
packages/fb-tiger-hash0% (0 lines)
packages/default-collection-transform0% (0 lines)
demo-app0% (0 lines)
demo-app/jest0% (0 lines)

Duplication Between Components (50+ lines)

G packages/babel-plugin-fbt packages/babel-plugin-fbt runtime/nonfb runtime/nonfb packages/babel-plugin-fbt--runtime/nonfb 622

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 290 duplicates...
Size#FoldersFilesLinesCode
238 x 2 packages/babel-plugin-fbt/src/translate/CLDR
runtime/nonfb
65:304 (76%)
65:304 (76%)
view
50 x 2 packages/babel-plugin-fbt/src/translate
runtime/nonfb
12:68 (100%)
12:68 (100%)
view
23 x 2 packages/babel-plugin-fbt/src/translate/CLDR
runtime/nonfb
308:337 (7%)
308:337 (7%)
view
15 x 2 demo-app/src/example
demo-app/src/example
152:167 (4%)
202:217 (4%)
view
14 x 2 auto-param-new-string-helper
auto-param-new-string-helper
191:208 (4%)
299:316 (4%)
view
14 x 2 runtime/nonfb
runtime/nonfb
44:58 (4%)
108:122 (4%)
view
14 x 2 packages/babel-plugin-standalone/src
packages/babel-plugin-standalone/src
184:204 (4%)
234:255 (4%)
view
10 x 2 runtime/nonfb
runtime/nonfb
148:158 (2%)
160:170 (2%)
view
10 x 2 runtime/nonfb
runtime/nonfb
60:70 (2%)
136:146 (2%)
view
10 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:31 (71%)
20:31 (71%)
view
10 x 2 packages/babel-plugin-fbt/src
packages/babel-plugin-fbt/src
52:61 (4%)
67:76 (4%)
view
9 x 2 runtime/nonfb
runtime/nonfb
33:42 (2%)
77:86 (2%)
view
9 x 2 packages/babel-plugin-fbt/src
packages/babel-plugin-fbt/src
174:182 (4%)
189:197 (4%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 packages/babel-plugin-fbt/src
packages/babel-plugin-fbt/src
175:182 (3%)
205:212 (3%)
view
8 x 2 runtime/nonfb
runtime/nonfb
93:101 (2%)
137:145 (2%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 runtime/nonfb
runtime/nonfb
61:69 (2%)
93:101 (2%)
view
8 x 2 packages/babel-plugin-standalone/src
packages/babel-plugin-standalone/src
167:175 (2%)
207:215 (2%)
view
8 x 2 packages/babel-plugin-fbt/src/fbt-nodes
packages/babel-plugin-fbt/src/fbt-nodes
30:37 (10%)
33:40 (4%)
view
8 x 2 packages/babel-plugin-fbt/src
packages/babel-plugin-fbt/src
190:197 (3%)
205:212 (3%)
view
8 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:29 (66%)
20:29 (66%)
view
8 x 2 packages/babel-plugin-fbt/src/babel-processors
packages/babel-plugin-fbt/src/babel-processors
45:54 (12%)
78:87 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
43:49 (2%)
177:183 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
87:93 (2%)
107:113 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
60:67 (2%)
160:167 (2%)
view
7 x 2 packages/babel-plugin-fbt/src/fbt-nodes
packages/babel-plugin-fbt/src/fbt-nodes
77:85 (5%)
346:354 (3%)
view
7 x 2 packages/babel-plugin-fbt/src
packages/babel-plugin-fbt/src
118:124 (3%)
133:139 (3%)
view
7 x 2 runtime/nonfb
runtime/nonfb
31:37 (2%)
151:157 (2%)
view
7 x 2 demo-app/src/example
demo-app/src/example
211:218 (2%)
290:296 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
31:37 (2%)
163:169 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
136:143 (2%)
148:155 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
60:67 (2%)
148:155 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
43:49 (2%)
77:83 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
136:143 (2%)
160:167 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
33:39 (2%)
177:183 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
77:83 (2%)
177:183 (2%)
view
7 x 2 demo-app/src/example
demo-app/src/example
164:171 (2%)
234:241 (2%)
view
7 x 2 runtime/nonfb
runtime/nonfb
33:39 (2%)
43:49 (2%)
view
7 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:26 (38%)
20:26 (38%)
view
7 x 2 packages/babel-plugin-fbt/src
runtime/shared
66:73 (6%)
61:68 (2%)
view
7 x 2 packages/babel-plugin-fbt/src
packages/babel-plugin-fbt/src
88:94 (3%)
103:109 (3%)
view
6 x 2 runtime/nonfb
runtime/nonfb
34:39 (1%)
108:113 (1%)
view
6 x 2 runtime/nonfb/FbtNumber
runtime/nonfb/FbtNumber
20:27 (60%)
20:27 (60%)
view
6 x 2 packages/babel-plugin-fbt/src/translate/CLDR
packages/babel-plugin-fbt/src/translate/CLDR
20:29 (66%)
20:29 (66%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 runtime/nonfb
packages/babel-plugin-fbt/src/translate/CLDR
312:319 
312:319 
view