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

    @Test
    public void testWithBlankString() {
        final Map<String, String> result = d.execute("   ", "string", "  ");
        assertEquals(SUCCESS, result.get(RETURN_CODE));
        assertEquals("string", result.get(RETURN_RESULT));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 48..53
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 69..74
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 76..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 83..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 90..95
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 97..102
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 125..130

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

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

    @Test
    public void testWithEmptyString() {
        final Map<String, String> result = d.execute("", "string", "");
        assertEquals(SUCCESS, result.get(RETURN_CODE));
        assertEquals("string", result.get(RETURN_RESULT));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 41..46
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 69..74
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 76..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 83..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 90..95
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 97..102
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 125..130

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

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

    @Test
    public void testHavingInitialString() {
        final Map<String, String> result = d.execute("initialstr", "string", "");
        assertEquals(SUCCESS, result.get(RETURN_CODE));
        assertEquals("initialstr", result.get(RETURN_RESULT));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 41..46
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 48..53
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 76..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 83..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 90..95
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 97..102
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 125..130

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

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

    @Test
    public void validate_languagesIsNull_nullReturned() {
        //Arrange
        ProcessTextFieldInput request = mockAbbyyRequest();
        when(request.getLanguages()).thenReturn(null);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 56..65
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 164..173
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 215..226
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 62..71
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 94..103
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 118..127

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

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

    @Test
    public void validate_locationIdIsNull_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();
        when(abbyyRequestMock.getLocationId()).thenReturn(null);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 164..173
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 215..226
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 62..71
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 94..103
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 118..127
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 43..52

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

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

    @Test
    public void validate_textTypesIsNull_nullReturned() {
        //Arrange
        ProcessImageInput request = mockAbbyyRequest();
        when(request.getTextTypes()).thenReturn(null);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 56..65
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 164..173
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 215..226
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 62..71
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 94..103
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 43..52

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

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

    @After
    public void tearDown() throws Exception {
        connectionResourcesMock = null;
        morObjectHandlerMock = null;
        clusterMorMock = null;
cs-powershell/src/test/java/io/cloudslang/content/actions/PowerShellScriptActionTest.java on lines 99..106
cs-powershell/src/test/java/io/cloudslang/content/services/WSManRemoteShellServiceTest.java on lines 145..152

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

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

    @Test
    public void validate_sourceFileIsNull_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();
        when(abbyyRequestMock.getSourceFile()).thenReturn(null);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 56..65
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 164..173
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 62..71
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 94..103
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 118..127
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 43..52

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

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

    @Test
    public void testHavingInitialStringAndTrimFalse() {
        final Map<String, String> result = d.execute("initialstr", "string", "false");
        assertEquals(SUCCESS, result.get(RETURN_CODE));
        assertEquals("initialstr", result.get(RETURN_RESULT));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 41..46
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 48..53
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 69..74
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 76..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 83..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 90..95
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 125..130

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

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

    @Test
    public void validate_taskStatusIsNull_ValidationException() {
        //Arrange
        final AbbyyResponse response = mockAbbyyResponse();
        when(response.getTaskStatus()).thenReturn(null);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 56..65
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 164..173
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 215..226
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 94..103
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 118..127
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 43..52

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

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

    @Test
    public void testHavingTrimVariableInUpperCase() {
        final Map<String, String> result = d.execute("initialstr", "string", "  TRUE     ");
        assertEquals(SUCCESS, result.get(RETURN_CODE));
        assertEquals("initialstr", result.get(RETURN_RESULT));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 41..46
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 48..53
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 69..74
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 76..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 83..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 90..95
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 97..102

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

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

    @Test
    public void testHavingInitialStringAndTrimTrue() {
        final Map<String, String> result = d.execute("initialstr", "string", "true");
        assertEquals(SUCCESS, result.get(RETURN_CODE));
        assertEquals("initialstr", result.get(RETURN_RESULT));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 41..46
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 48..53
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 69..74
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 76..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 83..88
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 97..102
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 125..130

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

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

    @Test
    public void validate_languagesIsNull_nullReturned() {
        //Arrange
        ProcessImageInput request = mockAbbyyRequest();
        when(request.getLanguages()).thenReturn(null);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 56..65
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 164..173
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 215..226
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 62..71
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 118..127
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 43..52

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

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

    @Test
    public void testWithTrimFalse() {
        final Map<String, String> result = d.execute("", "string", "false");
        assertEquals(SUCCESS, result.get(RETURN_CODE));
        assertEquals("string", result.get(RETURN_RESULT));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 41..46
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 48..53
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 69..74
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 76..81
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 90..95
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 97..102
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 125..130

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

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 testSortLetters() {
        Map<String, String> result1 = new ListSortAction().sortList(LIST_STRING, ",", "false");
        assertEquals("success", result1.get("response"));
        assertEquals("a,b,g,s,z", result1.get("result"));
cs-lists/src/test/java/io/cloudslang/content/actions/ListItemGrabberActionTest.java on lines 31..36
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 32..37
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 46..51
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 53..58

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

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 testSortIntegers() {
        Map<String, String> result2 = new ListSortAction().sortList(LIST_INTEGER, ",", "true");
        assertEquals("success", result2.get("response"));
        assertEquals("10,8,6,5,1", result2.get("result"));
cs-lists/src/test/java/io/cloudslang/content/actions/ListItemGrabberActionTest.java on lines 31..36
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 32..37
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 39..44
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 53..58

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

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 testSortLettersReverse() {
        Map<String, String> result = new ListSortAction().sortList(LIST_STRING, ",", "true");
        assertEquals("success", result.get("response"));
        assertEquals("z,s,g,b,a", result.get("result"));
cs-lists/src/test/java/io/cloudslang/content/actions/ListItemGrabberActionTest.java on lines 31..36
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 39..44
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 46..51
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 53..58

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

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 testSortIntegersInvalidReverse() {
        Map<String, String> result2 = new ListSortAction().sortList(LIST_INTEGER, ",", "sdfsd");
        assertEquals("success", result2.get("response"));
        assertEquals("1,5,6,8,10", result2.get("result"));
cs-lists/src/test/java/io/cloudslang/content/actions/ListItemGrabberActionTest.java on lines 31..36
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 32..37
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 39..44
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 46..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 43.

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 testGetItem() {
        Map<String, String> result = new ListItemGrabberAction().grabItemFromList(LIST, ",", "1");
        assertEquals("success", result.get("response"));
        assertEquals("Ion", result.get("result"));
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 32..37
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 39..44
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 46..51
cs-lists/src/test/java/io/cloudslang/content/actions/ListSortActionTest.java on lines 53..58

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

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

    @NotNull
    private static List<String> addVerifyRequestBody(@NotNull List<String> exceptions, @Nullable final String input) {
        try {
            ObjectMapper mapper = new ObjectMapper();
            mapper.readTree(input);
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/InputsValidation.java on lines 75..85

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

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