facebookincubator / Glean
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
  • 5% duplication:
    • 64,140 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,411 duplicated lines
  • 48,334 duplicates
system5% (3,411 lines)
Duplication per Extension
hs5% (2,485 lines)
cpp3% (253 lines)
cabal12% (228 lines)
rs86% (160 lines)
h3% (137 lines)
toml83% (96 lines)
hsc9% (52 lines)
Duplication per Component (primary)
glean/glass6% (434 lines)
glean/db2% (415 lines)
glean/hs5% (408 lines)
glean/rts4% (324 lines)
glean/lang5% (314 lines)
glean/lib5% (272 lines)
glean/config65% (256 lines)
ROOT8% (148 lines)
glean/util8% (147 lines)
glean/client11% (139 lines)
glean/github19% (120 lines)
glean/tools5% (114 lines)
glean/schema3% (90 lines)
glean/bench8% (51 lines)
glean/bytecode5% (48 lines)
glean/shell1% (31 lines)
glean/haxl5% (27 lines)
glean/rocksdb1% (24 lines)
glean/server7% (18 lines)
glean/interprocess2% (12 lines)
glean/cpp2% (12 lines)
glean/if1% (7 lines)
glean/website0% (0 lines)

Duplication Between Components (50+ lines)

G glean/db glean/db glean/hs glean/hs glean/db--glean/hs 667 glean/glass glean/glass glean/db--glean/glass 666 glean/lib glean/lib glean/db--glean/lib 558 glean/util glean/util glean/db--glean/util 504 glean/lang glean/lang glean/db--glean/lang 495 glean/github glean/github glean/db--glean/github 468 glean/tools glean/tools glean/db--glean/tools 448 glean/schema glean/schema glean/db--glean/schema 396 glean/shell glean/shell glean/db--glean/shell 390 glean/haxl glean/haxl glean/db--glean/haxl 384 glean/server glean/server glean/db--glean/server 378 glean/interprocess glean/interprocess glean/db--glean/interprocess 372 glean/if glean/if glean/db--glean/if 366 glean/hs--glean/lib 489 glean/hs--glean/util 444 glean/hs--glean/lang 438 glean/hs--glean/tools 388 glean/hs--glean/schema 336 glean/hs--glean/shell 332 glean/hs--glean/server 318 glean/hs--glean/interprocess 312 glean/hs--glean/if 306 glean/glass--glean/hs 611 glean/glass--glean/lib 498 glean/glass--glean/util 437 glean/glass--glean/lang 441 glean/glass--glean/tools 382 glean/glass--glean/schema 324 glean/glass--glean/shell 318 glean/glass--glean/haxl 326 glean/glass--glean/server 306 glean/glass--glean/interprocess 300 glean/lib--glean/util 334 glean/lang--glean/lib 322 glean/github--glean/hs 408 glean/github--glean/glass 396 glean/github--glean/lib 294 glean/client glean/client glean/client--glean/db 425 glean/client--glean/hs 416 glean/client--glean/glass 359 glean/bench glean/bench glean/bench--glean/db 408 glean/bench--glean/hs 353 glean/bench--glean/glass 350 glean/bytecode glean/bytecode glean/bytecode--glean/db 390 glean/bytecode--glean/hs 330 glean/bytecode--glean/glass 318 glean/haxl--glean/hs 329 ROOT ROOT ROOT--glean/db 366 ROOT--glean/hs 306 ROOT--glean/lang 310

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 48,334 duplicates...
Size#FoldersFilesLinesCode
51 x 2 ROOT
glean/lang/clang
72:122 (3%)
40:90 (27%)
view
30 x 2 glean/config/client
glean/config/recipes
19:60 (65%)
18:59 (66%)
view
30 x 2 glean/config/client
glean/config/server
19:60 (65%)
18:59 (66%)
view
30 x 2 glean/config/recipes
glean/config/server
18:59 (66%)
18:59 (66%)
view
28 x 2 ROOT
glean/lang/clang
19:46 (1%)
95:122 (14%)
view
26 x 2 glean/config/client
glean/config
25:60 (56%)
24:59 (57%)
view
26 x 2 glean/config/server
glean/config
24:59 (57%)
24:59 (57%)
view
26 x 2 glean/config/recipes
glean/config
24:59 (57%)
24:59 (57%)
view
25 x 2 glean/config/recipes
glean/config/server
4:31 (89%)
4:31 (89%)
view
19 x 2 glean/lib/Glean/Search
glean/lib/Glean/Search
228:251 (7%)
260:283 (7%)
view
17 x 2 glean/rts
glean/rts
42:58 (7%)
78:94 (7%)
view
16 x 2 glean/config/client
glean/config/recipes
4:21 (55%)
4:21 (57%)
view
16 x 2 glean/rts
glean/rts
233:249 (2%)
274:290 (2%)
view
16 x 2 glean/config/client
glean/config/server
4:21 (55%)
4:21 (57%)
view
12 x 2 glean/config
glean/config/recipes
4:17 (42%)
4:17 (42%)
view
12 x 2 glean/config
glean/config/server
4:17 (42%)
4:17 (42%)
view
12 x 2 glean/config
glean/config/client
4:17 (42%)
4:17 (41%)
view
12 x 2 glean/rts
glean/rts
505:516 (2%)
49:60 (25%)
view
11 x 2 glean/lib/Glean/Util
glean/lib/Glean/Util
118:128 (4%)
152:162 (4%)
view
11 x 2 glean/config/client
glean/config
2:16 (23%)
2:16 (24%)
view
11 x 2 glean/config/recipes
glean/config
2:16 (24%)
2:16 (24%)
view
11 x 2 glean/config/recipes
glean/config/server
2:16 (24%)
2:16 (24%)
view
11 x 2 glean/rts
glean/rts
761:771 (1%)
450:460 (2%)
view
11 x 2 glean/rts
glean/rts
447:457 (2%)
63:73 (22%)
view
11 x 2 glean/hs/Glean/Query
glean/hs/Glean/Query/Thrift
22:32 (7%)
18:28 (4%)
view
11 x 2 glean/config/client
glean/config/recipes
2:16 (23%)
2:16 (24%)
view
11 x 2 glean/config/server
glean/config
2:16 (24%)
2:16 (24%)
view
11 x 2 glean/lang/lsif/Data/LSIF
glean/lang/lsif/Data/LSIF
161:171 (3%)
173:183 (3%)
view
11 x 2 glean/config/client
glean/config/server
2:16 (23%)
2:16 (24%)
view
10 x 2 glean/client/hs/Glean
glean/hs/Glean/Query
1:12 (83%)
1:12 (2%)
view
10 x 2 glean/rts
glean/rts
226:235 (1%)
182:191 (2%)
view
9 x 2 glean/config
glean/config/recipes
21:30 (32%)
21:30 (32%)
view
9 x 2 glean/rts
glean/rts
268:276 (1%)
199:207 (1%)
view
9 x 2 glean/client/hs
glean/client/hs/local/Glean
16:24 (4%)
17:25 (10%)
view
9 x 2 glean/config/client
glean/config/server
23:32 (31%)
22:31 (32%)
view
9 x 2 glean/config
glean/config/server
21:30 (32%)
21:30 (32%)
view
9 x 2 glean/schema/gen/Glean/Schema/Gen
glean/schema/gen/Glean/Schema/Gen
405:413 (2%)
126:134 (2%)
view
9 x 2 glean/rts
glean/rts
797:805 (1%)
468:476 (1%)
view
9 x 2 glean/bytecode/gen/Glean/Bytecode/Generate
glean/bytecode/gen/Glean/Bytecode/Generate
13:22 (4%)
15:24 (4%)
view
9 x 2 glean/config/client
glean/config/recipes
23:32 (31%)
22:31 (32%)
view
9 x 2 glean/client/hs
glean/client/hs/Glean
128:136 (4%)
15:23 (10%)
view
9 x 2 glean/hs/Glean/RTS/Foreign
glean/hs/Glean/RTS/Foreign
263:271 (3%)
279:287 (3%)
view
8 x 2 glean/lang/clang
glean/lang/clang
1287:1295 (<1%)
1342:1350 (<1%)
view
8 x 2 glean/glass/Glean/Glass/SymbolId
glean/glass/Glean/Glass/SymbolId
1:10 (5%)
1:10 (4%)
view
8 x 2 glean/glass/Glean/Glass/Search
glean/glass/Glean/Glass/SymbolId
1:10 (18%)
1:10 (5%)
view
8 x 2 glean/glass/Glean/Glass
glean/glass/Glean/Glass
1:10 (19%)
1:10 (5%)
view
8 x 2 glean/glass/Glean/Glass/Search
glean/glass/Glean/Glass/Search
1:10 (18%)
1:10 (21%)
view
8 x 2 glean/hs/Glean/RTS/Foreign
glean/hs/Glean/RTS/Foreign
120:127 (3%)
158:165 (3%)
view
8 x 2 glean/glass/Glean/Glass
glean/glass/Glean/Glass
1:10 (19%)
1:10 (3%)
view
8 x 2 glean/rts
glean/rts
368:375 (1%)
246:253 (1%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
40 x 3 glean/config
glean/config/server
glean/config/recipes
9:63 
9:63 
9:63 
view