cloudfoundry-community/bosh-cloudstack-cpi

View on GitHub

Showing 548 of 1,705 total issues

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

    create_managed_type("vim.profile.ComplianceManager", "ProfileComplianceManager", "vmodl.ManagedObject", "vim.version.version5", nil, [["checkCompliance", "CheckCompliance_Task", "vim.version.version5", [["profile", "vim.profile.Profile[]", "vim.version.version5", {:optional => true}, nil], ["entity", "vim.ManagedEntity[]", "vim.version.version5", {:optional => true}, nil]], [{}, "vim.Task", "vim.profile.ComplianceResult[]"], "System.View", nil], ["queryComplianceStatus", "QueryComplianceStatus", "vim.version.version5", [["profile", "vim.profile.Profile[]", "vim.version.version5", {:optional => true}, nil], ["entity", "vim.ManagedEntity[]", "vim.version.version5", {:optional => true}, nil]], [{:optional => true}, "vim.profile.ComplianceResult[]", "vim.profile.ComplianceResult[]"], "System.View", nil], ["clearComplianceStatus", "ClearComplianceStatus", "vim.version.version5", [["profile", "vim.profile.Profile[]", "vim.version.version5", {:optional => true}, nil], ["entity", "vim.ManagedEntity[]", "vim.version.version5", {:optional => true}, nil]], [{}, "void", "void"], "Profile.Clear", nil], ["queryExpressionMetadata", "QueryExpressionMetadata", "vim.version.version5", [["expressionName", "string[]", "vim.version.version5", {:optional => true}, nil], ["profile", "vim.profile.Profile", "vim.version.version7", {:optional => true}, nil]], [{:optional => true}, "vim.profile.ExpressionMetadata[]", "vim.profile.ExpressionMetadata[]"], "System.View", nil]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 4 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 224..224
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1392..1392
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1417..1417
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1479..1479

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

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

      def get_file(id, file)
        response = @client.get(url(id), {}, @headers) do |block|
          file.write(block)
        end

blobstore_client/lib/blobstore_client/dav_blobstore_client.rb on lines 46..51

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

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

      rescue Excon::Errors::BadRequest => e
        badrequest = parse_openstack_response(e.response, "badRequest")
        details = badrequest.nil? ? "" : " (#{badrequest["message"]})"   
        cloud_error("OpenStack API Bad Request#{details}. Check task debug log for details.", e)
      rescue Excon::Errors::InternalServerError => e
Severity: Minor
Found in bosh_openstack_cpi/lib/cloud/openstack/helpers.rb and 1 other location - About 25 mins to fix
bosh_cloudstack_cpi/lib/cloud/cloudstack/helpers.rb on lines 27..39

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

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

            'network' => {
              'type' => 'manual',
              'cidr' => env['BOSH_VCLOUD_NETWORK_CIDR'],
              'reserved' => env['BOSH_VCLOUD_NETWORK_RESERVED'].split(/[|,]/).map(&:strip),
              'static' => [env['BOSH_VCLOUD_NETWORK_STATIC']],
Severity: Minor
Found in bosh-dev/lib/bosh/dev/vcloud/bat_deployment_manifest.rb and 1 other location - About 25 mins to fix
bosh-dev/lib/bosh/dev/vsphere/bat_deployment_manifest.rb on lines 31..37

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

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

    create_data_type("vim.host.ScsiTopology.Target", "HostScsiTopologyTarget", "vmodl.DynamicData", "vim.version.version1", [["key", "string", "vim.version.version1"], ["target", "int", "vim.version.version1"], ["lun", "vim.host.ScsiTopology.Lun[]", "vim.version.version1", {:optional => true}], ["transport", "vim.host.TargetTransport", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vmodl.query.PropertyCollector.ObjectUpdate", "ObjectUpdate", "vmodl.DynamicData", "vmodl.query.version.version1", [["kind", "vmodl.query.PropertyCollector.ObjectUpdate.Kind", "vmodl.query.version.version1"], ["obj", "vmodl.ManagedObject", "vmodl.query.version.version1"], ["changeSet", "vmodl.query.PropertyCollector.Change[]", "vmodl.query.version.version1", {:optional => true}], ["missingSet", "vmodl.query.PropertyCollector.MissingProperty[]", "vmodl.query.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if info.type == Object
            namespace_attribute, qualified_name = qualified_name(value.class, current_default_namespace)
            attribute += "#{namespace_attribute} #{@xsi_prefix}type=\"#{qualified_name}\""
          end
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb and 2 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb on lines 143..146
bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb on lines 149..152

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_managed_type("vim.DistributedVirtualSwitch", "DistributedVirtualSwitch", "vim.ManagedEntity", "vim.version.version5", [["uuid", "string", "vim.version.version5", {}, nil], ["capability", "vim.DistributedVirtualSwitch.Capability", "vim.version.version5", {}, nil], ["summary", "vim.DistributedVirtualSwitch.Summary", "vim.version.version5", {}, nil], ["config", "vim.DistributedVirtualSwitch.ConfigInfo", "vim.version.version5", {}, nil], ["networkResourcePool", "vim.dvs.NetworkResourcePool[]", "vim.version.version6", {:optional => true}, nil], ["portgroup", "vim.dvs.DistributedVirtualPortgroup[]", "vim.version.version5", {:optional => true}, nil]], [["fetchPortKeys", "FetchDVPortKeys", "vim.version.version5", [["criteria", "vim.dvs.PortCriteria", "vim.version.version5", {:optional => true}, nil]], [{:optional => true}, "string[]", "string[]"], "System.Read", nil], ["fetchPorts", "FetchDVPorts", "vim.version.version5", [["criteria", "vim.dvs.PortCriteria", "vim.version.version5", {:optional => true}, nil]], [{:optional => true}, "vim.dvs.DistributedVirtualPort[]", "vim.dvs.DistributedVirtualPort[]"], "System.Read", nil], ["queryUsedVlanId", "QueryUsedVlanIdInDvs", "vim.version.version5", [], [{:optional => true}, "int[]", "int[]"], "System.Read", nil], ["reconfigure", "ReconfigureDvs_Task", "vim.version.version5", [["spec", "vim.DistributedVirtualSwitch.ConfigSpec", "vim.version.version5", {}, nil]], [{}, "vim.Task", "void"], nil, ["vim.fault.DvsFault", "vim.fault.ConcurrentAccess", "vim.fault.DuplicateName", "vim.fault.InvalidState", "vim.fault.InvalidName", "vim.fault.NotFound", "vim.fault.AlreadyExists", "vim.fault.LimitExceeded", "vim.fault.ResourceInUse", "vim.fault.ResourceNotAvailable", "vim.fault.DvsNotAuthorized"]], ["performProductSpecOperation", "PerformDvsProductSpecOperation_Task", "vim.version.version5", [["operation", "string", "vim.version.version5", {}, nil], ["productSpec", "vim.dvs.ProductSpec", "vim.version.version5", {:optional => true}, nil]], [{}, "vim.Task", "void"], "DVSwitch.Modify", ["vim.fault.TaskInProgress", "vim.fault.InvalidState", "vim.fault.DvsFault"]], ["merge", "MergeDvs_Task", "vim.version.version5", [["dvs", "vim.DistributedVirtualSwitch", "vim.version.version5", {}, "DVSwitch.Delete"]], [{}, "vim.Task", "void"], "DVSwitch.Modify", ["vim.fault.DvsFault", "vim.fault.NotFound", "vim.fault.ResourceInUse", "vim.fault.InvalidHostState"]], ["addPortgroups", "AddDVPortgroup_Task", "vim.version.version5", [["spec", "vim.dvs.DistributedVirtualPortgroup.ConfigSpec[]", "vim.version.version5", {}, nil]], [{}, "vim.Task", "void"], "DVPortgroup.Create", ["vim.fault.DvsFault", "vim.fault.DuplicateName", "vim.fault.InvalidName"]], ["movePort", "MoveDVPort_Task", "vim.version.version5", [["portKey", "string[]", "vim.version.version5", {}, nil], ["destinationPortgroupKey", "string", "vim.version.version5", {:optional => true}, nil]], [{}, "vim.Task", "void"], "DVSwitch.Modify", ["vim.fault.DvsFault", "vim.fault.NotFound", "vim.fault.ConcurrentAccess"]], ["updateCapability", "UpdateDvsCapability", "vim.version.version5", [["capability", "vim.DistributedVirtualSwitch.Capability", "vim.version.version5", {}, nil]], [{}, "void", "void"], "DVSwitch.Modify", ["vim.fault.DvsFault"]], ["reconfigurePort", "ReconfigureDVPort_Task", "vim.version.version5", [["port", "vim.dvs.DistributedVirtualPort.ConfigSpec[]", "vim.version.version5", {}, nil]], [{}, "vim.Task", "void"], "DVSwitch.PortConfig", ["vim.fault.DvsFault", "vim.fault.NotFound", "vim.fault.ResourceInUse", "vim.fault.ConcurrentAccess"]], ["reconfigureOverlayInstance", "DVSReconfigureOverlayInstance_Task", "vim.version.dev", [["configSpec", "vim.DistributedVirtualSwitch.OverlayInstanceConfigSpec[]", "vim.version.dev", {}, nil]], [{}, "vim.Task", "void"], "DVSwitch.Modify", ["vim.fault.DvsFault", "vim.fault.ResourceInUse", "vim.fault.NotFound"]], ["refreshPortState", "RefreshDVPortState", "vim.version.version5", [["portKeys", "string[]", "vim.version.version5", {:optional => true}, nil]], [{}, "void", "void"], "System.Read", ["vim.fault.DvsFault", "vim.fault.NotFound"]], ["rectifyHost", "RectifyDvsHost_Task", "vim.version.version5", [["hosts", "vim.HostSystem[]", "vim.version.version5", {:optional => true}, nil]], [{}, "vim.Task", "void"], "System.Read", ["vim.fault.DvsFault", "vim.fault.NotFound"]], ["updateNetworkResourcePool", "UpdateNetworkResourcePool", "vim.version.version6", [["configSpec", "vim.dvs.NetworkResourcePool.ConfigSpec[]", "vim.version.version6", {}, nil]], [{}, "void", "void"], "DVSwitch.ResourceManagement", ["vim.fault.DvsFault", "vim.fault.NotFound", "vim.fault.InvalidName", "vim.fault.ConcurrentAccess"]], ["addNetworkResourcePool", "AddNetworkResourcePool", "vim.version.version7", [["configSpec", "vim.dvs.NetworkResourcePool.ConfigSpec[]", "vim.version.version7", {}, nil]], [{}, "void", "void"], "DVSwitch.ResourceManagement", ["vim.fault.DvsFault", "vim.fault.InvalidName"]], ["removeNetworkResourcePool", "RemoveNetworkResourcePool", "vim.version.version7", [["key", "string[]", "vim.version.version7", {}, nil]], [{}, "void", "void"], "DVSwitch.ResourceManagement", ["vim.fault.DvsFault", "vim.fault.NotFound", "vim.fault.InvalidName", "vim.fault.ResourceInUse"]], ["enableNetworkResourceManagement", "EnableNetworkResourceManagement", "vim.version.version6", [["enable", "boolean", "vim.version.version6", {}, nil]], [{}, "void", "void"], "DVSwitch.ResourceManagement", ["vim.fault.DvsFault"]], ["queryAvailableOverlayClass", "DVSQueryAvailableOverlayClass", "vim.version.dev", [], [{:optional => true}, "vim.DistributedVirtualSwitch.OverlayClassConfigInfo[]", "vim.DistributedVirtualSwitch.OverlayClassConfigInfo[]"], "System.View", nil]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 5 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 347..347
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 347..347
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1854..1854
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2269..2269
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2382..2382

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vim.LicenseManager.LicenseUsageInfo", "LicenseUsageInfo", "vmodl.DynamicData", "vim.version.version1", [["source", "vim.LicenseManager.LicenseSource", "vim.version.version1"], ["sourceAvailable", "boolean", "vim.version.version1"], ["reservationInfo", "vim.LicenseManager.ReservationInfo[]", "vim.version.version1", {:optional => true}], ["featureInfo", "vim.LicenseManager.FeatureInfo[]", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vim.vm.RelocateSpec.DiskLocator", "VirtualMachineRelocateSpecDiskLocator", "vmodl.DynamicData", "vim.version.version1", [["diskId", "int", "vim.version.version1"], ["datastore", "vim.Datastore", "vim.version.version1"], ["diskMoveType", "string", "vim.version.version5", {:optional => true}], ["diskBackingInfo", "vim.vm.device.VirtualDevice.BackingInfo", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vim.event.VmRelocateFailedEvent", "VmRelocateFailedEvent", "vim.event.VmRelocateSpecEvent", "vim.version.version1", [["destHost", "vim.event.HostEventArgument", "vim.version.version1"], ["reason", "vmodl.MethodFault", "vim.version.version1"], ["destDatacenter", "vim.event.DatacenterEventArgument", "vim.version.version7", {:optional => true}], ["destDatastore", "vim.event.DatastoreEventArgument", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vim.vm.customization.LinuxPrep", "CustomizationLinuxPrep", "vim.vm.customization.IdentitySettings", "vim.version.version1", [["hostName", "vim.vm.customization.NameGenerator", "vim.version.version1"], ["domain", "string", "vim.version.version1"], ["timeZone", "string", "vim.version.version5", {:optional => true}], ["hwClockUTC", "boolean", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if info.type == Object
            namespace_attribute, qualified_name = qualified_name(value.class, current_default_namespace)
            attribute += "#{namespace_attribute} #{@xsi_prefix}type=\"#{qualified_name}\""
          end
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb and 2 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb on lines 137..140
bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb on lines 143..146

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vim.vm.guest.ProcessManager.ProgramSpec", "GuestProgramSpec", "vmodl.DynamicData", "vim.version.version7", [["programPath", "string", "vim.version.version7"], ["arguments", "string", "vim.version.version7"], ["workingDirectory", "string", "vim.version.version7", {:optional => true}], ["envVariables", "string[]", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vim.event.VmFailedMigrateEvent", "VmFailedMigrateEvent", "vim.event.VmEvent", "vim.version.version1", [["destHost", "vim.event.HostEventArgument", "vim.version.version1"], ["reason", "vmodl.MethodFault", "vim.version.version1"], ["destDatacenter", "vim.event.DatacenterEventArgument", "vim.version.version7", {:optional => true}], ["destDatastore", "vim.event.DatastoreEventArgument", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 52..52
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if info.type == Object
            namespace_attribute, qualified_name = qualified_name(value.class, current_default_namespace)
            attribute += "#{namespace_attribute} #{@xsi_prefix}type=\"#{qualified_name}\""
          end
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb and 2 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb on lines 137..140
bosh_vsphere_cpi/lib/ruby_vim_sdk/soap/serializer.rb on lines 149..152

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vmodl.query.PropertyCollector.TraversalSpec", "TraversalSpec", "vmodl.query.PropertyCollector.SelectionSpec", "vmodl.query.version.version1", [["type", "vmodl.TypeName", "vmodl.query.version.version1"], ["path", "vmodl.PropertyPath", "vmodl.query.version.version1"], ["skip", "boolean", "vmodl.query.version.version1", {:optional => true}], ["selectSet", "vmodl.query.PropertyCollector.SelectionSpec[]", "vmodl.query.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb and 8 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/core_types.rb on lines 57..57
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 275..275
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 673..673
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 683..683
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1291..1291
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1662..1662
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1812..1812
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2309..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      resource_pool_traversal_spec = PC::TraversalSpec.new(
          :name => "resourcePoolTraversalSpec",
          :type => Vim::ResourcePool,
          :path => "resourcePool",
          :skip => false,
Severity: Minor
Found in bosh_vsphere_cpi/lib/cloud/vsphere/client.rb and 1 other location - About 20 mins to fix
bosh_vsphere_cpi/lib/cloud/vsphere/client.rb on lines 297..306

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      compute_resource_rp_traversal_spec = PC::TraversalSpec.new(
          :name => "computeResourceRpTraversalSpec",
          :type => Vim::ComputeResource,
          :path => "resourcePool",
          :skip => false,
Severity: Minor
Found in bosh_vsphere_cpi/lib/cloud/vsphere/client.rb and 1 other location - About 20 mins to fix
bosh_vsphere_cpi/lib/cloud/vsphere/client.rb on lines 279..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    create_data_type("vim.host.HardwareStatusInfo", "HostHardwareStatusInfo", "vmodl.DynamicData", "vim.version.version2", [["memoryStatusInfo", "vim.host.HardwareStatusInfo.HardwareElementInfo[]", "vim.version.version2", {:optional => true}], ["cpuStatusInfo", "vim.host.HardwareStatusInfo.HardwareElementInfo[]", "vim.version.version2", {:optional => true}], ["storageStatusInfo", "vim.host.HardwareStatusInfo.StorageStatusInfo[]", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

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

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