facebookincubator / hsthrift
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
  • 4% duplication:
    • 31,147 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,552 duplicated lines
  • 127 duplicates
system4% (1,552 lines)
Duplication per Extension
hs3% (660 lines)
cabal28% (356 lines)
py4% (244 lines)
cmake9% (210 lines)
cpp4% (37 lines)
h2% (25 lines)
project44% (20 lines)
Duplication per Component (primary)
compiler/Thrift6% (528 lines)
build/fbcode_builder5% (454 lines)
common/util1% (134 lines)
cpp-channel/cpp15% (62 lines)
cpp-channel35% (56 lines)
server34% (54 lines)
compiler34% (46 lines)
common/github67% (46 lines)
haxl70% (46 lines)
lib20% (45 lines)
lib/Thrift1% (28 lines)
cpp-channel/Thrift7% (26 lines)
ROOT44% (20 lines)
common/mangle1% (7 lines)
haxl/Haxl0% (0 lines)
serialization0% (0 lines)
server/Thrift0% (0 lines)
server/cpp0% (0 lines)
exactprint/Thrift0% (0 lines)
lib/if0% (0 lines)
compiler/plugins0% (0 lines)
compiler/main0% (0 lines)

Duplication Between Components (50+ lines)

G cpp-channel cpp-channel server server cpp-channel--server 106 haxl haxl cpp-channel--haxl 86 lib lib cpp-channel--lib 86 common/util common/util common/util--cpp-channel 104 common/util--server 100 compiler compiler common/util--compiler 78 common/util--haxl 78 common/util--lib 78 compiler--cpp-channel 86 compiler--server 84 compiler--haxl 90 compiler--lib 88 haxl--server 84 haxl--lib 86 lib--server 86 common/github common/github common/github--cpp-channel 78 common/github--server 78 common/github--common/util 86 common/github--compiler 82 common/github--haxl 84 common/github--lib 78

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 127 duplicates...
Size#FoldersFilesLinesCode
134 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
229:379 (40%)
451:601 (25%)
view
45 x 2 cpp-channel
server
29:78 (28%)
24:73 (29%)
view
45 x 2 common/util
cpp-channel
25:75 (11%)
31:80 (28%)
view
43 x 2 common/util
server
25:72 (10%)
26:73 (28%)
view
36 x 2 compiler
haxl
26:64 (27%)
21:59 (55%)
view
35 x 2 common/github
haxl
20:58 (62%)
23:60 (53%)
view
35 x 2 lib
server
23:59 (16%)
23:59 (22%)
view
34 x 2 compiler
server
26:61 (25%)
24:59 (22%)
view
34 x 2 cpp-channel
haxl
29:64 (21%)
21:56 (52%)
view
34 x 2 haxl
server
21:56 (52%)
24:59 (22%)
view
34 x 2 common/github
compiler
20:56 (60%)
28:64 (25%)
view
34 x 2 compiler
cpp-channel
26:61 (25%)
29:64 (21%)
view
34 x 2 common/github
common/util
18:53 (60%)
23:58 (8%)
view
34 x 2 haxl
lib
21:56 (52%)
24:59 (15%)
view
34 x 2 cpp-channel
lib
29:64 (21%)
24:59 (15%)
view
34 x 2 compiler
lib
26:61 (25%)
24:59 (15%)
view
32 x 2 common/util
haxl
25:58 (7%)
23:56 (49%)
view
32 x 2 common/github
server
20:53 (57%)
26:59 (20%)
view
32 x 2 common/github
cpp-channel
20:53 (57%)
31:64 (20%)
view
32 x 2 common/github
lib
20:53 (57%)
26:59 (14%)
view
32 x 2 common/util
compiler
25:58 (7%)
28:61 (24%)
view
32 x 2 common/util
lib
25:58 (7%)
26:59 (14%)
view
23 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
8:33 (6%)
12:37 (4%)
view
19 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
169:191 (5%)
388:410 (3%)
view
16 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
205:223 (4%)
426:444 (3%)
view
15 x 2 build/fbcode_builder/CMake
build/fbcode_builder/CMake
171:185 (8%)
40:54 (15%)
view
14 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
57:70 (4%)
62:75 (2%)
view
14 x 2 build/fbcode_builder/getdeps
build/fbcode_builder/getdeps
656:669 (1%)
1135:1148 (1%)
view
13 x 2 cpp-channel/Thrift/Channel/Lib
cpp-channel/Thrift/Channel/Lib
47:59 (13%)
78:90 (13%)
view
13 x 2 build/fbcode_builder/CMake
build/fbcode_builder/CMake
1:13 (52%)
1:13 (38%)
view
12 x 2 common/util/Util/Log
common/util/Util/Log
31:44 (20%)
33:46 (19%)
view
12 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
121:132 (3%)
289:300 (2%)
view
11 x 2 build/fbcode_builder/CMake
build/fbcode_builder/CMake
86:97 (6%)
53:64 (11%)
view
11 x 2 build/fbcode_builder/CMake
build/fbcode_builder/CMake
104:116 (4%)
169:181 (4%)
view
11 x 2 common/util/Util
common/util/Util
297:307 (3%)
321:331 (3%)
view
10 x 2 build/fbcode_builder/getdeps
build/fbcode_builder/getdeps
466:475 (2%)
478:487 (2%)
view
10 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
738:747 (1%)
850:859 (1%)
view
10 x 2 ROOT
ROOT
4:13 (83%)
14:24 (47%)
view
10 x 2 cpp-channel/cpp
cpp-channel/cpp
181:190 (5%)
277:286 (5%)
view
10 x 2 compiler
lib
8:17 (7%)
8:17 (4%)
view
9 x 2 cpp-channel
haxl
8:16 (5%)
8:16 (13%)
view
9 x 2 build/fbcode_builder/getdeps
build/fbcode_builder/getdeps
277:285 (1%)
314:322 (1%)
view
9 x 2 compiler
haxl
8:16 (6%)
8:16 (13%)
view
9 x 2 build/fbcode_builder/CMake
build/fbcode_builder/CMake
557:566 (1%)
210:219 (3%)
view
9 x 2 compiler/Thrift/Compiler
compiler/Thrift/Compiler
198:206 (2%)
256:264 (2%)
view
9 x 2 common/util/Util/Log
common/util/Util/Log
11:20 (15%)
11:20 (14%)
view
9 x 2 build/fbcode_builder/CMake
build/fbcode_builder/CMake
27:35 (5%)
29:38 (12%)
view
9 x 2 cpp-channel
lib
8:16 (5%)
8:16 (4%)
view
9 x 2 compiler
cpp-channel
8:16 (6%)
8:16 (5%)
view
9 x 2 haxl
lib
8:16 (13%)
8:16 (4%)
view