CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

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

    private static final String WINDOWS_COMMAND_OUTPUT = "Pinging OuzoCSA490.hpswlabs.adapps.hp.com [10.0.0.1] with 32 bytes of data:\n" +
            "Reply from 10.0.0.1: bytes=32 time=185ms TTL=122\n" +
            "Reply from 10.0.0.1: bytes=32 time=186ms TTL=122\n" +
            "Reply from 10.0.0.1: bytes=32 time=185ms TTL=122\n" +
            "Reply from 10.0.0.1: bytes=32 time=186ms TTL=122\n" +
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/Descriptions.java on lines 55..64
cs-cyberark/src/main/java/io/cloudslang/content/cyberark/utils/Constants.java on lines 58..67
cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/Descriptions.java on lines 46..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/Descriptions.java on lines 188..197
cs-openshift/src/main/java/io/cloudslang/content/redhat/utils/Descriptions.java on lines 25..34
cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/Descriptions.java on lines 62..71
cs-utilities/src/test/java/io/cloudslang/content/utilities/util/CommandOutputParserTest.java on lines 37..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 42.

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

        public static final String ALLOWED_CIPHERS_DESC = "A list of ciphers to use. The value of this input will be ignored " +
                "if 'tlsVersion' does " +
                "not contain 'TLSv1.2'. This capability is provided “as is”, please see product documentation for further security considerations." +
                "In order to connect successfully to the target host, it should accept at least one of the following ciphers. If this is not the case, it is " +
                "the user's responsibility to configure the host accordingly or to update the list of allowed ciphers. \n" +
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/Descriptions.java on lines 55..64
cs-cyberark/src/main/java/io/cloudslang/content/cyberark/utils/Constants.java on lines 58..67
cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/Descriptions.java on lines 46..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/Descriptions.java on lines 188..197
cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/Descriptions.java on lines 62..71
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 41..50
cs-utilities/src/test/java/io/cloudslang/content/utilities/util/CommandOutputParserTest.java on lines 37..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 42.

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

        public static final String ALLOWED_CIPHERS_DESC = "A list of ciphers to use. The value of this input will be ignored " +
                "if 'tlsVersion' does\n" +
                "not contain 'TLSv1.2'. This capability is provided “as is”, please see product documentation for further security considerations." +
                "In order to connect successfully to the target host, it should accept at least one of the following ciphers. If this is not the case, it is\n" +
                "the user's responsibility to configure the host accordingly or to update the list of allowed ciphers. \n" +
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/Descriptions.java on lines 55..64
cs-cyberark/src/main/java/io/cloudslang/content/cyberark/utils/Constants.java on lines 58..67
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/Descriptions.java on lines 188..197
cs-openshift/src/main/java/io/cloudslang/content/redhat/utils/Descriptions.java on lines 25..34
cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/Descriptions.java on lines 62..71
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 41..50
cs-utilities/src/test/java/io/cloudslang/content/utilities/util/CommandOutputParserTest.java on lines 37..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 42.

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

        public static final String DELETE_VM_OPERATION_DESC = "Deletes a virtual machine." +
                "This is an idempotent operation. If the virtual machine is currently powered on, it will be " +
                "forcefully powered off." +
                "The logical timestamp can optionally be provided for consistency. If a logical timestamp is " +
                "specified, then this operation will be rejected if the logical timestamp specified is not the value" +
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/Descriptions.java on lines 55..64
cs-cyberark/src/main/java/io/cloudslang/content/cyberark/utils/Constants.java on lines 58..67
cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/Descriptions.java on lines 46..55
cs-openshift/src/main/java/io/cloudslang/content/redhat/utils/Descriptions.java on lines 25..34
cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/Descriptions.java on lines 62..71
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 41..50
cs-utilities/src/test/java/io/cloudslang/content/utilities/util/CommandOutputParserTest.java on lines 37..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 42.

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

        public static final String X_509_DESC = "Specifies the way the server hostname must match a domain name in the subject's Common" +
                "Name (CN) or subjectAltName field of the X.509 certificate. Set this to 'allow_all' to skip any checking, but you become " +
                "vulnerable to attacks. For the value 'browser_compatible' the hostname verifier works the same way as Curl" +
                "and Firefox. The hostname must match either the first CN, or any of the subject-alts. A wildcard can occur in the CN, and " +
                "in any of the subject-alts. The only difference between 'browser_compatible' and 'strict' is that a wildcard (such as " +
