CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

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

/*
 * Copyright 2019-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-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/OutputNames.java on lines 1..27
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

/*
 * Copyright 2019-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-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/OutputNames.java on lines 1..27
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

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 testDescribeTagsWithMaxResultsDouble() throws Exception {
        MockingHelper.setExpectedExceptions(exception, RuntimeException.class, "The provided value: 6.7 input must be integer.");

        final FilterInputs filterInputs = new FilterInputs.Builder()
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 443..452
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 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 testDescribeTagsWithMaxResultsString() throws Exception {
        MockingHelper.setExpectedExceptions(exception, RuntimeException.class, "The provided value: WRONG input must be integer.");

        final FilterInputs filterInputs = new FilterInputs.Builder()
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 443..452
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

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 testArrayWithJsonInside() throws Exception {
        String array1 = " [{\"one\":1, \"two\":2}, 3, \"four\"]";
        String array2 = "[{\"one\":1, \"two\":2}, 3, \"four\"]";
        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 45..51
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

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

    @Test
    public void parseBoolean_valueIsNotABoolean_IllegalArgumentException() {
        //Arrange
        final String value = "dummy";

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

    @Test
    public void parseBoolean_valueIsWrongCaseFalse_IllegalArgumentException() {
        //Arrange
        final String value = "False";

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 191..204

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 testDescribeTagsWithMaxResultsNegative() throws Exception {
        MockingHelper.setExpectedExceptions(exception, RuntimeException.class, "Incorrect provided value: 0 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 443..452
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 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 parseInt_valueIsNaN_IllegalArgumentException() {
        //Arrange
        final String value = "not a number";

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 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 2019-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-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/OutputNames.java on lines 1..27
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-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 testDescribeTagsWithMaxResultsGreaterThanAccepted() throws Exception {
        MockingHelper.setExpectedExceptions(exception, RuntimeException.class, "Incorrect provided value: 1001 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 443..452
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 testExecuteNameBad() {
        String jsonObject = "{}";
        String key = "test{\"";
        final Map<String, String> result = getValueFromObject.execute(jsonObject, key);
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
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

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

    @Test
    public void testExecuteJsonObjectSpecialCharsInKey() {
        String jsonObject = "{\"one\":{\"a\":\"a\",\"B\":\"B\"}, \"two\":\"two\", \"three;/?:@&=+,$\":[1,2,3.4]}";
        String key = "tes;/?:@&=+,$t";
        final Map<String, String> result = getValueFromObject.execute(jsonObject, key);
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/MergeArraysTest.java on lines 37..43
cs-json/src/test/java/io/cloudslang/content/json/actions/MergeArraysTest.java on lines 45..51
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

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

/*
 * Copyright 2019-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-active-directory/src/main/java/io/cloudslang/content/active_directory/constants/OutputNames.java on lines 1..27
cs-alibaba/src/main/java/io/cloudslang/content/alibaba/utils/constants/ExceptionMessages.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 3 locations. Consider refactoring.
Open

    @Test
    public void validate_descriptionIsEmpty_nullReturned() {
        //Arrange
        ProcessTextFieldInput request = mockAbbyyRequest();
        when(request.getDescription()).thenReturn(StringUtils.EMPTY);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 38..47
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 189..198

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

    @Test
    public void validate_responseHasEmptyTaskId_ValidationException() {
        //Arrange
        final AbbyyResponse response = mockAbbyyResponse();
        when(response.getTaskId()).thenReturn(StringUtils.EMPTY);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessImageInputValidatorTest.java on lines 189..198
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 79..88

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

    @Test
    public void parseInt_valueIsNull_IllegalArgumentException() {
        //Arrange
        final String value = null;

cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 73..86
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/utils/InputParserTest.java on lines 159..172

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

    @Test
    public void validate_descriptionIsEmpty_nullReturned() {
        //Arrange
        ProcessImageInput request = mockAbbyyRequest();
        when(request.getDescription()).thenReturn(StringUtils.EMPTY);
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyResponseValidatorImplTest.java on lines 38..47
cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/ProcessTextFieldInputValidatorTest.java on lines 79..88

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

    @Test
    public void testInsertActionJsonNullName() throws Exception {
        final String jsonPathQuery = "$.store.bicycle";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "insert", null, "", VALIDATE_VALUE_FALSE);
        assertEquals("Empty name provided for insert action!", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 201..206

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

    @Test
    public void testWithTrimString() {
        final Map<String, String> result = d.execute("", "string", "astring");
        assertEquals(FAILURE, result.get(RETURN_CODE));
        assertTrue(result.get(RETURN_RESULT).contains("The provided string cannot be converted to a boolean value"));
cs-utilities/src/test/java/io/cloudslang/content/utilities/DefaultIfEmptyTest.java on lines 62..67

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