CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

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

    @Test
    public void testCreateCommandThrowsInvalidTimeoutException() {
        LocalPingInputs localPingInputs = new LocalPingInputs.LocalPingInputsBuilder()
                .targetHost("10.0.0.1")
                .timeout("invalid")
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 77..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 90..101
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 103..114
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 103..114
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 116..127
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 70..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 83..94
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 96..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testCreateCommandThrowsInvalidPacketSizeException() {
        LocalPingInputs localPingInputs = new LocalPingInputs.LocalPingInputsBuilder()
                .targetHost("10.0.0.1")
                .packetSize("invalid")
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 77..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 90..101
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 90..101
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 103..114
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 116..127
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 70..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 83..94
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 96..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    private Map<String, String> initializeSuccessResult() {
        final Map<String, String> result = new HashMap<>();
        result.put(RETURN_RESULT, RETURNED_RESULT);
        result.put(RETURN_CODE, ZERO);
        result.put(STATUS_CODE, SUCCESS_CODE);
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 39..45
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 28..34
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 36..42
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 59..65
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 67..73
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 23..29
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 31..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    private Map<String, String> initializeSuccessResult() {
        final Map<String, String> result = new HashMap<>();
        result.put(RETURN_RESULT, RETURNED_RESULT);
        result.put(RETURN_CODE, ZERO);
        result.put(STATUS_CODE, SUCCESS_CODE);
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 31..37
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 39..45
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 36..42
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 59..65
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 67..73
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 23..29
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 31..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    private Map<String, String> initializeFailureResult() {
        final Map<String, String> result = new HashMap<>();
        result.put(RETURN_RESULT, RETURNED_RESULT);
        result.put(RETURN_CODE, FAILURE_RETURN_CODE);
        result.put(STATUS_CODE, FAILURE_CODE);
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 31..37
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 39..45
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 28..34
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 36..42
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 59..65
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 67..73
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 23..29

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    private Map<String, String> initializeFailureResult() {
        final Map<String, String> result = new HashMap<>();
        result.put(RETURN_RESULT, RETURNED_RESULT);
        result.put(RETURN_CODE, FAILURE_RETURN_CODE);
        result.put(STATUS_CODE, FAILURE_CODE);
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 31..37
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 28..34
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 36..42
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 59..65
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 67..73
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 23..29
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 31..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    private Map<String, String> initializeFailureResult() {
        final Map<String, String> result = new HashMap<>();
        result.put(RETURN_RESULT, RETURNED_RESULT);
        result.put(RETURN_CODE, FAILURE_RETURN_CODE);
        result.put(STATUS_CODE, FAILURE_CODE);
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 31..37
cs-hashicorp-terraform/src/test/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtilsTest.java on lines 39..45
cs-nutanix-prism/src/test/java/io/cloudslang/content/nutanix/prism/utils/HttpUtilsTest.java on lines 28..34
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 59..65
cs-office-365/src/test/java/io/cloudslang/content/office365/utils/HttpUtilsTest.java on lines 67..73
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 23..29
cs-oracle-cloud/src/test/java/io/cloudslang/content/oracle/oci/utils/HttpUtilsTest.java on lines 31..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testCreateCommandThrowsInvalidTimeoutException() {
        LocalPingInputs localPingInputs = new LocalPingInputs.LocalPingInputsBuilder()
                .targetHost("10.0.0.1")
                .timeout("invalid")
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 77..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 90..101
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/LinuxPingCommandTest.java on lines 103..114
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 90..101
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 103..114
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/SunOsPingCommandTest.java on lines 116..127
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 83..94
cs-utilities/src/test/java/io/cloudslang/content/utilities/services/localping/WindowsPingCommandTest.java on lines 96..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void validate_connectionsMaxPerRouteIsNegative_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();
        when(abbyyRequestMock.getConnectionsMaxPerRoute()).thenReturn(-1);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 116..125
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 128..137
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 152..161
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 50..59
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 67..76

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void validate_placeholdersCountIsNegative_ValidationException() {
        //Arrange
        ProcessTextFieldInput request = mockAbbyyRequest();
        when(request.getPlaceholdersCount()).thenReturn(-1);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 116..125
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 128..137
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 140..149
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 152..161
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 50..59

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void validate_socketTimeoutIsNegative_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();
        when(abbyyRequestMock.getSocketTimeout()).thenReturn(-1);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 116..125
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 140..149
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 152..161
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 50..59
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 67..76

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void validate_connectTimeoutIsNegative_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();
        when(abbyyRequestMock.getConnectTimeout()).thenReturn(-1);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 128..137
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 140..149
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 152..161
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 50..59
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 67..76

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void parseShort_valueIsNaN_IllegalArgumentException() {
        //Arrange
        final String value = "not a number";

cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 132..145
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 175..188
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 191..204
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 207..220

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

/*
 * Copyright 2021-2024 Open Text
 * This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
cs-alibaba/src/main/java/io/cloudslang/content/alibaba/utils/constants/ExceptionMessages.java on lines 1..28
cs-alibaba/src/main/java/io/cloudslang/content/alibaba/utils/constants/SuccessMessages.java on lines 1..28
cs-commons/src/main/java/io/cloudslang/content/constants/ExceptionValues.java on lines 1..32
cs-vmware/src/main/java/io/cloudslang/content/vmware/constants/Outputs.java on lines 1..36

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void parseBoolean_valueIsWrongCaseTrue_IllegalArgumentException() {
        //Arrange
        final String value = "True";

cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 89..102
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 132..145
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 175..188
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 207..220

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testDescribeTagsWithMaxResultsLessThanAccepted() throws Exception {
        MockingHelper.setExpectedExceptions(exception, RuntimeException.class, "Incorrect provided value: 4 input. The value doesn't meet conditions for general purpose usage.");

        final FilterInputs filterInputs = new FilterInputs.Builder()
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 454..463
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 465..474
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 476..485
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 487..496

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testSimpleStringArray() throws Exception {
        String array1 = "[\"one\",\"two\",\"three\"]";
        String array2 = "[\"one\",\"two\",\"three\"]";
        final Map<String, String> returnResult = mergeArrays.execute(array1, array2);
cs-json/src/test/java/io/cloudslang/content/json/actions/GetValueFromObjectTest.java on lines 196..202
cs-json/src/test/java/io/cloudslang/content/json/actions/GetValueFromObjectTest.java on lines 204..210
cs-json/src/test/java/io/cloudslang/content/json/actions/MergeArraysTest.java on lines 37..43
cs-json/src/test/java/io/cloudslang/content/json/actions/MergeArraysTest.java on lines 45..51

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void validate_responseHasNegativeNrOfCredits_ValidationException() {
        //Arrange
        final AbbyyResponse response = mockAbbyyResponse();
        when(response.getCredits()).thenReturn(-1);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 116..125
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 128..137
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 140..149
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 152..161
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 67..76

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void validate_connectionsMaxTotalIsNegative_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();
        when(abbyyRequestMock.getConnectionsMaxTotal()).thenReturn(-1);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 116..125
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 128..137
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 140..149
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 50..59
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 67..76

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testSimpleIntegerArray() throws Exception {
        String array1 = "[1,2,3]";
        String array2 = "[1,2,3]";
        final Map<String, String> returnResult = mergeArrays.execute(array1, array2);
cs-json/src/test/java/io/cloudslang/content/json/actions/GetValueFromObjectTest.java on lines 196..202
cs-json/src/test/java/io/cloudslang/content/json/actions/GetValueFromObjectTest.java on lines 204..210
cs-json/src/test/java/io/cloudslang/content/json/actions/MergeArraysTest.java on lines 37..43
cs-json/src/test/java/io/cloudslang/content/json/actions/MergeArraysTest.java on lines 53..59

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language