cloudfoundry-community/bosh-cloudstack-cpi

View on GitHub

Showing 548 of 1,705 total issues

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

    create_data_type("vim.net.IpConfigInfo", "NetIpConfigInfo", "vmodl.DynamicData", "vim.version.version6", [["ipAddress", "vim.net.IpConfigInfo.IpAddress[]", "vim.version.version6", {:optional => true}], ["dhcp", "vim.net.DhcpConfigInfo", "vim.version.version6", {:optional => true}], ["autoConfigurationEnabled", "boolean", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.cluster.VmHostRuleInfo", "ClusterVmHostRuleInfo", "vim.cluster.RuleInfo", "vim.version.version6", [["vmGroupName", "string", "vim.version.version6", {:optional => true}], ["affineHostGroupName", "string", "vim.version.version6", {:optional => true}], ["antiAffineHostGroupName", "string", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.dvs.VmwareDistributedVirtualSwitch.SecurityPolicy", "DVSSecurityPolicy", "vim.InheritablePolicy", "vim.version.version5", [["allowPromiscuous", "vim.BoolPolicy", "vim.version.version5", {:optional => true}], ["macChanges", "vim.BoolPolicy", "vim.version.version5", {:optional => true}], ["forgedTransmits", "vim.BoolPolicy", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.vm.guest.FileManager.FileAttributes", "GuestFileAttributes", "vmodl.DynamicData", "vim.version.version7", [["modificationTime", "vmodl.DateTime", "vim.version.version7", {:optional => true}], ["accessTime", "vmodl.DateTime", "vim.version.version7", {:optional => true}], ["symlinkTarget", "string", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.vm.guest.FileManager.PosixFileAttributes", "GuestPosixFileAttributes", "vim.vm.guest.FileManager.FileAttributes", "vim.version.version7", [["ownerId", "int", "vim.version.version7", {:optional => true}], ["groupId", "int", "vim.version.version7", {:optional => true}], ["permissions", "long", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.fault.VmFaultToleranceConfigIssueWrapper", "VmFaultToleranceConfigIssueWrapper", "vim.fault.VmFaultToleranceIssue", "vim.version.version6", [["entityName", "string", "vim.version.version6", {:optional => true}], ["entity", "vim.ManagedEntity", "vim.version.version6", {:optional => true}], ["error", "vmodl.MethodFault", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.dvs.NetworkResourcePool.AllocationInfo", "DVSNetworkResourcePoolAllocationInfo", "vmodl.DynamicData", "vim.version.version6", [["limit", "long", "vim.version.version6", {:optional => true}], ["shares", "vim.SharesInfo", "vim.version.version6", {:optional => true}], ["priorityTag", "int", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.vm.PowerPolicy", "VirtualMachinePowerPolicy", "vmodl.DynamicData", "vim.version.cvp", [["powerMode", "string", "vim.version.cvp", {:optional => true}], ["acProfile", "vim.vm.PowerPolicy.Profile", "vim.version.cvp", {:optional => true}], ["batteryProfile", "vim.vm.PowerPolicy.Profile", "vim.version.cvp", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.vm.GuestInfo.DiskInfo", "GuestDiskInfo", "vmodl.DynamicData", "vim.version.version1", [["diskPath", "string", "vim.version.version1", {:optional => true}], ["capacity", "long", "vim.version.version1", {:optional => true}], ["freeSpace", "long", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.fault.InvalidProfileReferenceHost", "InvalidProfileReferenceHost", "vmodl.RuntimeFault", "vim.version.version7", [["reason", "string", "vim.version.version7", {:optional => true}], ["host", "vim.HostSystem", "vim.version.version7", {:optional => true}], ["profile", "vim.profile.Profile", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.host.DatastoreBrowser.SearchResults", "HostDatastoreBrowserSearchResults", "vmodl.DynamicData", "vim.version.version1", [["datastore", "vim.Datastore", "vim.version.version1", {:optional => true}], ["folderPath", "string", "vim.version.version1", {:optional => true}], ["file", "vim.host.DatastoreBrowser.FileInfo[]", "vim.version.version1", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.vm.guest.FileManager.WindowsFileAttributes", "GuestWindowsFileAttributes", "vim.vm.guest.FileManager.FileAttributes", "vim.version.version7", [["hidden", "boolean", "vim.version.version7", {:optional => true}], ["readOnly", "boolean", "vim.version.version7", {:optional => true}], ["createTime", "vmodl.DateTime", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.fault.VmFaultToleranceConfigIssue", "VmFaultToleranceConfigIssue", "vim.fault.VmFaultToleranceIssue", "vim.version.version5", [["reason", "string", "vim.version.version5", {:optional => true}], ["entityName", "string", "vim.version.version5", {:optional => true}], ["entity", "vim.ManagedEntity", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.vm.ScsiDiskDeviceInfo", "VirtualMachineScsiDiskDeviceInfo", "vim.vm.DiskDeviceInfo", "vim.version.version1", [["disk", "vim.host.ScsiDisk", "vim.version.version1", {:optional => true}], ["transportHint", "string", "vim.version.version5", {:optional => true}], ["lunNumber", "int", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.event.HostDVPortEvent", "HostDVPortEvent", "vim.event.HostEvent", "vim.version.dev", [["switchUuid", "string", "vim.version.dev", {:optional => true}], ["portKey", "string", "vim.version.dev", {:optional => true}], ["eventType", "string", "vim.version.dev", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.fault.DasConfigFault", "DasConfigFault", "vim.fault.VimFault", "vim.version.version1", [["reason", "string", "vim.version.version5", {:optional => true}], ["output", "string", "vim.version.version5", {:optional => true}], ["event", "vim.event.Event[]", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2429..2429
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    create_data_type("vim.dvs.VmwareDistributedVirtualSwitch.FeatureCapability", "VMwareDVSFeatureCapability", "vim.DistributedVirtualSwitch.FeatureCapability", "vim.version.version6", [["vspanSupported", "boolean", "vim.version.version7", {:optional => true}], ["lldpSupported", "boolean", "vim.version.version7", {:optional => true}], ["ipfixSupported", "boolean", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 36 other locations - About 20 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/missing_types.rb on lines 6..6
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 420..420
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 466..466
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 501..501
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 889..889
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 930..930
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 981..981
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1071..1071
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1130..1130
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1154..1154
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1218..1218
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1221..1221
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1361..1361
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1365..1365
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1412..1412
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1514..1514
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1559..1559
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1594..1594
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1607..1607
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1725..1725
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1801..1801
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1802..1802
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1803..1803
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1887..1887
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1923..1923
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2137..2137
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2208..2208
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2210..2210
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2234..2234
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2272..2272
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2313..2313
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2391..2391
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2430..2430
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2442..2442
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2454..2454
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2632..2632

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language