cloudfoundry-community/bosh-cloudstack-cpi

View on GitHub

Showing 548 of 1,705 total issues

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

      def create_jobs(jobs)
        if jobs.empty?
          @jobs_unchanged = true
          return
        end
Severity: Minor
Found in bosh-director/lib/bosh/director/jobs/update_release.rb and 1 other location - About 55 mins to fix
bosh-director/lib/bosh/director/jobs/update_release.rb on lines 242..254

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

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

func (f localFactory) TranslatorFrom(name string) (Translator, error) {
    f.init()
    name = NormalizedName(name)
    cs := localCharsets[name]
    if cs == nil {
Severity: Minor
Found in go_agent/src/code.google.com/p/go-charset/charset/local.go and 1 other location - About 55 mins to fix
go_agent/src/code.google.com/p/go-charset/charset/local.go on lines 50..61

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

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

func (f localFactory) TranslatorTo(name string) (Translator, error) {
    f.init()
    name = NormalizedName(name)
    cs := localCharsets[name]
    if cs == nil {
Severity: Minor
Found in go_agent/src/code.google.com/p/go-charset/charset/local.go and 1 other location - About 55 mins to fix
go_agent/src/code.google.com/p/go-charset/charset/local.go on lines 37..48

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

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

      sorted = snapshots.sort do |a, b|
        s = a['job'].to_s <=> b['job'].to_s
        s = a['index'].to_i <=> b['index'].to_i if s == 0
        s = a['created_at'].to_s <=> b['created_at'].to_s if s == 0
        s
Severity: Minor
Found in bosh_cli/lib/cli/commands/snapshot.rb and 1 other location - About 55 mins to fix
bosh_cli/lib/cli/commands/vms.rb on lines 35..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 45.

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

    create_data_type("vim.host.CpuIdInfo", "HostCpuIdInfo", "vmodl.DynamicData", "vim.version.version1", [["level", "int", "vim.version.version1"], ["vendor", "string", "vim.version.version1", {:optional => true}], ["eax", "string", "vim.version.version1", {:optional => true}], ["ebx", "string", "vim.version.version1", {:optional => true}], ["ecx", "string", "vim.version.version1", {:optional => true}], ["edx", "string", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 2 other locations - About 55 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1681..1681
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1705..1705

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

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

      def update_spec(spec)
        properties = spec.properties

        # pick from micro_bosh.yml the aws settings in
        # `apply_spec` section (apply_spec.properties.aws),
bosh_cli_plugin_micro/lib/bosh/deployer/instance_manager/cloudstack.rb on lines 35..45
bosh_cli_plugin_micro/lib/bosh/deployer/instance_manager/openstack.rb on lines 35..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

    create_data_type("vim.vm.device.VirtualDevice", "VirtualDevice", "vmodl.DynamicData", "vim.version.version1", [["key", "int", "vim.version.version1"], ["deviceInfo", "vim.Description", "vim.version.version1", {:optional => true}], ["backing", "vim.vm.device.VirtualDevice.BackingInfo", "vim.version.version1", {:optional => true}], ["connectable", "vim.vm.device.VirtualDevice.ConnectInfo", "vim.version.version1", {:optional => true}], ["controllerKey", "int", "vim.version.version1", {:optional => true}], ["unitNumber", "int", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 2 other locations - About 55 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1041..1041
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1705..1705

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

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

    create_data_type("vim.vm.device.VirtualDisk.SparseVer1BackingInfo", "VirtualDiskSparseVer1BackingInfo", "vim.vm.device.VirtualDevice.FileBackingInfo", "vim.version.version1", [["diskMode", "string", "vim.version.version1"], ["split", "boolean", "vim.version.version1", {:optional => true}], ["writeThrough", "boolean", "vim.version.version1", {:optional => true}], ["spaceUsedInKB", "long", "vim.version.version1", {:optional => true}], ["contentId", "string", "vim.version.version5", {:optional => true}], ["parent", "vim.vm.device.VirtualDisk.SparseVer1BackingInfo", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 2 other locations - About 55 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1041..1041
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1681..1681

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

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

      def update_spec(spec)
        properties = spec.properties

        properties['openstack'] =
          config.spec_properties['openstack'] ||
bosh_cli_plugin_micro/lib/bosh/deployer/instance_manager/aws.rb on lines 36..50
bosh_cli_plugin_micro/lib/bosh/deployer/instance_manager/cloudstack.rb on lines 35..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

      sorted = vms.sort do |a, b|
        s = a['job_name'].to_s <=> b['job_name'].to_s
        s = a['index'].to_i <=> b['index'].to_i if s == 0
        s = a['resource_pool'].to_s <=> b['resource_pool'].to_s if s == 0
        s
Severity: Minor
Found in bosh_cli/lib/cli/commands/vms.rb and 1 other location - About 55 mins to fix
bosh_cli/lib/cli/commands/snapshot.rb on lines 15..19

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

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

      def update_spec(spec)
        properties = spec.properties

        properties['cloudstack'] =
          config.spec_properties['cloudstack'] ||
bosh_cli_plugin_micro/lib/bosh/deployer/instance_manager/aws.rb on lines 36..50
bosh_cli_plugin_micro/lib/bosh/deployer/instance_manager/openstack.rb on lines 35..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

    create_table :packages do
      primary_key :id
      String :name, :null => false
      String :version, :null => false
      String :blobstore_id, :null => false
Severity: Minor
Found in bosh-director/db/migrations/director/20110209010747_initial.rb and 1 other location - About 55 mins to fix
bosh-director/db/migrations/director/20110209010747_initial.rb on lines 27..35

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    create_table :templates do
      primary_key :id
      String :name, :null => false
      String :version, :null => false
      String :blobstore_id, :null => false
Severity: Minor
Found in bosh-director/db/migrations/director/20110209010747_initial.rb and 1 other location - About 55 mins to fix
bosh-director/db/migrations/director/20110209010747_initial.rb on lines 16..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.LocalizationManager.MessageCatalog", "LocalizationManagerMessageCatalog", "vmodl.DynamicData", "vim.version.version5", [["moduleName", "string", "vim.version.version5"], ["catalogName", "string", "vim.version.version5"], ["locale", "string", "vim.version.version5"], ["catalogUri", "string", "vim.version.version5"], ["lastModified", "vmodl.DateTime", "vim.version.version5", {:optional => true}], ["md5sum", "string", "vim.version.version5", {:optional => true}], ["version", "string", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 50 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1110..1110
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1624..1624
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2256..2256

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

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

    create_managed_type("vim.CustomFieldsManager", "CustomFieldsManager", "vmodl.ManagedObject", "vim.version.version1", [["field", "vim.CustomFieldsManager.FieldDef[]", "vim.version.version1", {:optional => true}, "System.View"]], [["addFieldDefinition", "AddCustomFieldDef", "vim.version.version1", [["name", "string", "vim.version.version1", {}, nil], ["moType", "vmodl.TypeName", "vim.version.version2", {:optional => true}, nil], ["fieldDefPolicy", "vim.PrivilegePolicyDef", "vim.version.version2", {:optional => true}, nil], ["fieldPolicy", "vim.PrivilegePolicyDef", "vim.version.version2", {:optional => true}, nil]], [{}, "vim.CustomFieldsManager.FieldDef", "vim.CustomFieldsManager.FieldDef"], "Global.ManageCustomFields", ["vim.fault.DuplicateName", "vim.fault.InvalidPrivilege"]], ["removeFieldDefinition", "RemoveCustomFieldDef", "vim.version.version1", [["key", "int", "vim.version.version1", {}, nil]], [{}, "void", "void"], "Global.ManageCustomFields", nil], ["renameFieldDefinition", "RenameCustomFieldDef", "vim.version.version1", [["key", "int", "vim.version.version1", {}, nil], ["name", "string", "vim.version.version1", {}, nil]], [{}, "void", "void"], "Global.ManageCustomFields", ["vim.fault.DuplicateName"]], ["setField", "SetField", "vim.version.version1", [["entity", "vim.ManagedEntity", "vim.version.version1", {}, "Global.SetCustomField"], ["key", "int", "vim.version.version1", {}, nil], ["value", "string", "vim.version.version1", {}, nil]], [{}, "void", "void"], nil, nil]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 50 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1631..1631

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

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

    create_managed_type("vim.vm.check.CompatibilityChecker", "VirtualMachineCompatibilityChecker", "vmodl.ManagedObject", "vim.version.version5", nil, [["checkCompatibility", "CheckCompatibility_Task", "vim.version.version5", [["vm", "vim.VirtualMachine", "vim.version.version5", {}, nil], ["host", "vim.HostSystem", "vim.version.version5", {:optional => true}, nil], ["pool", "vim.ResourcePool", "vim.version.version5", {:optional => true}, nil], ["testType", "string[]", "vim.version.version5", {:optional => true}, nil]], [{}, "vim.Task", "vim.vm.check.Result[]"], "System.View", ["vim.fault.InvalidState", "vim.fault.NoActiveHostInCluster"]]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 50 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 208..208

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

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

    create_data_type("vim.vm.UsbInfo", "VirtualMachineUsbInfo", "vim.vm.TargetInfo", "vim.version.version2", [["description", "string", "vim.version.version2"], ["vendor", "int", "vim.version.version2"], ["product", "int", "vim.version.version2"], ["physicalPath", "string", "vim.version.version2"], ["family", "string[]", "vim.version.version2", {:optional => true}], ["speed", "string[]", "vim.version.version2", {:optional => true}], ["summary", "vim.vm.Summary", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 50 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 281..281
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1110..1110
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2256..2256

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

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

    create_data_type("vim.host.InternetScsiHba.AuthenticationCapabilities", "HostInternetScsiHbaAuthenticationCapabilities", "vmodl.DynamicData", "vim.version.version1", [["chapAuthSettable", "boolean", "vim.version.version1"], ["krb5AuthSettable", "boolean", "vim.version.version1"], ["srpAuthSettable", "boolean", "vim.version.version1"], ["spkmAuthSettable", "boolean", "vim.version.version1"], ["mutualChapSettable", "boolean", "vim.version.version5", {:optional => true}], ["targetChapSettable", "boolean", "vim.version.version5", {:optional => true}], ["targetMutualChapSettable", "boolean", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 50 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 281..281
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1110..1110
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1624..1624

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

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

    create_data_type("vim.host.NasVolume.Specification", "HostNasVolumeSpec", "vmodl.DynamicData", "vim.version.version1", [["remoteHost", "string", "vim.version.version1"], ["remotePath", "string", "vim.version.version1"], ["localPath", "string", "vim.version.version1"], ["accessMode", "string", "vim.version.version1"], ["type", "string", "vim.version.version2", {:optional => true}], ["userName", "string", "vim.version.version2", {:optional => true}], ["password", "string", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 50 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 281..281
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1624..1624
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2256..2256

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

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

func chanOfSend() {
    // MakeChan(chan<-) is a no-op.
    t := reflect.ChanOf(reflect.SendDir, reflect.TypeOf(&a))
    print(reflect.Zero(t).Interface())                      // @types chan<- *int
    print(reflect.MakeChan(t, 0).Interface().(chan<- *int)) // @pointsto
go_agent/src/code.google.com/p/go.tools/pointer/testdata/chanreflect.go on lines 39..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 119.

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