CloudSlang/cs-actions

View on GitHub
cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java

Summary

Maintainability
F
3 days
Test Coverage

AddJsonPropertyToObjectTest has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

public class AddJsonPropertyToObjectTest {

    private static final String RETURN_RESULT = "returnResult";
    public static final String EXCEPTION = "exception";
    public static final String VALIDATE_VALUE_FALSE = "false";

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

        @Test
        public void testExecuteJsonObjectBad() throws Exception {
            String jsonObject = "{";
            String name = "test";
            String value = "1";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 59..68

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

    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 testExecuteJsonObjectBadValidateValue() throws Exception {
            String jsonObject = "{";
            String name = "test";
            String value = "1";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 48..57

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

    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 testExecuteEmptyJsonObject() {
            String jsonObject = "";
            String name = "test";
            String value = "1";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 253..262
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 264..273

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

    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 testExecuteEmptyValueValidateValue() {
            String jsonObject = "{}";
            String name = "test";
            String value = "";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 211..220
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 253..262

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

    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 testExecuteJsonObjectComplexPropertyStringValidateValue() {
            String jsonObject = "{\"one\":{\"a\":\"a\",\"B\":\"B\"}, \"two\":\"two\", \"three\":[1,2,3.4]}";
            String name = "test";
            String value = "a";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 88..96
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 134..142

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

    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 testExecutePropertyValueBadValidateTrue() {
            String jsonObject = "{}";
            String name = "test";
            String value = "1\"{";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 134..142
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 181..189

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

    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 testExecutePropertyValueBadArrayValidateValue() {
            String jsonObject = "{}";
            String name = "test";
            String value = "[1,2,\"3]";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 88..96
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 181..189

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

    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 testExecuteEmptyValue() {
            String jsonObject = "{}";
            String name = "test";
            String value = "";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 211..220
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 264..273

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

    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 testExecuteNullValueValidateValue() {
            String jsonObject = "{}";
            String name = "test";
    
    
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 275..284

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

    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 testExecuteNullValue() {
            String jsonObject = "{}";
            String name = "test";
    
    
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 286..295

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

    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 testExecuteEmptyName() {
            String jsonObject = "{}";
            String name = "";
            String value = "1";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 38..46

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

    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 testExecuteSimpleAll() {
            String jsonObject = "{}";
            String name = "test";
            String value = "1";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 232..241

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

    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 testExecuteJsonObjectSpecialCharsValidateValue() {
            String jsonObject = "{\"one\":{\"a\":\"a\",\"B\":\"B\"}, \"two\":\"two\", \"three;/?:@&=+,$\":[1,2,3.4]}";
            String name = "tes;/?:@&=+,$t";
            String value = "{\"a\":\"b;/?:@&=+,$\"}";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 191..199

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

    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 testExecuteJsonObjectSpecialChars() {
            String jsonObject = "{\"one\":{\"a\":\"a\",\"B\":\"B\"}, \"two\":\"two\", \"three;/?:@&=+,$\":[1,2,3.4]}";
            String name = "tes;/?:@&=+,$t";
            String value = "{\"a\":\"b;/?:@&=+,$\"}";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 201..209

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

    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 testExecutePropertyValueArrayValidateValue() {
            String jsonObject = "{}";
            String name = "test";
            String value = "[1,2,3]";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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 testExecutePropertyValueJsonValidateValue() {
            String jsonObject = "{}";
            String name = "test";
            String value = "{\"a\":\"b\"}";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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 testExecutePropertyValueBad() {
            String jsonObject = "{}";
            String name = "test";
            String value = "1\"{";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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 testExecuteJsonObjectComplexValidateValue() {
            String jsonObject = "{\"one\":{\"a\":\"a\",\"B\":\"B\"}, \"two\":\"two\", \"three\":[1,2,3.4]}";
            String name = "test";
            String value = "{\"a\":\"b\"}";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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 testExecutePropertyValueArray() {
            String jsonObject = "{}";
            String name = "test";
            String value = "[1,2,3]";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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 testExecuteJsonObjectComplexPropertyString() {
            String jsonObject = "{\"one\":{\"a\":\"a\",\"B\":\"B\"}, \"two\":\"two\", \"three\":[1,2,3.4]}";
            String name = "test";
            String value = "a";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170

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

    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 testExecutePropertyValueJson() {
            String jsonObject = "{}";
            String name = "test";
            String value = "{\"a\":\"b\"}";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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 testExecuteJsonObjectComplex() {
            String jsonObject = "{\"one\":{\"a\":\"a\",\"B\":\"B\"}, \"two\":\"two\", \"three\":[1,2,3.4]}";
            String name = "test";
            String value = "{\"a\":\"b\"}";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 70..77
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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 testExecuteNameBad() {
            String jsonObject = "{}";
            String name = "test{\"";
            String value = "1";
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 79..86
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 98..105
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 107..114
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 116..123
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 125..132
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 154..161
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 163..170
    cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 172..179

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

    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

    There are no issues that match your filters.

    Category
    Status