fog/fog-openstack

View on GitHub

Showing 616 of 616 total issues

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_project_user_roles(id, user_id)
lib/fog/openstack/identity/v3/requests/list_domain_group_roles.rb on lines 2..17
lib/fog/openstack/identity/v3/requests/list_domain_user_roles.rb on lines 2..17
lib/fog/openstack/identity/v3/requests/list_project_group_roles.rb on lines 2..17

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

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 OpenStack
    class Identity
      class V3
        class Real
          def update_os_credential(id, credential)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_os_credential.rb and 8 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/update_domain.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_endpoint.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_group.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_policy.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_project.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_role.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_service.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_user.rb on lines 2..16

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

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

  module OpenStack
    class Volume
      class V1 < Fog::OpenStack::Volume
        class Real
          include Fog::OpenStack::Core
Severity: Minor
Found in lib/fog/openstack/volume/v1/real.rb and 2 other locations - About 15 mins to fix
lib/fog/openstack/volume/v2/real.rb on lines 2..17
lib/fog/openstack/volume/v3/real.rb on lines 2..17

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_os_credentials(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_os_credentials.rb and 6 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_domains.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_endpoints.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_policies.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_roles.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_services.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_users.rb on lines 2..18

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_users(options = {})
Severity: Minor
Found in lib/fog/openstack/identity/v3/requests/list_users.rb and 6 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/list_domains.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_endpoints.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_os_credentials.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_policies.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_roles.rb on lines 2..18
lib/fog/openstack/identity/v3/requests/list_services.rb on lines 2..18

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

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

      recognizes :openstack_auth_token, :openstack_management_url,
                 :persistent, :openstack_service_type, :openstack_service_name,
                 :openstack_tenant, :openstack_tenant_id,
                 :openstack_api_key, :openstack_username, :openstack_identity_endpoint,
                 :current_user, :current_tenant, :openstack_region,
Severity: Major
Found in lib/fog/openstack/baremetal.rb and 9 other locations - About 15 mins to fix
lib/fog/openstack/container_infra.rb on lines 8..19
lib/fog/openstack/event.rb on lines 7..18
lib/fog/openstack/image/v1.rb on lines 10..21
lib/fog/openstack/image/v2.rb on lines 10..21
lib/fog/openstack/introspection.rb on lines 9..20
lib/fog/openstack/metering.rb on lines 9..20
lib/fog/openstack/metric.rb on lines 7..18
lib/fog/openstack/orchestration.rb on lines 5..16
lib/fog/openstack/planning.rb on lines 7..18

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

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

  module OpenStack
    class Compute
      class Real
        def change_server_password(server_id, admin_password)
          body = {'changePassword' => {'adminPass' => admin_password}}
Severity: Minor
Found in lib/fog/openstack/compute/requests/change_server_password.rb and 4 other locations - About 15 mins to fix
lib/fog/openstack/compute/requests/add_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/get_console_output.rb on lines 2..19
lib/fog/openstack/compute/requests/remove_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/resize_server.rb on lines 2..15

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

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 OpenStack
    class Identity
      class V3
        class Real
          def update_group(id, group)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_group.rb and 8 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/update_domain.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_endpoint.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_os_credential.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_policy.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_project.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_role.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_service.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_user.rb on lines 2..16

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

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 OpenStack
    class Identity
      class V3
        class Real
          def update_service(id, service)
Severity: Major
Found in lib/fog/openstack/identity/v3/requests/update_service.rb and 8 other locations - About 15 mins to fix
lib/fog/openstack/identity/v3/requests/update_domain.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_endpoint.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_group.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_os_credential.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_policy.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_project.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_role.rb on lines 2..16
lib/fog/openstack/identity/v3/requests/update_user.rb on lines 2..16

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

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 OpenStack
    class SharedFileSystem
      class Real
        def share_network_action(id, options = {}, expects_status = 200)
          request(
lib/fog/openstack/shared_file_system/requests/share_action.rb on lines 2..11

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

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

  module OpenStack
    class Compute
      class Real
        def get_console_output(server_id, log_length)
          body = {
Severity: Minor
Found in lib/fog/openstack/compute/requests/get_console_output.rb and 4 other locations - About 15 mins to fix
lib/fog/openstack/compute/requests/add_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/change_server_password.rb on lines 2..15
lib/fog/openstack/compute/requests/remove_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/resize_server.rb on lines 2..15

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

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

  module OpenStack
    class Compute
      class Real
        def resize_server(server_id, flavor_ref)
          body = {'resize' => {'flavorRef' => flavor_ref}}
Severity: Minor
Found in lib/fog/openstack/compute/requests/resize_server.rb and 4 other locations - About 15 mins to fix
lib/fog/openstack/compute/requests/add_security_group.rb on lines 2..15
lib/fog/openstack/compute/requests/change_server_password.rb on lines 2..15
lib/fog/openstack/compute/requests/get_console_output.rb on lines 2..19
lib/fog/openstack/compute/requests/remove_security_group.rb on lines 2..15

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_domain_group_roles(id, group_id)
lib/fog/openstack/identity/v3/requests/list_domain_user_roles.rb on lines 2..17
lib/fog/openstack/identity/v3/requests/list_project_group_roles.rb on lines 2..17
lib/fog/openstack/identity/v3/requests/list_project_user_roles.rb on lines 2..17

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

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

          response.body = {
              "created_by_project_id" => "384a902b-6856-424c-9d30-6b5325ac20a5",
              "created_by_user_id"    => "d040def9-fd68-45f0-a19f-253014f397c3",
              "ended_at"              => nil,
              "id"                    => "75c44741-cc60-4033-804e-2d3098c7d2e9",
Severity: Minor
Found in lib/fog/openstack/metric/requests/get_resource.rb and 1 other location - About 15 mins to fix
lib/fog/openstack/metric/requests/list_resources.rb on lines 20..32

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

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

  module OpenStack
    class Identity
      class V3
        class Real
          def list_project_group_roles(id, group_id)
lib/fog/openstack/identity/v3/requests/list_domain_group_roles.rb on lines 2..17
lib/fog/openstack/identity/v3/requests/list_domain_user_roles.rb on lines 2..17
lib/fog/openstack/identity/v3/requests/list_project_user_roles.rb on lines 2..17

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

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

  module OpenStack
    class Volume
      class V2 < Fog::OpenStack::Volume
        class Real
          include Fog::OpenStack::Core
Severity: Minor
Found in lib/fog/openstack/volume/v2/real.rb and 2 other locations - About 15 mins to fix
lib/fog/openstack/volume/v1/real.rb on lines 2..17
lib/fog/openstack/volume/v3/real.rb on lines 2..17

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

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