CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

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

    @Test
    public void testAddActionValue() throws Exception {
        final String jsonPathQuery = "$.store.book[0].category";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "add", "", "value", VALIDATE_VALUE_FALSE);
        assertEquals("Can only add to an array", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testAddActionJson() throws Exception {
        final String jsonPathQuery = "$.store.bicycle";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "add", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("Can only add to an array", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testGetActionMultipleValues() throws Exception {
        final String jsonPathQuery = "$.store.book[*].author";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "get", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("[\"Nigel Rees\",\"Evelyn Waugh\"]", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testGetActionArrayValidateValue() throws Exception {
        final String jsonPathQuery = "$.arrayTest";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "get", "", "", VALIDATE_VALUE_TRUE);
        assertEquals("[1,2,3]", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testGetActionJsonValidateValue() throws Exception {
        final String jsonPathQuery = "$.store.bicycle";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "get", "", "", VALIDATE_VALUE_TRUE);
        assertEquals("{\"color\":\"red\",\"price\":19.95}", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testGetActionArray() throws Exception {
        final String jsonPathQuery = "$.arrayTest";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "get", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("[1,2,3]", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testGetActionValue() throws Exception {
        final String jsonPathQuery = "$.store.book[0].category";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "get", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("\"reference\"", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testInsertActionArray() throws Exception {
        final String jsonPathQuery = "$.arrayTest[0]";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "insert", "newName", "1", VALIDATE_VALUE_FALSE);
        assertEquals("Can only add properties to a map", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testEmptyAction() throws Exception {
        final String jsonPathQuery = "$.store.bicycle";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "  ", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("Empty action provided!", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testInsertActionArrayValidateValue() throws Exception {
        final String jsonPathQuery = "$.arrayTest[0]";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "insert", "newName", "1", VALIDATE_VALUE_TRUE);
        assertEquals("Can only add properties to a map", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 406..411

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

    @Test
    public void testAddActionMultipleValues() throws Exception {
        final String jsonPathQuery = "$.store.book[*].author";
        final Map<String, String> result = editJson.execute(jsonFile, jsonPathQuery, "add", "", "", VALIDATE_VALUE_FALSE);
        assertEquals("Can only add to an array", result.get(RETURN_RESULT));
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 38..43
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 52..57
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 59..64
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 66..71
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 73..78
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 80..85
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 87..92
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 101..106
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 225..230
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 232..237
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 266..271
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 382..387
cs-json/src/test/java/io/cloudslang/content/json/actions/EditJsonTest.java on lines 399..404

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language