facebookresearch / Hanabi_SPARTA
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
  • 7% duplication:
    • 7,287 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 532 duplicated lines
  • 42 duplicates
system7% (532 lines)
Duplication per Extension
cc6% (290 lines)
js19% (186 lines)
h3% (42 lines)
py5% (14 lines)
Duplication per Component (primary)
csrc5% (332 lines)
webapp/src/components28% (186 lines)
webapp8% (14 lines)
webapp/public0% (0 lines)
webapp/src0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 42 duplicates...
Size#FoldersFilesLinesCode
21 x 2 webapp/src/components
webapp/src/components
Counters.js
Counters.js
67:87 (19%)
103:123 (19%)
view
19 x 2 webapp/src/components
webapp/src/components
PlayerHand.js
RevealOwnHand.js
15:38 (21%)
15:38 (29%)
view
14 x 2 csrc
csrc
cc
HanabiServer.cc
HanabiServer.cc
555:573 (3%)
605:623 (3%)
view
13 x 2 webapp/src/components
webapp/src/components
OwnHand.js
PlayerHand.js
37:51 (13%)
21:35 (14%)
view
13 x 2 webapp/src/components
webapp/src/components
OwnHand.js
RevealOwnHand.js
37:51 (13%)
21:35 (20%)
view
12 x 2 csrc
csrc
cc
HolmesBot.cc
SmartBot.cc
687:708 (2%)
1135:1156 (1%)
view
10 x 2 webapp/src/components
webapp/src/components
PlayerHand.js
RevealOwnHand.js
87:96 (11%)
62:71 (15%)
view
9 x 2 csrc
csrc
cc
BotUtils.cc
HanabiServer.cc
57:66 (2%)
98:107 (2%)
view
9 x 2 csrc
csrc
cc
SimpleBot.cc
SimpleBot.cc
215:226 (5%)
238:249 (5%)
view
9 x 2 webapp/src/components
webapp/src/components
PlayerHand.js
RevealOwnHand.js
98:106 (10%)
73:81 (14%)
view
8 x 2 csrc
csrc
cc
InfoBot.cc
InfoBot.cc
716:723 (<1%)
751:758 (<1%)
view
8 x 2 webapp/src/components
webapp/src/components
GameBoard.js
OwnHand.js
25:36 (7%)
43:54 (8%)
view
8 x 2 csrc
csrc
cc
JointSearchBot.cc
SearchBot.cc
209:217 (2%)
859:866 (1%)
view
8 x 2 csrc
csrc
cc
HolmesBot.cc
SmartBot.cc
203:211 (1%)
406:414 (1%)
view
8 x 2 webapp/src/components
webapp/src/components
Counters.js
Counters.js
55:62 (7%)
91:98 (7%)
view
7 x 2 csrc
csrc
SmartBot.h
TorchBot.h
149:155 (6%)
72:78 (17%)
view
7 x 2 webapp
webapp
server.py
server.py
106:113 (4%)
191:197 (4%)
view
7 x 2 csrc
csrc
cc
InfoBot.cc
InfoBot.cc
731:738 (<1%)
769:776 (<1%)
view
7 x 2 csrc
csrc
cc
SmartBot.cc
SmartBot.cc
691:698 (<1%)
754:761 (<1%)
view
7 x 2 csrc
csrc
HolmesBot.h
SmartBot.h
86:93 (10%)
140:147 (6%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 csrc
csrc
cc
HanabiServer.cc
BotUtils.cc
96:108 
55:67 
view
10 x 2 csrc
csrc
cc
HanabiServer.cc
SearchBot.cc
197:207 
588:598 
view
10 x 2 csrc
csrc
cc
SmartBot.cc
HolmesBot.cc
406:416 
203:213 
view
8 x 4 webapp/src/components
webapp/src/components
webapp/src/components
webapp/src/components
OwnHand.js
PlayerHand.js
RevealOwnHand.js
GameBoard.js
37:45 
21:29 
21:29 
19:27 
view
7 x 2 csrc
csrc
cc
SimpleBot.cc
HolmesBot.cc
72:80 
245:253 
view