File plugin_alist.rb
has 1085 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'timeout'
require 'roma/messaging/con_pool'
require 'json'
module Roma
Method ev_alist_spushv
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_spushv(s)
if s.length != 3
@log.error("#{__method__}:wrong number of arguments(#{s})")
return send_data("CLIENT_ERROR Wrong number of arguments.\r\n")
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_to_json
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_to_json(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_join_with_time
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_join_with_time(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward1(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_gets_with_time
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_gets_with_time(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_gets
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_gets(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_join
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_join(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward1(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_to_s
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_to_s(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_expired_swap_and_sized_push
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_sized_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[4].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_delete
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_delete(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_expired_swap_and_insert
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_expired_swap_and_sized_insert
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_sized_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[4].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_expired_swap_and_push
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_delete_at
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_delete_at(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward2(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_update_at
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_update_at(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_swap_and_sized_push
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_swap_and_sized_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method forward1
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
def forward1(nid, rs, data=nil)
if rs.last == "forward"
return send_data("SERVER_ERROR Routing table is inconsistent.\r\n")
end
Method ev_alist_spushv
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_spushv(s)
if s.length != 3
@log.error("#{__method__}:wrong number of arguments(#{s})")
return send_data("CLIENT_ERROR Wrong number of arguments.\r\n")
end
Method ev_alist_swap_and_insert
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_swap_and_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_sized_push
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_sized_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_swap_and_sized_insert
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_swap_and_sized_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_swap_and_push
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_swap_and_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method forward1
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def forward1(nid, rs, data=nil)
if rs.last == "forward"
return send_data("SERVER_ERROR Routing table is inconsistent.\r\n")
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_at
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_at(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_swap_and_sized_push
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_swap_and_sized_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_join_with_time
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_join_with_time(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward1(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_clear
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_clear(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward2(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_pop
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_pop(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_insert
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_shift
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_shift(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_sized_insert
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_sized_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_push
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_swap_and_sized_insert
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_swap_and_sized_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_gets_with_time
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_gets_with_time(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
Method ev_alist_swap_and_push
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_swap_and_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_swap_and_insert
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_swap_and_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_expired_swap_and_sized_push
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_sized_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[4].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_sized_push
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_sized_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_join
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_join(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward1(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_expired_swap_and_sized_insert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_sized_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[4].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_gets
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_gets(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
Method ev_alist_push
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
if nodes[0] != @nid
Method ev_alist_sized_insert
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_sized_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_expired_swap_and_push
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_push(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_expired_swap_and_insert
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_expired_swap_and_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_insert
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_insert(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_delete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_delete(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_to_json
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_to_json(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
Method ev_alist_update_at
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_update_at(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[3].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
Method ev_alist_to_s
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ev_alist_to_s(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, 0)
Method merge_list
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def merge_list(hname, vn, last, clk, expt, k, v, val)
Method ev_alist_first
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_first(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_index
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_index(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_last
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_last(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method to_alist_value
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def to_alist_value(v)
# Marshal.dump([[],[]])[0..3].unpack("cc a c")
# => [4, 8, "[", 7]
# marshal format version 4.8
# array object "["
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return send_data(buf)
Method ev_alist_include?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_include?(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_length
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_length(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward2(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
@stats.read_count += 1
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ev_alist_empty?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_empty?(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward2(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Similar blocks of code found in 2 locations. Consider refactoring. Open
def ev_alist_shift(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 145.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def ev_alist_pop(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 145.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def ev_alist_last(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 104.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def ev_alist_first(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward1(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 104.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if /(?:^(\d+)$|^(\d+)..((?:-)?\d+)$)/ =~ s[2]
if $1
if v[0].length <= $1.to_i
return send_data("END\r\n")
end
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 74.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if /(?:^(\d+)$|^(\d+)..((?:-)?\d+)$)/ =~ s[3]
if $1
if v[0].length <= $1.to_i
return send_data("END\r\n")
end
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 74.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if buf == nil
@rttable.proc_failed(nid)
@log.error("forward get failed:nid=#{nid} rs=#{rs} #{$@}")
return send_data("SERVER_ERROR Message forward failed.\r\n")
elsif buf.start_with?("ERROR")
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 62.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
begin
res << buf
s = buf.split(/ /)
if s[0] != 'VALUE'
return_connection(nid, con)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 40.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if /(?:^(\d+)$|^(\d+)..((?:-)?\d+)$)/ =~ s[2]
if $1
if v.length <= $1.to_i
return send_data("END\r\n")
end
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 38.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if /(?:^(\d+)$|^(\d+)..((?:-)?\d+)$)/ =~ s[3]
if $1
if v.length <= $1.to_i
return send_data("END\r\n")
end
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 38.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_expired_swap_and_sized_insert)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_expired_swap_and_sized_insert], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_expired_swap_and_sized_push)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_expired_swap_and_sized_push], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_clear)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_clear], k, ddata)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_delete_at)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_delete_at], k, dret)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_swap_and_sized_insert)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_swap_and_sized_insert], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_sized_push)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_sized_push], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_swap_and_insert)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_swap_and_insert], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_swap_and_push)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_swap_and_push], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_expired_swap_and_push)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_expired_swap_and_push], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_update_at)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_update_at], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_insert)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_insert], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_delete)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_delete], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_sized_insert)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_sized_insert], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_swap_and_sized_push)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_swap_and_sized_push], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_expired_swap_and_insert)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_expired_swap_and_insert], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 16 locations. Consider refactoring. Open
if ret
if @stats.wb_command_map.key?(:alist_push)
Roma::WriteBehindProcess::push(hname, @stats.wb_command_map[:alist_push], k, data)
end
redundant(nodes[1..-1], hname, k, d, ret[2], expt, ret[4])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 36.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
rescue Storage::StorageException => e
@log.error("#{e.inspect} #{$@}")
close_connection
if Config.const_defined?(:STORAGE_EXCEPTION_ACTION) &&
Config::STORAGE_EXCEPTION_ACTION == :shutdown
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 34.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
rescue => e
@rttable.proc_failed(nid) if e.message != "no connection"
@log.error("forward get failed:nid=#{nid} rs=#{rs} #{e} #{$@}")
send_data("SERVER_ERROR Message forward failed.\r\n")
end
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 28.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76