Showing 711 of 988 total issues

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a list of vApps by using REST API general QueryHandler.
        #
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a list of users for organization the org admin belongs to
        # by using REST API general QueryHandler.
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a list of vAppTemplates using REST API general
        # QueryHandler.
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a list of vdcs in the organization.
        #
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a list of groups for organization the org admin belongs to
        # by using REST API general QueryHandler.
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a list of organizations by using REST API general
        # QueryHandler.
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a disk list by using REST API general QueryHandler.
        #
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a list of Catalogs by using REST API general QueryHandler.
        #
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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

  module Compute
    class VcloudDirector
      class Real
        # Retrieves a media list by using REST API general QueryHandler.
        #
lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_users_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb on lines 2..90
lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb on lines 2..89
lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb on lines 2..89

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

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 VcloudDirector
      class Real
        require 'fog/vcloud_director/parsers/compute/vm'

Severity: Major
Found in lib/fog/vcloud_director/requests/compute/get_vm.rb and 1 other location - About 5 hrs to fix
lib/fog/vcloud_director/requests/compute/get_template_vm.rb on lines 2..68

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

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 VcloudDirector
      class Real
        require 'fog/vcloud_director/parsers/compute/vm'

Severity: Major
Found in lib/fog/vcloud_director/requests/compute/get_template_vm.rb and 1 other location - About 5 hrs to fix
lib/fog/vcloud_director/requests/compute/get_vm.rb on lines 2..68

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

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 Cloudstack

      class Real
        # Authorizes a particular ingress rule for this security group
lib/fog/cloudstack/requests/compute/authorize_security_group_egress.rb on lines 2..71

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

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 Cloudstack

      class Real
        # Authorizes a particular egress rule for this security group
lib/fog/cloudstack/requests/compute/authorize_security_group_ingress.rb on lines 2..71

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

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 VcloudDirector
      class Real
        extend Fog::Deprecation
        deprecate :put_vm_cpu, :put_cpu
Severity: Major
Found in lib/fog/vcloud_director/requests/compute/put_cpu.rb and 1 other location - About 4 hrs to fix
lib/fog/vcloud_director/requests/compute/put_memory.rb on lines 2..82

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

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 VcloudDirector
      class Real
        extend Fog::Deprecation
        deprecate :put_vm_memory, :put_memory
Severity: Major
Found in lib/fog/vcloud_director/requests/compute/put_memory.rb and 1 other location - About 4 hrs to fix
lib/fog/vcloud_director/requests/compute/put_cpu.rb on lines 2..82

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

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 DNS
    class Rage4
      class Real
        # Create a record
        # ==== Parameters
Severity: Major
Found in lib/fog/rage4/requests/dns/create_record.rb and 1 other location - About 3 hrs to fix
lib/fog/rage4/requests/dns/update_record.rb on lines 2..54

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

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 DNS
    class Rage4
      class Real
        # Updates an existing record
        # ==== Parameters
Severity: Major
Found in lib/fog/rage4/requests/dns/update_record.rb and 1 other location - About 3 hrs to fix
lib/fog/rage4/requests/dns/create_record.rb on lines 2..54

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

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 Cloudstack

      class Real
        # Deletes a particular ingress rule from this security group
lib/fog/cloudstack/requests/compute/revoke_security_group_egress.rb on lines 2..46

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

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 Cloudstack

      class Real
        # Deletes a particular egress rule from this security group
lib/fog/cloudstack/requests/compute/revoke_security_group_ingress.rb on lines 2..46

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

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 VcloudDirector
      class Real
        extend Fog::Deprecation
        deprecate :get_vm_cpu, :get_cpu_rasd_item
lib/fog/vcloud_director/requests/compute/get_memory_rasd_item.rb on lines 2..56

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

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