CloudSlang/cs-actions

View on GitHub
cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java

Summary

Maintainability
F
4 days
Test Coverage

EditXmlTest has 36 methods (exceeds 20 allowed). Consider refactoring.
Open

public class EditXmlTest {

    private static final String EMPTY = "";
    private static final String DELETE = "delete";
    private static final String RENAME = "rename";

    File EditXmlTest.java has 310 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright 2022-2024 Open Text
     * This program and the accompanying materials
     * are made available under the terms of the Apache License v2.0 which accompany this distribution.
     *

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

          @Test
          public void testUpdateText() {
              result = editXml.xPathReplaceNode(EMPTY, getClass().getResource("/editxmlres/nameSpace.xml").getPath(), UPDATE, "/t:Definitions/t:ServiceTemplate/t:TopologyTemplate/t:NodeTemplate/t:Properties/eve:realized_server_group/eve:resource_pool_ref",
                      EMPTY, "newText", "text", EMPTY, "");
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 328..335

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

      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 testUpdate() {
              result = editXml.xPathReplaceNode(EMPTY, getClass().getResource("/editxmlres/nameSpace.xml").getPath(), UPDATE, "/t:Definitions/t:ServiceTemplate/t:TopologyTemplate/t:NodeTemplate/t:Properties/eve:realized_server_group/eve:resource_pool_ref",
                      EMPTY, "<eve:test><t:test1>alabala</t:test1></eve:test>", "elem", EMPTY, "");
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 337..344

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

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

          @Test
          public void testInsertElem() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, INSERT, "/Employees/Employee/firstname", EMPTY, "<a id=\"test id \"><b name =\"testName\"><c test=\"testCV\">newAttributeValue</c></b></a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLInsertElement.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testInsertElem1() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, INSERT, "/Employees/Employee", EMPTY, "<a>newAttributeValue</a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLInsertElement1.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testSubNodeElem2() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, SUBNODE, "/Employees/Employee/firstname", EMPTY, "<a>newAttributeValue</a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLSubNode2.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245

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

          @Test
          public void testInsertText() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, INSERT, "/Employees/Employee/firstname", EMPTY, " new text", TEXT, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLInsertText1.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testSubNodeElem1() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, SUBNODE, "/Employees/Employee", EMPTY, "<a>newAttributeValue</a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLSubNode1.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testSubNodeElem() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, SUBNODE, "/Employees", EMPTY, "<a id=\"testID\">newAttributeValue</a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLSubNode.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testAppendText() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, APPEND, "/Employees/Employee/firstname", EMPTY,
                      " new text", TEXT, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLAppendText.xml"), (result.get(RETURN_RESULT)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testAppendElem2() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, APPEND, "/Employees", EMPTY, "<a>newAttributeValue</a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/xmlFile.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testAppendElem() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, APPEND, "/Employees/Employee/email", EMPTY, "<a id=\"test id \"><b name =\"testName\"><c test=\"testCV\">newAttributeValue</c></b></a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLAppendElement.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testAppendElem1() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, APPEND, "/Employees/Employee", EMPTY, "<a>newAttributeValue</a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLAppendElement1.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 174..180
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

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

          @Test
          public void testInsertElem2() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, INSERT, "/Employees", EMPTY, "<a>newAttributeValue</a>", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/xmlFile.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 134..140
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 158..164
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 166..172
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 182..189
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 207..213
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 215..221
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 223..229
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 231..237
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 239..245
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 247..253

      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 testInsertAttribute() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, INSERT, "/Employees/Employee", EMPTY, " new text", ATTR, "newAttr", "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLInsertAttribute.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 198..205

      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 testMove() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, MOVE, "/Employees/Employee/firstname", "/Employees/Employee[3]", EMPTY, EMPTY, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLMove.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 263..269

      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 testMove2() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, MOVE, "/Employees/Employee/firstname", "/Employees/Employee", EMPTY, EMPTY, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLMove2.xml"), (result.get(RETURN_RESULT)));
              assertEquals(RETURN_CODE_SUCCESS, (result.get(RETURN_CODE)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 255..261

      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 testAppendAttribute() throws Exception {
              //NOTE append attribute and insert attribute work in the same way!!!
              result = editXml.xPathReplaceNode(EMPTY, fullPath, APPEND, "/Employees/Employee", EMPTY, " new text", ATTR, "newAttr", "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLInsertAttribute.xml"), (result.get(RETURN_RESULT)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 150..156

      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 testInsetText1() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, INSERT, "/Employees/Employee", EMPTY, " new text", TEXT, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLinsertTextResponse.xml"), result.get(RETURN_RESULT));
              assertEquals(RETURN_CODE_SUCCESS, result.get(RETURN_CODE));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 118..124

      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 testRenameElem() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, RENAME, "/Employees/Employee/age", EMPTY, "newNameElem", ELEM, EMPTY, "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLRenameElem.xml"), result.get(RETURN_RESULT));
              assertEquals(RETURN_CODE_SUCCESS, result.get(RETURN_CODE));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 142..148

      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 testDeleteAttribute() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, DELETE, "/Employees/Employee", EMPTY, EMPTY, ATTR, "emplid", "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLdeleteAttribute.xml"), result.get(RETURN_RESULT));
              assertEquals(RETURN_CODE_SUCCESS, result.get(RETURN_CODE));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 110..116

      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 testDeleteText() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, fullPath, DELETE, "/Employees/Employee/firstname", EMPTY, EMPTY, TEXT, "", "");
              assertEquals(getResponseFromFile("/editxmlres/editXMLdeleteText.xml"), result.get(RETURN_RESULT));
              assertEquals(RETURN_CODE_SUCCESS, result.get(RETURN_CODE));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 102..108

      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 testValidate7() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, "asd", DELETE, "/test/test", EMPTY, EMPTY, "wrong type", EMPTY, "");
              assertEquals(RETURN_CODE_FAILURE, (result.get(RETURN_CODE)));
              assertEquals("Invalid type. Only supported : elem, attr, text", (result.get(EXCEPTION)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 321..326

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

      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 testValidate8() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, "asd", DELETE, "/test/test", EMPTY, EMPTY, "attr", EMPTY, "");
              assertEquals(RETURN_CODE_FAILURE, (result.get(RETURN_CODE)));
              assertEquals("name input is required for type 'attr' ", (result.get(EXCEPTION)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 314..319

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

      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 testValidate3() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, "asd", EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, "");
              assertEquals(RETURN_CODE_FAILURE, (result.get(RETURN_CODE)));
              assertEquals("action input is required.", (result.get(EXCEPTION)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 293..298

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

      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 testValidate5() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, "asd", MOVE, "/test/test", EMPTY, EMPTY, EMPTY, EMPTY, "");
              assertEquals(RETURN_CODE_FAILURE, (result.get(RETURN_CODE)));
              assertEquals("xpath2 input is required for action 'move' ", (result.get(EXCEPTION)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 307..312

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

      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 testValidate4() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, "asd", MOVE, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, "");
              assertEquals(RETURN_CODE_FAILURE, (result.get(RETURN_CODE)));
              assertEquals("xpath1 input is required.", (result.get(EXCEPTION)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 286..291

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

      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 testValidate6() throws Exception {
              result = editXml.xPathReplaceNode(EMPTY, "asd", DELETE, "/test/test", EMPTY, EMPTY, EMPTY, EMPTY, "");
              assertEquals(RETURN_CODE_FAILURE, (result.get(RETURN_CODE)));
              assertEquals("type input is required for action 'delete'", (result.get(EXCEPTION)));
      cs-xml/src/test/java/io/cloudslang/content/xml/actions/EditXmlTest.java on lines 300..305

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

      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