google / mysql-ripple
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:
    • 9,275 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 384 duplicated lines
  • 33 duplicates
system4% (384 lines)
Duplication per Extension
cc4% (292 lines)
h4% (92 lines)
Duplication per Component (primary)
ROOT4% (384 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 33 duplicates...
Size#FoldersFilesLinesCode
17 x 2 ROOT
ROOT
mysql_client_connection.cc
mysql_client_connection.cc
329:348 (5%)
443:462 (5%)
view
16 x 2 ROOT
ROOT
binlog_position.cc
binlog_position.cc
92:109 (8%)
122:139 (8%)
view
15 x 2 ROOT
ROOT
mysql_slave_session.cc
mysql_slave_session.cc
619:641 (2%)
703:725 (2%)
view
14 x 2 ROOT
ROOT
my_crypt.h
my_crypt.h
107:127 (7%)
225:245 (7%)
view
11 x 2 ROOT
ROOT
my_crypt.h
my_crypt.h
84:99 (5%)
202:217 (5%)
view
9 x 2 ROOT
ROOT
gtid_unittest.cc
gtid_unittest.cc
274:282 (2%)
300:309 (2%)
view
8 x 2 ROOT
ROOT
gtid_unittest.cc
gtid_unittest.cc
500:507 (2%)
528:535 (2%)
view
8 x 2 ROOT
ROOT
gtid.cc
gtid.cc
470:477 (1%)
536:543 (1%)
view
8 x 2 ROOT
ROOT
binlog_index_unittest.cc
binlog_index_unittest.cc
113:124 (2%)
131:142 (2%)
view
7 x 2 ROOT
ROOT
mysql_client_connection.cc
mysql_client_connection.cc
193:201 (2%)
217:225 (2%)
view
7 x 2 ROOT
ROOT
binlog_index_unittest.cc
encryption_unittest.cc
59:67 (2%)
113:121 (5%)
view
7 x 2 ROOT
ROOT
my_crypt.cc
my_crypt.cc
80:86 (3%)
150:156 (3%)
view
7 x 2 ROOT
ROOT
gtid.cc
mysql_slave_session.cc
96:103 (1%)
555:562 (1%)
view
7 x 2 ROOT
ROOT
my_crypt.cc
my_crypt.cc
70:76 (3%)
120:126 (3%)
view
6 x 2 ROOT
ROOT
log_event.h
log_event.h
129:135 (4%)
194:201 (4%)
view
6 x 2 ROOT
ROOT
log_event.h
log_event.h
214:220 (4%)
226:232 (4%)
view
6 x 2 ROOT
ROOT
binlog_position_unittest.cc
binlog_position_unittest.cc
156:164 (4%)
168:176 (4%)
view
6 x 2 ROOT
ROOT
log_event.h
log_event.h
142:148 (4%)
214:220 (4%)
view
6 x 2 ROOT
ROOT
binlog_position.cc
binlog_position.cc
158:164 (3%)
193:199 (3%)
view
6 x 2 ROOT
ROOT
binlog_index_unittest.cc
binlog_index_unittest.cc
113:122 (1%)
151:160 (1%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
8 x 2 ROOT
ROOT
my_crypt.cc
my_crypt.cc
69:77 
119:127 
view
8 x 2 ROOT
ROOT
my_crypt.cc
my_crypt.cc
79:87 
149:157 
view
7 x 2 ROOT
ROOT
file_FILE.cc
file_FILE.cc
100:107 
109:116 
view
7 x 2 ROOT
ROOT
gtid.cc
mysql_slave_session.cc
97:104 
556:563 
view