Showing 158 of 491 total issues

Similar blocks of code found in 6 locations. Consider refactoring.
Open

      def ev_set_reqpushv_timeout_count(s)
        if s.length != 2
          return send_data("CLIENT_ERROR number of arguments\n\r")
        end
        if s[1].to_i <= 0
Severity: Major
Found in lib/roma/command/sys_command_receiver.rb and 5 other locations - About 55 mins to fix
lib/roma/command/sys_command_receiver.rb on lines 928..939
lib/roma/command/sys_command_receiver.rb on lines 955..966
lib/roma/command/sys_command_receiver.rb on lines 983..993
lib/roma/command/sys_command_receiver.rb on lines 1035..1045
lib/roma/command/sys_command_receiver.rb on lines 1061..1071

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 44.

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

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

      def ev_set_spushv_read_timeout(s)
        if s.length != 2
          return send_data("CLIENT_ERROR number of arguments\n\r")
        end
        if s[1].to_i <= 0
Severity: Major
Found in lib/roma/command/sys_command_receiver.rb and 5 other locations - About 55 mins to fix
lib/roma/command/sys_command_receiver.rb on lines 928..939
lib/roma/command/sys_command_receiver.rb on lines 955..966
lib/roma/command/sys_command_receiver.rb on lines 1009..1019
lib/roma/command/sys_command_receiver.rb on lines 1035..1045
lib/roma/command/sys_command_receiver.rb on lines 1061..1071

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 44.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def ev_set_threshold_for_failover(s)
        if s.length != 2 || s[1].to_i == 0
          return send_data("usage:set_threshold_for_failover <n>\r\n")
        end
        res = broadcast_cmd("rset_threshold_for_failover #{s[1]}\r\n")
Severity: Minor
Found in lib/roma/command/rt_command_receiver.rb and 1 other location - About 45 mins to fix
lib/roma/plugin/plugin_storage.rb on lines 461..468

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 41.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def ev_set_size_of_zredundant(s)
        if s.length != 2 || s[1].to_i == 0
          return send_data("usage:set_set_size_of_zredundant <n>\r\n")
        end
        res = broadcast_cmd("rset_size_of_zredundant #{s[1]}\r\n")
Severity: Minor
Found in lib/roma/plugin/plugin_storage.rb and 1 other location - About 45 mins to fix
lib/roma/command/rt_command_receiver.rb on lines 198..205

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 41.

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

Further Reading

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)
Severity: Minor
Found in lib/roma/plugin/plugin_alist.rb and 1 other location - About 45 mins to fix
lib/roma/command/command_definition.rb on lines 413..422

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

Further Reading

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)
Severity: Minor
Found in lib/roma/command/command_definition.rb and 1 other location - About 45 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 1428..1437

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if val
          wd = [vn, last, 0, expt, k.length, k, val.length, val].pack("NNNNNa#{k.length}Na#{val.length}")
        else
          wd = [vn, last, 0, expt, k.length, k, 0].pack("NNNNNa#{k.length}N")
Severity: Minor
Found in lib/roma/tools/recoverlost_lib.rb and 1 other location - About 45 mins to fix
lib/roma/tools/recoverlost_lib.rb on lines 290..293

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 39.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

      if val
        wd = [vn, last, 0, expt, k.length, k, val.length, val].pack("NNNNNa#{k.length}Na#{val.length}")
      else
        wd = [vn, last, 0, expt, k.length, k, 0].pack("NNNNNa#{k.length}N")
Severity: Minor
Found in lib/roma/tools/recoverlost_lib.rb and 1 other location - About 45 mins to fix
lib/roma/tools/recoverlost_lib.rb on lines 239..242

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 39.

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

Further Reading

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
Severity: Minor
Found in lib/roma/plugin/plugin_alist.rb and 1 other location - About 40 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 692..702

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