cs-cyberark/src/main/java/io/cloudslang/content/cyberark/utils/Constants.java on lines 58..67
cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/Descriptions.java on lines 46..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/Descriptions.java on lines 188..197
cs-openshift/src/main/java/io/cloudslang/content/redhat/utils/Descriptions.java on lines 25..34
cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/Descriptions.java on lines 62..71
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 41..50
cs-utilities/src/test/java/io/cloudslang/content/utilities/util/CommandOutputParserTest.java on lines 37..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 42.

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

    private static final String SUN_OS_COMMAND_OUTPUT = "PING xyz: 56 data bytes\n" +
            "64 bytes from xyz (4::390:a00:2018:ab3d:7jks): icmp_seq=0. time=0.479 ms\n" +
            "64 bytes from xyz (4::390:a00:2018:ab3d:7jks): icmp_seq=1. time=0.843 ms\n" +
            "64 bytes from xyz (4::390:a00:2018:ab3d:7jks): icmp_seq=2. time=0.516 ms\n" +
            "64 bytes from xyz (4::390:a00:2018:ab3d:7jks): icmp_seq=3. time=4.943 ms\n" +
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/Descriptions.java on lines 55..64
cs-cyberark/src/main/java/io/cloudslang/content/cyberark/utils/Constants.java on lines 58..67
cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/Descriptions.java on lines 46..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/Descriptions.java on lines 188..197
cs-openshift/src/main/java/io/cloudslang/content/redhat/utils/Descriptions.java on lines 25..34
cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/Descriptions.java on lines 62..71
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 41..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 42.

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

                if (isFlashModeEnabledArray[0] != "" && (isCDROMArray.length == isFlashModeEnabledArray.length))
                    vmDisks.setFlash_mode_enabled(Boolean.parseBoolean(isFlashModeEnabledArray[i]));
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 100..101
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 135..136
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 137..138
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 139..140

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

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

                if (isEmptyDiskArray[0] != "" && (isCDROMArray.length == isEmptyDiskArray.length))
                    vmDisks.setIs_empty(Boolean.parseBoolean(isEmptyDiskArray[i]));
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 100..101
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 137..138
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 139..140
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 141..142

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

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

        if (!StringUtils.isEmpty(deployInputs.getDatastore())) {
            Datastore datastoreService = stubFactory.createStub(Datastore.class, stubConfig);
            deployInputs.setDatastore(getDatastoreIdByName(datastoreService, deployInputs.getDatastore()));
        }
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 130..133
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 134..137
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 142..145
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 146..149

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

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

        if (!StringUtils.isEmpty(deployInputs.getVmFolder())) {
            Folder folderService = stubFactory.createStub(Folder.class, stubConfig);
            deployInputs.setVmFolder(getFolderIdByName(folderService, deployInputs.getVmFolder()));
        }
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 134..137
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 138..141
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 142..145
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 146..149

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

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

        if (!StringUtils.isEmpty(deployInputs.getVmResourcePool())) {
            ResourcePool resourcePoolService = stubFactory.createStub(ResourcePool.class, stubConfig);
            deployInputs.setVmResourcePool(getResourcePoolIdByName(resourcePoolService, deployInputs.getVmResourcePool()));
        }
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 130..133
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 134..137
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 138..141
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 146..149

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

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

                    if (deviceIndexArray[0] != "" && (isCDROMArray.length == deviceIndexArray.length))
                        diskAddress.setDevice_index(Integer.parseInt(deviceIndexArray[i]));
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 135..136
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 137..138
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 139..140
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 141..142

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

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

        if (!StringUtils.isEmpty(deployInputs.getHostSystem())) {
            Host hostService = stubFactory.createStub(Host.class, stubConfig);
            deployInputs.setHostSystem(getHostIdByName(hostService, deployInputs.getHostSystem()));
        }
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 130..133
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 134..137
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 138..141
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 142..145

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

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

                if (isSCSIPassThroughArray[0] != "" && (isCDROMArray.length == isSCSIPassThroughArray.length))
                    vmDisks.setIs_scsi_pass_through(Boolean.parseBoolean(isSCSIPassThroughArray[i]));
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 100..101
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 135..136
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 139..140
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 141..142

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

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

                if (isThinProvisionedArray[0] != "" && (isCDROMArray.length == isThinProvisionedArray.length))
                    vmDisks.setIs_thin_provisioned(Boolean.parseBoolean(isThinProvisionedArray[i]));
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 100..101
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 135..136
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 137..138
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/services/DiskImpl.java on lines 141..142

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

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

        if (!StringUtils.isEmpty(deployInputs.getCluster())) {
            Cluster clusterService = stubFactory.createStub(Cluster.class, stubConfig);
            deployInputs.setCluster(getClusterIdByName(clusterService, deployInputs.getCluster()));
        }
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 130..133
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 138..141
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 142..145
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/Utils.java on lines 146..149

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

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

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

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

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

Refactorings

Further Reading

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

        inputBuilder.hostname(SMTP_HOSTANME)
                .port(PORT)
                .from(FROM)
                .to(TO + DEFAULT_DELIMITER + TO2)
                .cc(CC)
cs-mail/src/test/java/io/cloudslang/content/mail/services/SendMailServiceTest.java on lines 461..468

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

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

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

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

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

Refactorings

Further Reading

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

                        if (part != null && part.getFileName() != null &&
                                (MimeUtility.decodeText(part.getFileName()).equalsIgnoreCase(attachment) ||
                                        part.getFileName().equalsIgnoreCase(attachment))
cs-mail/src/main/java/io/cloudslang/content/mail/services/GetMailAttachmentService.java on lines 114..116

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

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

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

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

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

Refactorings

Further Reading

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

        if (statusCode.equals(401)) {
            results.put(RETURN_RESULT, inputName + " not found, or user unauthorized to perform action");
            results.put(EXCEPTION, "status : " + statusCode + ", Title :  " + inputName + " not found, or user unauthorized to perform action");
        } else if (statusCode.equals(500)) {
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/HttpUtils.java on lines 221..224

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

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

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

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

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

Refactorings

Further Reading

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

        if (this.getLanguages() != null && !this.getLanguages().isEmpty()) {
            urlBuilder.addParameter(QueryParams.LANGUAGE, StringUtils.join(this.getLanguages(), ','));
        }
cs-abbyy/src/main/java/io/cloudslang/content/abbyy/entities/inputs/ProcessImageInput.java on lines 147..149
cs-abbyy/src/main/java/io/cloudslang/content/abbyy/entities/inputs/ProcessImageInput.java on lines 163..165
cs-abbyy/src/main/java/io/cloudslang/content/abbyy/entities/inputs/ProcessTextFieldInput.java on lines 138..140

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

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