cloudfoundry-community/bosh-cloudstack-cpi

View on GitHub

Showing 548 of 1,705 total issues

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

    create_data_type("vim.fault.VmWwnConflict", "VmWwnConflict", "vim.fault.InvalidVmConfig", "vim.version.version2", [["vm", "vim.VirtualMachine", "vim.version.version2", {:optional => true}], ["host", "vim.HostSystem", "vim.version.version2", {:optional => true}], ["name", "string", "vim.version.version2", {:optional => true}], ["wwn", "long", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.vApp.VAppConfigSpec", "VAppConfigSpec", "vim.vApp.VmConfigSpec", "vim.version.version5", [["entityConfig", "vim.vApp.EntityConfigInfo[]", "vim.version.version5", {:optional => true}], ["annotation", "string", "vim.version.version5", {:optional => true}], ["instanceUuid", "string", "vim.version.version6", {:optional => true}], ["managedBy", "vim.ext.ManagedByInfo", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260

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

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 NewUbuntuNetManager(
    fs boshsys.FileSystem,
    cmdRunner boshsys.CmdRunner,
    defaultNetworkResolver DefaultNetworkResolver,
    ipResolver boship.IPResolver,
Severity: Minor
Found in go_agent/src/bosh/platform/net/ubuntu_net_manager.go and 1 other location - About 35 mins to fix
go_agent/src/bosh/platform/net/centos_net_manager.go on lines 30..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 103.

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 NewCentosNetManager(
    fs boshsys.FileSystem,
    cmdRunner boshsys.CmdRunner,
    defaultNetworkResolver DefaultNetworkResolver,
    ipResolver boship.IPResolver,
Severity: Minor
Found in go_agent/src/bosh/platform/net/centos_net_manager.go and 1 other location - About 35 mins to fix
go_agent/src/bosh/platform/net/ubuntu_net_manager.go on lines 34..50

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

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

    create_data_type("vim.host.NetworkPolicy", "HostNetworkPolicy", "vmodl.DynamicData", "vim.version.version1", [["security", "vim.host.NetworkPolicy.SecurityPolicy", "vim.version.version1", {:optional => true}], ["nicTeaming", "vim.host.NetworkPolicy.NicTeamingPolicy", "vim.version.version1", {:optional => true}], ["offloadPolicy", "vim.host.NetOffloadCapabilities", "vim.version.version1", {:optional => true}], ["shapingPolicy", "vim.host.NetworkPolicy.TrafficShapingPolicy", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.ext.ExtendedProductInfo", "ExtExtendedProductInfo", "vmodl.DynamicData", "vim.version.version7", [["companyUrl", "string", "vim.version.version7", {:optional => true}], ["productUrl", "string", "vim.version.version7", {:optional => true}], ["managementUrl", "string", "vim.version.version7", {:optional => true}], ["self", "vim.ManagedEntity", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.event.HostWwnChangedEvent", "HostWwnChangedEvent", "vim.event.HostEvent", "vim.version.version2", [["oldNodeWwns", "long[]", "vim.version.version2", {:optional => true}], ["oldPortWwns", "long[]", "vim.version.version2", {:optional => true}], ["newNodeWwns", "long[]", "vim.version.version2", {:optional => true}], ["newPortWwns", "long[]", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.host.DatastoreBrowser.VmDiskQuery.Filter", "VmDiskFileQueryFilter", "vmodl.DynamicData", "vim.version.version1", [["diskType", "vmodl.TypeName[]", "vim.version.version1", {:optional => true}], ["matchHardwareVersion", "int[]", "vim.version.version1", {:optional => true}], ["controllerType", "vmodl.TypeName[]", "vim.version.version2", {:optional => true}], ["thin", "boolean", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.vm.FileInfo", "VirtualMachineFileInfo", "vmodl.DynamicData", "vim.version.version1", [["vmPathName", "string", "vim.version.version1", {:optional => true}], ["snapshotDirectory", "string", "vim.version.version1", {:optional => true}], ["suspendDirectory", "string", "vim.version.version1", {:optional => true}], ["logDirectory", "string", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.scheduler.WeeklyTaskScheduler", "WeeklyTaskScheduler", "vim.scheduler.DailyTaskScheduler", "vim.version.version1", [["sunday", "boolean", "vim.version.version1"], ["monday", "boolean", "vim.version.version1"], ["tuesday", "boolean", "vim.version.version1"], ["wednesday", "boolean", "vim.version.version1"], ["thursday", "boolean", "vim.version.version1"], ["friday", "boolean", "vim.version.version1"], ["saturday", "boolean", "vim.version.version1"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 4 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 488..488
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1024..1024
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1252..1252
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2356..2356

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

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

    create_data_type("vim.OvfManager.CreateImportSpecResult", "OvfCreateImportSpecResult", "vmodl.DynamicData", "vim.version.version5", [["importSpec", "vim.ImportSpec", "vim.version.version5", {:optional => true}], ["fileItem", "vim.OvfManager.FileItem[]", "vim.version.version5", {:optional => true}], ["warning", "vmodl.MethodFault[]", "vim.version.version5", {:optional => true}], ["error", "vmodl.MethodFault[]", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.cluster.DpmConfigInfo", "ClusterDpmConfigInfo", "vmodl.DynamicData", "vim.version.version2", [["enabled", "boolean", "vim.version.version2", {:optional => true}], ["defaultDpmBehavior", "vim.cluster.DpmConfigInfo.DpmBehavior", "vim.version.version2", {:optional => true}], ["hostPowerActionRate", "int", "vim.version.version5", {:optional => true}], ["option", "vim.option.OptionValue[]", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.host.PhysicalNic.CdpDeviceCapability", "PhysicalNicCdpDeviceCapability", "vmodl.DynamicData", "vim.version.version2", [["router", "boolean", "vim.version.version2"], ["transparentBridge", "boolean", "vim.version.version2"], ["sourceRouteBridge", "boolean", "vim.version.version2"], ["networkSwitch", "boolean", "vim.version.version2"], ["host", "boolean", "vim.version.version2"], ["igmpEnabled", "boolean", "vim.version.version2"], ["repeater", "boolean", "vim.version.version2"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 4 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 488..488
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1024..1024
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1495..1495
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2356..2356

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

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

    create_data_type("vim.vm.device.VirtualSCSIControllerOption", "VirtualSCSIControllerOption", "vim.vm.device.VirtualControllerOption", "vim.version.version1", [["numSCSIDisks", "vim.option.IntOption", "vim.version.version1"], ["numSCSICdroms", "vim.option.IntOption", "vim.version.version1"], ["numSCSIPassthrough", "vim.option.IntOption", "vim.version.version1"], ["sharing", "vim.vm.device.VirtualSCSIController.Sharing[]", "vim.version.version1"], ["defaultSharedIndex", "int", "vim.version.version1"], ["hotAddRemove", "vim.option.BoolOption", "vim.version.version1"], ["scsiCtlrUnitNumber", "int", "vim.version.version1"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 4 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 488..488
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1024..1024
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1252..1252
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1495..1495

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

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

    create_data_type("vim.host.DiskPartitionInfo.Specification", "HostDiskPartitionSpec", "vmodl.DynamicData", "vim.version.version1", [["partitionFormat", "string", "vim.version.version7", {:optional => true}], ["chs", "vim.host.DiskDimensions.Chs", "vim.version.version1", {:optional => true}], ["totalSectors", "long", "vim.version.version1", {:optional => true}], ["partition", "vim.host.DiskPartitionInfo.Partition[]", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.vm.GuestInfo.StackInfo", "GuestStackInfo", "vmodl.DynamicData", "vim.version.version6", [["dnsConfig", "vim.net.DnsConfigInfo", "vim.version.version6", {:optional => true}], ["ipRouteConfig", "vim.net.IpRouteConfigInfo", "vim.version.version6", {:optional => true}], ["ipStackConfig", "vim.KeyValue[]", "vim.version.version6", {:optional => true}], ["dhcpConfig", "vim.net.DhcpConfigInfo", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.vm.customization.Identification", "CustomizationIdentification", "vmodl.DynamicData", "vim.version.version1", [["joinWorkgroup", "string", "vim.version.version1", {:optional => true}], ["joinDomain", "string", "vim.version.version1", {:optional => true}], ["domainAdmin", "string", "vim.version.version1", {:optional => true}], ["domainAdminPassword", "vim.vm.customization.Password", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.NetworkBandwidthAllocationInfo", "NetworkBandwidthAllocationInfo", "vim.ResourceAllocationInfo", "vim.version.dev", [["distributedVirtualSwitch", "vim.DistributedVirtualSwitch", "vim.version.dev", {:optional => true}], ["distributedVirtualPort", "vim.dvs.DistributedVirtualPort", "vim.version.dev", {:optional => true}], ["inShapingPolicy", "vim.host.NetworkPolicy.TrafficShapingPolicy", "vim.version.dev", {:optional => true}], ["outShapingPolicy", "vim.host.NetworkPolicy.TrafficShapingPolicy", "vim.version.dev", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.StorageResourceManager.IORMConfigSpec", "StorageIORMConfigSpec", "vmodl.DynamicData", "vim.version.version6", [["enabled", "boolean", "vim.version.version6", {:optional => true}], ["congestionThreshold", "int", "vim.version.version6", {:optional => true}], ["statsCollectionEnabled", "boolean", "vim.version.version7", {:optional => true}], ["statsAggregationDisabled", "boolean", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1632..1632
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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

    create_data_type("vim.vm.check.Result", "CheckResult", "vmodl.DynamicData", "vim.version.version5", [["vm", "vim.VirtualMachine", "vim.version.version5", {:optional => true}], ["host", "vim.HostSystem", "vim.version.version5", {:optional => true}], ["warning", "vmodl.MethodFault[]", "vim.version.version5", {:optional => true}], ["error", "vmodl.MethodFault[]", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 28 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 302..302
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 304..304
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 362..362
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 412..412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 437..437
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 470..470
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 480..480
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 503..503
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 735..735
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 750..750
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 960..960
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1053..1053
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1090..1090
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1155..1155
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1173..1173
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1183..1183
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1220..1220
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1222..1222
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1522..1522
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1574..1574
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1596..1596
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1606..1606
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1656..1656
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1830..1830
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2215..2215
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2259..2259
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2260..2260
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2295..2295

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

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