Further Reading

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
Severity: Minor
Found in lib/roma/plugin/plugin_alist.rb and 1 other location - About 40 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 211..221

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          if st.dbs[dn] != :normal
            return send_data("CLIENT_ERROR storage[#{dn}] != :normal status\r\n")
          end
          if st.set_db_stat(dn, :safecopy_flushing) == false
            return send_data("CLIENT_ERROR storage[#{dn}] status can't changed\r\n")
Severity: Minor
Found in lib/roma/command/sys_command_receiver.rb and 1 other location - About 40 mins to fix
lib/roma/command/sys_command_receiver.rb on lines 1181..1187

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          if st.dbs[dn] != :safecopy_flushed
            return send_data("CLIENT_ERROR storage[#{dn}] != :safecopy_flushed status\r\n")
          end
          if st.set_db_stat(dn, :cachecleaning) == false
            return send_data("CLIENT_ERROR storage[#{dn}] status can't changed\r\n")
Severity: Minor
Found in lib/roma/command/sys_command_receiver.rb and 1 other location - About 40 mins to fix
lib/roma/command/sys_command_receiver.rb on lines 1173..1179

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if s[1].to_i > 0 || s[1] == '0'
          @log.set_log_shift_age(s[1].to_i)
          @stats.log_shift_age = s[1].to_i
        else
          @log.set_log_shift_age(s[1])
Severity: Minor
Found in lib/roma/command/sys_command_receiver.rb and 1 other location - About 40 mins to fix
lib/roma/command/sys_command_receiver.rb on lines 1312..1318

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 37.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if s[1].to_i > 0 || s[1] == '0'
          @log.set_log_shift_age(s[1].to_i)
          @stats.log_shift_age = s[1].to_i
        else
          @log.set_log_shift_age(s[1])
Severity: Minor
Found in lib/roma/command/sys_command_receiver.rb and 1 other location - About 40 mins to fix
lib/roma/command/sys_command_receiver.rb on lines 1294..1300

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 37.

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

Further Reading

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])
Severity: Major
Found in lib/roma/plugin/plugin_alist.rb and 15 other locations - About 35 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 54..61
lib/roma/plugin/plugin_alist.rb on lines 93..100
lib/roma/plugin/plugin_alist.rb on lines 127..134
lib/roma/plugin/plugin_alist.rb on lines 366..373
lib/roma/plugin/plugin_alist.rb on lines 409..416
lib/roma/plugin/plugin_alist.rb on lines 455..462
lib/roma/plugin/plugin_alist.rb on lines 503..510
lib/roma/plugin/plugin_alist.rb on lines 552..559
lib/roma/plugin/plugin_alist.rb on lines 866..873
lib/roma/plugin/plugin_alist.rb on lines 911..918
lib/roma/plugin/plugin_alist.rb on lines 955..962
lib/roma/plugin/plugin_alist.rb on lines 1005..1012
lib/roma/plugin/plugin_alist.rb on lines 1054..1061
lib/roma/plugin/plugin_alist.rb on lines 1108..1115
lib/roma/plugin/plugin_alist.rb on lines 1147..1154

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

Further Reading

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])
Severity: Major
Found in lib/roma/plugin/plugin_alist.rb and 15 other locations - About 35 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 54..61
lib/roma/plugin/plugin_alist.rb on lines 93..100
lib/roma/plugin/plugin_alist.rb on lines 127..134
lib/roma/plugin/plugin_alist.rb on lines 366..373
lib/roma/plugin/plugin_alist.rb on lines 409..416
lib/roma/plugin/plugin_alist.rb on lines 455..462
lib/roma/plugin/plugin_alist.rb on lines 503..510
lib/roma/plugin/plugin_alist.rb on lines 552..559
lib/roma/plugin/plugin_alist.rb on lines 603..610
lib/roma/plugin/plugin_alist.rb on lines 866..873
lib/roma/plugin/plugin_alist.rb on lines 911..918
lib/roma/plugin/plugin_alist.rb on lines 955..962
lib/roma/plugin/plugin_alist.rb on lines 1005..1012
lib/roma/plugin/plugin_alist.rb on lines 1054..1061
lib/roma/plugin/plugin_alist.rb on lines 1147..1154

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if @stats.wb_command_map.key?("#{fnc.to_s}__prev".to_sym)
          data = @storages[hname].get(vn, k, d)
          Roma::WriteBehindProcess::push(hname, @stats.wb_command_map["#{fnc.to_s}__prev".to_sym], k, data) if data
