CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

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

            if (!share.fileExists(filePath.toString())) {
                f = share.openFile(filePath.toString(),
                        new HashSet<>(Arrays.asList(AccessMask.GENERIC_ALL)),
                        new HashSet<>(Arrays.asList(FileAttributes.FILE_ATTRIBUTE_NORMAL)),
                        SMB2ShareAccess.ALL,
cs-rft/src/main/java/io/cloudslang/content/rft/remote_copy/SmbCopier.java on lines 94..101
cs-rft/src/main/java/io/cloudslang/content/rft/remote_copy/SmbCopier.java on lines 160..167

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

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

    private ElasticIpInputs(Builder builder) {
        this.publicIp = builder.publicIp;
        this.privateIpAddress = builder.privateIpAddress;
        this.privateIpAddressesString = builder.privateIpAddressesString;

cs-couchbase/src/main/java/io/cloudslang/content/couchbase/entities/inputs/CommonInputs.java on lines 34..39
cs-xml/src/main/java/io/cloudslang/content/xml/entities/inputs/ApplyXslTransformationInputs.java on lines 32..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 54.

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

    public static boolean isValidDouble(@Nullable final String doubleStr) {
        if (StringUtils.isBlank(doubleStr)) {
            return false;
        }
        final String stripedDouble = StringUtils.strip(doubleStr);
cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java on lines 41..52
cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java on lines 60..71

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

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

    public static boolean isValidLong(@Nullable final String longStr) {
        if (StringUtils.isBlank(longStr)) {
            return false;
        }
        final String stripedLong = StringUtils.strip(longStr);
cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java on lines 41..52
cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java on lines 249..260

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

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

        public static final String QUERY_PARAMS_ARE_FORM_ENCODED_DESC = "Specifies whether to encode the query_params in " +
                "the form request format or not. This format is the default format used by the apache http client library. " +
                "If query_params_are_URL_encoded=true then all characters will be encoded based on the " +
                "query_params_are_URL_encoded input. If query_params_are_URL_encoded=false all reserved characters are not " +
                "encoded no matter of query_params_are_URL_encoded input. The only exceptions are for ' '(space) character " +
cs-xml/src/test/java/io/cloudslang/content/xml/actions/ConvertXmlToJsonTest.java on lines 88..100

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

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

    private final static String XML_WITH_TEXT = "<root xmlns:f=\"http://java.sun.com/jsf/core\" xmlns:ui=\"urn:x-hp:2012:software:eve:uibinding\" id=\"Page1\">\n" +
            "<td id=\"1\">Apples</td>\n" +
            "<ui:position><x>1</x><y>2</y><td id=\"1\">Apples</td></ui:position>\n" +
            "<f:properties>\n" +
            "<f:property><key1>value1</key1></f:property>\n" +
cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/Descriptions.java on lines 117..129

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

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 testDeleteActionValue() throws Exception {
        final String jsonPathQuery = "$.store.book[0].category";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "delete", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("{\"store\":{\"book\":[{\"author\":\"Nigel Rees\",\"title\":\"Sayings of the Century\"," +
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 115..122
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 310..317
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 319..326
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 328..336
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 356..363

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

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 testDeleteActionArray() throws Exception {
        final String jsonPathQuery = "$.arrayTest";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "delete", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("{\"store\":{\"book\":[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":" +
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 115..122
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 310..317
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 319..326
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 338..345
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 356..363

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

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 testDeleteActionMultipleValues() throws Exception {
        final String jsonPathQuery = "$.store.book[*].author";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "delete", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("{\"store\":{\"book\":[{\"category\":\"reference\",\"title\":\"Sayings of the Century\"," +
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 115..122
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 310..317
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 319..326
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 328..336
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 338..345

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

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 testUpdateActionJsonWithEmptyValue() throws Exception {
        final String jsonPathQuery = "$.store.bicycle";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "update", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("{\"store\":{\"book\":[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":" +
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 310..317
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 319..326
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 328..336
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 338..345
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 356..363

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

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 testDeleteActionJson() throws Exception {
        final String jsonPathQuery = "$.store.bicycle";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "delete", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("{\"store\":{\"book\":[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":" +
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 115..122
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 319..326
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 328..336
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 338..345
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 356..363

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

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 testAllocateAddress() throws Exception {
        toTest.execute(getCommonInputs("AllocateAddress", HEADERS), getCustomInputs(), getElasticIpInputs(),
                getNetworkInputs(true));

cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 125..133
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 227..235
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 516..524
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 536..544

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

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 testDisassociateAddress() throws Exception {
        toTest.execute(getCommonInputs("DisassociateAddress", HEADERS), getCustomInputs(), getElasticIpInputs(),
                getNetworkInputs(false));

cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 115..123
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 125..133
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 227..235
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 536..544

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

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 testCreateVolume() throws Exception {
        toTest.execute(getCommonInputs("CreateVolume", HEADERS), getCustomInputs(), getVolumeInputs(),
                getNetworkInputs(false));

cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 115..123
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 125..133
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 516..524
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 536..544

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

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 testReleaseAddress() throws Exception {
        toTest.execute(getCommonInputs("ReleaseAddress", HEADERS), getCustomInputs(), getElasticIpInputs(),
                getNetworkInputs(false));

cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 115..123
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 125..133
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 227..235
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 516..524

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

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 testDeleteActionJsonValidateValue() throws Exception {
        final String jsonPathQuery = "$.store.bicycle";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "delete", "", "", VALIDATE_VALUE_TRUE);
        assertEquals("{\"store\":{\"book\":[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":" +
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 115..122
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 310..317
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 328..336
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 338..345
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 356..363

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

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 testAssociateAddress() throws Exception {
        toTest.execute(getCommonInputs("AssociateAddress", HEADERS), getCustomInputs(), getElasticIpInputs(),
                getNetworkInputs(true));

cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 115..123
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 227..235
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 516..524
cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 536..544

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

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
    public static String getAttachmentsPath(@NotNull final String userPrincipalName,
                                            @NotNull final String userId,
                                            @NotNull final String messageId,
                                            @NotNull final String attachmentId) {
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/HttpUtils.java on lines 115..129

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

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
    public static String getAttachmentsPath(@NotNull final String userPrincipalName,
                                            @NotNull final String userId,
                                            @NotNull final String messageId,
                                            @NotNull final String attachmentId) {
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/HttpUtils.java on lines 107..121

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

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

/*
 * Copyright 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-azure/src/main/java/io/cloudslang/content/azure/entities/models/streamanalytics/StartStreamingJobRequestBody.java on lines 1..41
cs-office-365/src/main/java/io/cloudslang/content/office365/entities/createUserModels/PasswordProfile.java on lines 1..42

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

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