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

    create_data_type("vim.host.NetworkConfig", "HostNetworkConfig", "vmodl.DynamicData", "vim.version.version1", [["vswitch", "vim.host.VirtualSwitch.Config[]", "vim.version.version1", {:optional => true}], ["proxySwitch", "vim.host.HostProxySwitch.Config[]", "vim.version.version5", {:optional => true}], ["portgroup", "vim.host.PortGroup.Config[]", "vim.version.version1", {:optional => true}], ["pnic", "vim.host.PhysicalNic.Config[]", "vim.version.version1", {:optional => true}], ["vnic", "vim.host.VirtualNic.Config[]", "vim.version.version1", {:optional => true}], ["consoleVnic", "vim.host.VirtualNic.Config[]", "vim.version.version1", {:optional => true}], ["dnsConfig", "vim.host.DnsConfig", "vim.version.version1", {:optional => true}], ["ipRouteConfig", "vim.host.IpRouteConfig", "vim.version.version1", {:optional => true}], ["consoleIpRouteConfig", "vim.host.IpRouteConfig", "vim.version.version1", {:optional => true}], ["routeTableConfig", "vim.host.IpRouteTableConfig", "vim.version.version5", {:optional => true}], ["dhcp", "vim.host.DhcpService.Config[]", "vim.version.version2", {:optional => true}], ["nat", "vim.host.NatService.Config[]", "vim.version.version2", {:optional => true}], ["ipV6Enabled", "boolean", "vim.version.version5", {:optional => true}], ["ipSecConfig", "vim.host.IpSecConfig", "vim.version.ipv6", {:optional => true}], ["consoleIpSecConfig", "vim.host.IpSecConfig", "vim.version.ipv6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 3 hrs to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1836..1836

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

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

func f1(c C) {
    assert(c.x == c.A.x)
    assert(c.y == c.A.y)
    assert(&c.x == &c.A.x)
    assert(&c.y == &c.A.y)
go_agent/src/code.google.com/p/go.tools/ssa/interp/testdata/fieldprom.go on lines 48..63

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

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

func f2(c *C) {
    assert(c.x == c.A.x)
    assert(c.y == c.A.y)
    assert(&c.x == &c.A.x)
    assert(&c.y == &c.A.y)
go_agent/src/code.google.com/p/go.tools/ssa/interp/testdata/fieldprom.go on lines 31..46

Duplicated Code

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

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

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

Tuning

This issue has a mass of 243.

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_data_type("vim.vm.VRMPolicyInfo", "VRMPolicyInfo", "vmodl.DynamicData", "vim.version.cvp", [["replicationRequestTime", "int", "vim.version.cvp", {:optional => true}], ["requestedReplicationCanBeDeferred", "boolean", "vim.version.cvp", {:optional => true}], ["targetReplicationFrequency", "int", "vim.version.cvp", {:optional => true}], ["userAllowedToDeferReplication", "boolean", "vim.version.cvp", {:optional => true}], ["disksReplicated", "vim.vm.VRMPolicyInfo.DisksReplicated", "vim.version.cvp", {:optional => true}], ["revoked", "boolean", "vim.version.cvp", {:optional => true}], ["policyCacheLifetime", "int", "vim.version.cvp", {:optional => true}], ["expireTime", "long", "vim.version.cvp", {:optional => true}], ["updateCacheExpireTime", "boolean", "vim.version.cvp", {:optional => true}], ["destroyOnInvalidSession", "boolean", "vim.version.cvp", {:optional => true}], ["destroyOnCheckin", "boolean", "vim.version.cvp", {:optional => true}], ["usbDefaultAccess", "boolean", "vim.version.cvp", {:optional => true}], ["usbAllowedFamilies", "int", "vim.version.cvp", {:optional => true}], ["usbBlockedFamilies", "int", "vim.version.cvp", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 2 hrs to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2394..2394

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

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_data_type("vim.DistributedVirtualSwitch.ConfigSpec", "DVSConfigSpec", "vmodl.DynamicData", "vim.version.version5", [["configVersion", "string", "vim.version.version5", {:optional => true}], ["name", "string", "vim.version.version5", {:optional => true}], ["numStandalonePorts", "int", "vim.version.version5", {:optional => true}], ["maxPorts", "int", "vim.version.version5", {:optional => true}], ["uplinkPortPolicy", "vim.DistributedVirtualSwitch.UplinkPortPolicy", "vim.version.version5", {:optional => true}], ["uplinkPortgroup", "vim.dvs.DistributedVirtualPortgroup[]", "vim.version.version5", {:optional => true}], ["defaultPortConfig", "vim.dvs.DistributedVirtualPort.Setting", "vim.version.version5", {:optional => true}], ["host", "vim.dvs.HostMember.ConfigSpec[]", "vim.version.version5", {:optional => true}], ["extensionKey", "string", "vim.version.version5", {:optional => true}], ["description", "string", "vim.version.version5", {:optional => true}], ["policy", "vim.DistributedVirtualSwitch.SwitchPolicy", "vim.version.version5", {:optional => true}], ["vendorSpecificConfig", "vim.dvs.KeyedOpaqueBlob[]", "vim.version.version5", {:optional => true}], ["contact", "vim.DistributedVirtualSwitch.ContactInfo", "vim.version.version5", {:optional => true}], ["switchIpAddress", "string", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 2 hrs to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1627..1627

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

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

    case token.REM:
        switch x.(type) {
        case int:
            return x.(int) % y.(int)
        case int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 4 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 476..500
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 502..526
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 528..552
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 554..578

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

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

package main

// Tests of call-graph queries, -format=json.
// See go.tools/oracle/oracle_test.go for explanation.
// See callgraph-json.golden for expected query results.
go_agent/src/code.google.com/p/go.tools/oracle/testdata/src/main/callgraph.go on lines 1..54

Duplicated Code

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

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

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

Tuning

This issue has a mass of 227.

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

    case token.AND:
        switch x.(type) {
        case int:
            return x.(int) & y.(int)
        case int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 4 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 450..474
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 502..526
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 528..552
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 554..578

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

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

    case token.AND_NOT:
        switch x.(type) {
        case int:
            return x.(int) &^ y.(int)
        case int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 4 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 450..474
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 476..500
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 502..526
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 528..552

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

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

package main

// Tests of call-graph queries.
// See go.tools/oracle/oracle_test.go for explanation.
// See callgraph.golden for expected query results.
go_agent/src/code.google.com/p/go.tools/oracle/testdata/src/main/callgraph-json.go on lines 1..54

Duplicated Code

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

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

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

Tuning

This issue has a mass of 227.

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

    case token.OR:
        switch x.(type) {
        case int:
            return x.(int) | y.(int)
        case int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 4 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 450..474
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 476..500
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 528..552
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 554..578

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

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

    case token.XOR:
        switch x.(type) {
        case int:
            return x.(int) ^ y.(int)
        case int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 4 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 450..474
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 476..500
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 502..526
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 554..578

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

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

            case int64: // signed integer -> numeric?
                switch kind {
                case types.Int:
                    return int(x)
                case types.Int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 2 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 1309..1337
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 1339..1367

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

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

            case float64: // floating point -> numeric?
                switch kind {
                case types.Int:
                    return int(x)
                case types.Int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 2 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 1279..1307
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 1309..1337

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

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

            case uint64: // unsigned integer -> numeric?
                switch kind {
                case types.Int:
                    return int(x)
                case types.Int8:
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go and 2 other locations - About 2 hrs to fix
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 1279..1307
go_agent/src/code.google.com/p/go.tools/ssa/interp/ops.go on lines 1339..1367

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

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_uri(uri)
        client = HTTPClient.new
        client.send_timeout = HTTP_API_TIMEOUT
        client.receive_timeout = HTTP_API_TIMEOUT
        client.connect_timeout = HTTP_CONNECT_TIMEOUT
bosh_agent/lib/bosh_agent/infrastructure/openstack/registry.rb on lines 198..217

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

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_uri(uri)
        client = HTTPClient.new
        client.send_timeout = HTTP_API_TIMEOUT
        client.receive_timeout = HTTP_API_TIMEOUT
        client.connect_timeout = HTTP_CONNECT_TIMEOUT
bosh_agent/lib/bosh_agent/infrastructure/cloudstack/registry.rb on lines 192..211

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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_data_type("vim.profile.host.HostApplyProfile", "HostApplyProfile", "vim.profile.ApplyProfile", "vim.version.version5", [["memory", "vim.profile.host.HostMemoryProfile", "vim.version.version5", {:optional => true}], ["storage", "vim.profile.host.StorageProfile", "vim.version.version5", {:optional => true}], ["network", "vim.profile.host.NetworkProfile", "vim.version.version5", {:optional => true}], ["datetime", "vim.profile.host.DateTimeProfile", "vim.version.version5", {:optional => true}], ["firewall", "vim.profile.host.FirewallProfile", "vim.version.version5", {:optional => true}], ["security", "vim.profile.host.SecurityProfile", "vim.version.version5", {:optional => true}], ["service", "vim.profile.host.ServiceProfile[]", "vim.version.version5", {:optional => true}], ["option", "vim.profile.host.OptionProfile[]", "vim.version.version5", {:optional => true}], ["userAccount", "vim.profile.host.UserProfile[]", "vim.version.version5", {:optional => true}], ["usergroupAccount", "vim.profile.host.UserGroupProfile[]", "vim.version.version5", {:optional => true}], ["authentication", "vim.profile.host.AuthenticationProfile", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 5 other locations - About 2 hrs to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 422..422
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 953..953
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1176..1176
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1450..1450
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1892..1892

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

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_data_type("vim.cluster.DasConfigInfo", "ClusterDasConfigInfo", "vmodl.DynamicData", "vim.version.version1", [["enabled", "boolean", "vim.version.version1", {:optional => true}], ["vmMonitoring", "string", "vim.version.version5", {:optional => true}], ["hostMonitoring", "string", "vim.version.version5", {:optional => true}], ["vmComponentProtecting", "string", "vim.version.vcp", {:optional => true}], ["failoverLevel", "int", "vim.version.version1", {:optional => true}], ["admissionControlPolicy", "vim.cluster.DasAdmissionControlPolicy", "vim.version.version5", {:optional => true}], ["admissionControlEnabled", "boolean", "vim.version.version1", {:optional => true}], ["defaultVmSettings", "vim.cluster.DasVmSettings", "vim.version.version2", {:optional => true}], ["option", "vim.option.OptionValue[]", "vim.version.version1", {:optional => true}], ["heartbeatDatastore", "vim.Datastore[]", "vim.version.version7", {:optional => true}], ["hBDatastoreCandidatePolicy", "string", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 5 other locations - About 2 hrs to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 953..953
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1176..1176
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1437..1437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1450..1450
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1892..1892

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

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_data_type("vim.event.EventFilterSpec", "EventFilterSpec", "vmodl.DynamicData", "vim.version.version1", [["entity", "vim.event.EventFilterSpec.ByEntity", "vim.version.version1", {:optional => true}], ["time", "vim.event.EventFilterSpec.ByTime", "vim.version.version1", {:optional => true}], ["userName", "vim.event.EventFilterSpec.ByUsername", "vim.version.version1", {:optional => true}], ["eventChainId", "int", "vim.version.version1", {:optional => true}], ["alarm", "vim.alarm.Alarm", "vim.version.version1", {:optional => true}], ["scheduledTask", "vim.scheduler.ScheduledTask", "vim.version.version1", {:optional => true}], ["disableFullMessage", "boolean", "vim.version.version1", {:optional => true}], ["category", "string[]", "vim.version.version1", {:optional => true}], ["type", "vmodl.TypeName[]", "vim.version.version1", {:optional => true}], ["tag", "string[]", "vim.version.version5", {:optional => true}], ["eventTypeId", "string[]", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 5 other locations - About 2 hrs to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 422..422
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1176..1176
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1437..1437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1450..1450
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1892..1892

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

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