Severity: Minor
Found in lib/roma/plugin/plugin_storage.rb and 1 other location - About 35 mins to fix
lib/roma/plugin/plugin_storage.rb on lines 694..696

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

Further Reading

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])
Severity: Major
Found in lib/roma/plugin/plugin_alist.rb and 15 other locations - About 35 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 93..100
lib/roma/plugin/plugin_alist.rb on lines 127..134
lib/roma/plugin/plugin_alist.rb on lines 366..373
lib/roma/plugin/plugin_alist.rb on lines 409..416
lib/roma/plugin/plugin_alist.rb on lines 455..462
lib/roma/plugin/plugin_alist.rb on lines 503..510
lib/roma/plugin/plugin_alist.rb on lines 552..559
lib/roma/plugin/plugin_alist.rb on lines 603..610
lib/roma/plugin/plugin_alist.rb on lines 866..873
lib/roma/plugin/plugin_alist.rb on lines 911..918
lib/roma/plugin/plugin_alist.rb on lines 955..962
lib/roma/plugin/plugin_alist.rb on lines 1005..1012
lib/roma/plugin/plugin_alist.rb on lines 1054..1061
lib/roma/plugin/plugin_alist.rb on lines 1108..1115
lib/roma/plugin/plugin_alist.rb on lines 1147..1154

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

Further Reading

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])
Severity: Major
Found in lib/roma/plugin/plugin_alist.rb and 15 other locations - About 35 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 54..61
lib/roma/plugin/plugin_alist.rb on lines 93..100
lib/roma/plugin/plugin_alist.rb on lines 366..373
lib/roma/plugin/plugin_alist.rb on lines 409..416
lib/roma/plugin/plugin_alist.rb on lines 455..462
lib/roma/plugin/plugin_alist.rb on lines 503..510
lib/roma/plugin/plugin_alist.rb on lines 552..559
lib/roma/plugin/plugin_alist.rb on lines 603..610
lib/roma/plugin/plugin_alist.rb on lines 866..873
lib/roma/plugin/plugin_alist.rb on lines 911..918
lib/roma/plugin/plugin_alist.rb on lines 955..962
lib/roma/plugin/plugin_alist.rb on lines 1005..1012
lib/roma/plugin/plugin_alist.rb on lines 1054..1061
lib/roma/plugin/plugin_alist.rb on lines 1108..1115
lib/roma/plugin/plugin_alist.rb on lines 1147..1154

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

Further Reading

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])
Severity: Major
Found in lib/roma/plugin/plugin_alist.rb and 15 other locations - About 35 mins to fix
lib/roma/plugin/plugin_alist.rb on lines 54..61
lib/roma/plugin/plugin_alist.rb on lines 93..100
lib/roma/plugin/plugin_alist.rb on lines 127..134
lib/roma/plugin/plugin_alist.rb on lines 366..373
lib/roma/plugin/plugin_alist.rb on lines 409..416
lib/roma/plugin/plugin_alist.rb on lines 455..462
lib/roma/plugin/plugin_alist.rb on lines 552..559
lib/roma/plugin/plugin_alist.rb on lines 603..610
lib/roma/plugin/plugin_alist.rb on lines 866..873
lib/roma/plugin/plugin_alist.rb on lines 911..918
lib/roma/plugin/plugin_alist.rb on lines 955..962
lib/roma/plugin/plugin_alist.rb on lines 1005..1012
lib/roma/plugin/plugin_alist.rb on lines 1054..1061
lib/roma/plugin/plugin_alist.rb on lines 1108..1115
lib/roma/plugin/plugin_alist.rb on lines 1147..1154

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

Further Reading

Severity
Category
Status
Source
Language