Showing 460 of 460 total issues

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

          begin
            request(
              :body    => body,
              :expects => 201,
              :headers => {'Content-Type' => 'application/vnd.vmware.vcloud.catalogItem+xml'},
lib/fog/vcloud_director/requests/compute/post_instantiate_vapp_template.rb on lines 114..128

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

module Fog
  module Compute
    class CloudSigma
      class Ips < Fog::Collection
        model Fog::Compute::CloudSigma::IP
Severity: Major
Found in lib/fog/cloudsigma/models/ips.rb and 5 other locations - About 55 mins to fix
lib/fog/cloudsigma/models/lib_volumes.rb on lines 4..21
lib/fog/cloudsigma/models/servers.rb on lines 4..21
lib/fog/cloudsigma/models/snapshots.rb on lines 4..21
lib/fog/cloudsigma/models/vlans.rb on lines 4..21
lib/fog/cloudsigma/models/volumes.rb on lines 4..21

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

module Fog
  module Compute
    class CloudSigma
      class Servers < Fog::Collection
        model Fog::Compute::CloudSigma::Server
Severity: Major
Found in lib/fog/cloudsigma/models/servers.rb and 5 other locations - About 55 mins to fix
lib/fog/cloudsigma/models/ips.rb on lines 4..21
lib/fog/cloudsigma/models/lib_volumes.rb on lines 4..21
lib/fog/cloudsigma/models/snapshots.rb on lines 4..21
lib/fog/cloudsigma/models/vlans.rb on lines 4..21
lib/fog/cloudsigma/models/volumes.rb on lines 4..21

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

module Fog
  module Compute
    class CloudSigma
      class Vlans < Fog::Collection
        model Fog::Compute::CloudSigma::VLAN
Severity: Major
Found in lib/fog/cloudsigma/models/vlans.rb and 5 other locations - About 55 mins to fix
lib/fog/cloudsigma/models/ips.rb on lines 4..21
lib/fog/cloudsigma/models/lib_volumes.rb on lines 4..21
lib/fog/cloudsigma/models/servers.rb on lines 4..21
lib/fog/cloudsigma/models/snapshots.rb on lines 4..21
lib/fog/cloudsigma/models/volumes.rb on lines 4..21

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

Method generate_configure_org_network_request has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

        def generate_configure_org_network_request(vapp_id, vapp_network, vapp_network_uri, org_network, org_network_uri, enable_firewall=false, portmap=nil)
Severity: Major
Found in lib/fog/vcloud/requests/compute/configure_org_network.rb - About 50 mins to fix

    Method configure_org_network has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def configure_org_network(vapp_id, vapp_network, vapp_network_uri, org_network, org_network_uri, enable_firewall=false, port_map=nil)
    Severity: Major
    Found in lib/fog/vcloud/requests/compute/configure_org_network.rb - About 50 mins to fix

      Method linode_disk_createfromstackscript has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              def linode_disk_createfromstackscript(linode_id, script_id, distro_id, name, size, password, options={})
      Severity: Major
      Found in lib/fog/linode/requests/compute/linode_disk_createfromstackscript.rb - About 50 mins to fix

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

              class Mock
                def self.data
                  @data ||= Hash.new do |hash, key|
                    hash[key] = {}
                  end
        Severity: Major
        Found in lib/fog/linode/compute.rb and 2 other locations - About 50 mins to fix
        lib/fog/bare_metal_cloud/compute.rb on lines 22..42
        lib/fog/linode/dns.rb on lines 25..45

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

        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

          module Compute
            class Linode
              class Real
                def linode_boot(linode_id, config_id)
                  request(
        Severity: Minor
        Found in lib/fog/linode/requests/compute/linode_boot.rb and 1 other location - About 50 mins to fix
        lib/fog/linode/requests/compute/linode_config_delete.rb on lines 2..27

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

        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

                  locations["101"] = {
                    "state"=>1,
                    "location"=>"ca-on-dc1",
                    "capabilities"=>[
                      {"entries"=>{"EXT3"=>["ext3"], "RAW"=>["raw"]}, "id"=>"oss.storage.format"},
        Severity: Major
        Found in lib/fog/ibm/compute.rb and 5 other locations - About 50 mins to fix
        lib/fog/ibm/compute.rb on lines 153..163
        lib/fog/ibm/compute.rb on lines 165..175
        lib/fog/ibm/compute.rb on lines 177..187
        lib/fog/ibm/compute.rb on lines 201..211
        lib/fog/ibm/compute.rb on lines 213..223

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

        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

                  locations["121"] = {
                    "state"=>1,
                    "location"=>"ap-jp-dc1",
                    "capabilities"=>[
                      {"entries"=>{"EXT3"=>["ext3"], "RAW"=>["raw"]}, "id"=>"oss.storage.format"},
        Severity: Major
        Found in lib/fog/ibm/compute.rb and 5 other locations - About 50 mins to fix
        lib/fog/ibm/compute.rb on lines 153..163
        lib/fog/ibm/compute.rb on lines 165..175
        lib/fog/ibm/compute.rb on lines 177..187
        lib/fog/ibm/compute.rb on lines 189..199
        lib/fog/ibm/compute.rb on lines 213..223

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

        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

          module Compute
            class Linode
              class Real
                def linode_config_delete(linode_id, config_id)
                  request(
        Severity: Minor
        Found in lib/fog/linode/requests/compute/linode_config_delete.rb and 1 other location - About 50 mins to fix
        lib/fog/linode/requests/compute/linode_boot.rb on lines 2..23

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

        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

                  locations["61"] = {
                    "state"=>1,
                    "location"=>"EHN",
                    "capabilities"=>[
                      {"entries"=>{"EXT3"=>["ext3"], "RAW"=>["raw"]}, "id"=>"oss.storage.format"},
        Severity: Major
        Found in lib/fog/ibm/compute.rb and 5 other locations - About 50 mins to fix
        lib/fog/ibm/compute.rb on lines 153..163
        lib/fog/ibm/compute.rb on lines 177..187
        lib/fog/ibm/compute.rb on lines 189..199
        lib/fog/ibm/compute.rb on lines 201..211
        lib/fog/ibm/compute.rb on lines 213..223

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

        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

                  locations["41"] = {
                    "state"=>1,
                    "location"=>"RTP",
                    "capabilities"=>[
                      {"entries"=>{"EXT3"=>["ext3"], "RAW"=>["raw"]}, "id"=>"oss.storage.format"},
        Severity: Major
        Found in lib/fog/ibm/compute.rb and 5 other locations - About 50 mins to fix
        lib/fog/ibm/compute.rb on lines 165..175
        lib/fog/ibm/compute.rb on lines 177..187
        lib/fog/ibm/compute.rb on lines 189..199
        lib/fog/ibm/compute.rb on lines 201..211
        lib/fog/ibm/compute.rb on lines 213..223

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

        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

                  locations["141"] = {
                    "state"=>1,
                    "location"=>"ap-sg-dc1",
                    "capabilities"=>[
                      {"entries"=>{"EXT3"=>["ext3"], "RAW"=>["raw"]}, "id"=>"oss.storage.format"},
        Severity: Major
        Found in lib/fog/ibm/compute.rb and 5 other locations - About 50 mins to fix
        lib/fog/ibm/compute.rb on lines 153..163
        lib/fog/ibm/compute.rb on lines 165..175
        lib/fog/ibm/compute.rb on lines 177..187
        lib/fog/ibm/compute.rb on lines 189..199
        lib/fog/ibm/compute.rb on lines 201..211

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

        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 3 locations. Consider refactoring.
        Open

              class Mock
                def self.data
                  @data ||= Hash.new do |hash, key|
                    hash[key] = {}
                  end
        Severity: Major
        Found in lib/fog/bare_metal_cloud/compute.rb and 2 other locations - About 50 mins to fix
        lib/fog/linode/compute.rb on lines 64..84
        lib/fog/linode/dns.rb on lines 25..45

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

        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 3 locations. Consider refactoring.
        Open

              class Mock
                def self.data
                  @data ||= Hash.new do |hash, key|
                    hash[key] = {}
                  end
        Severity: Major
        Found in lib/fog/linode/dns.rb and 2 other locations - About 50 mins to fix
        lib/fog/bare_metal_cloud/compute.rb on lines 22..42
        lib/fog/linode/compute.rb on lines 64..84

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

        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

                  locations["82"] = {
                    "state"=>1,
                    "location"=>"us-co-dc1",
                    "capabilities"=>[
                      {"entries"=>{"EXT3"=>["ext3"], "RAW"=>["raw"]}, "id"=>"oss.storage.format"},
        Severity: Major
        Found in lib/fog/ibm/compute.rb and 5 other locations - About 50 mins to fix
        lib/fog/ibm/compute.rb on lines 153..163
        lib/fog/ibm/compute.rb on lines 165..175
        lib/fog/ibm/compute.rb on lines 189..199
        lib/fog/ibm/compute.rb on lines 201..211
        lib/fog/ibm/compute.rb on lines 213..223

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

        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

          module Compute
            class Openvz
              class Real
                def start_server(id,options={})
                  vzctl("start",{:ctid => id}.merge(options))
        Severity: Minor
        Found in lib/fog/openvz/requests/compute/start_server.rb and 1 other location - About 45 mins to fix
        lib/fog/openvz/requests/compute/stop_server.rb on lines 2..14

        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

          module Compute
            class Openvz
              class Real
                def stop_server(id, options = {})
                  vzctl("stop",{:ctid => id}.merge(options))
        Severity: Minor
        Found in lib/fog/openvz/requests/compute/stop_server.rb and 1 other location - About 45 mins to fix
        lib/fog/openvz/requests/compute/start_server.rb on lines 2..14

        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

        Severity
        Category
        Status
        Source
        Language