CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

Method execute has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

            @Param(value = Constants.Inputs.XML_DOCUMENT, required = true) String xmlDocument,
            @Param(Constants.Inputs.XML_DOCUMENT_SOURCE) String xmlDocumentSource,
            @Param(value = Constants.Inputs.XPATH_ELEMENT_QUERY, required = true) String xPathQuery,
            @Param(Constants.Inputs.ATTRIBUTE_NAME) String attributeName,
            @Param(Constants.Inputs.SECURE_PROCESSING) String secureProcessing) {
Severity: Minor
Found in cs-xml/src/main/java/io/cloudslang/content/xml/actions/Remove.java - About 35 mins to fix

    Method execute has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static String execute(String list, String method, String value, boolean stripWhitespaces, String delimiter) {
    Severity: Minor
    Found in cs-lists/src/main/java/io/cloudslang/content/utils/StringMethod.java - About 35 mins to fix

      Method getResultChunk has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public String getResultChunk(@NotNull AbbyyInput abbyyInput, @NotNull String resultUrl, @NotNull ExportFormat exportFormat,
                                       int startByteIndex, int endByteIndex) throws AbbyySdkException, IOException, HttpClientException, URISyntaxException {
      Severity: Minor
      Found in cs-abbyy/src/main/java/io/cloudslang/content/abbyy/http/AbbyyApi.java - About 35 mins to fix

        Method execute has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    @Param(value = XML_DOCUMENT, required = true) String xmlDocument,
                    @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource,
                    @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery,
                    @Param(value = XML_ELEMENT, required = true) String xmlElement,
                    @Param(value = SECURE_PROCESSING) String secureProcessing) {
        Severity: Minor
        Found in cs-xml/src/main/java/io/cloudslang/content/xml/actions/InsertBefore.java - About 35 mins to fix

          Method populateValueResult has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static void populateValueResult(Map<String, String> result, String resultText, String returnResult, String selectedValue, String returnCode) {
          Severity: Minor
          Found in cs-xml/src/main/java/io/cloudslang/content/xml/utils/ResultUtils.java - About 35 mins to fix

            Method execute has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                        @Param(value = XML_DOCUMENT, required = true) String xmlDocument,
                        @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource,
                        @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery,
                        @Param(value = XML_ELEMENT, required = true) String xmlElement,
                        @Param(value = SECURE_PROCESSING) String secureProcessing) {
            Severity: Minor
            Found in cs-xml/src/main/java/io/cloudslang/content/xml/actions/AppendChild.java - About 35 mins to fix

              Method getResult has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public String getResult(@NotNull AbbyyInput abbyyInput, @NotNull String resultUrl, @NotNull ExportFormat exportFormat,
                                          @Nullable String downloadPath, boolean useSpecificCharSet) throws AbbyySdkException, IOException, HttpClientException, URISyntaxException {
              Severity: Minor
              Found in cs-abbyy/src/main/java/io/cloudslang/content/abbyy/http/AbbyyApi.java - About 35 mins to fix

                Method validateEditJsonInputs has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static void validateEditJsonInputs(String jsonObject, String jsonPath, String action, String name, String value) throws Exception {
                Severity: Minor
                Found in cs-json/src/main/java/io/cloudslang/content/json/utils/JsonUtils.java - About 35 mins to fix

                  Method execute has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public @NotNull Map<String, String> execute(@Param(value = InputNames.LIST, required = true) String list,
                                                                  @Param(value = InputNames.DELIMITER, required = true) String delimiter,
                                                                  @Param(value = InputNames.METHOD, required = true) String method,
                                                                  @Param(value = InputNames.STRIP_WHITESPACES) String stripWhitespaces,
                                                                  @Param(value = InputNames.VALUE) String value) {

                    Method validatePairedLists has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      def validatePairedLists(list1: String, list2: String, delimiter: String, inputName1: String, inputName2: String): Stream[String] = {

                      Method get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        def get(httpTransport: HttpTransport, jsonFactory: JsonFactory, credential: Credential, project: String, networkName: String): Network =

                        Method get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          def get(httpTransport: HttpTransport, jsonFactory: JsonFactory, credential: Credential, project: String, operationName: String): Operation =

                          Method getBucket has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            def getBucket(httpTransport: HttpTransport, jsonFactory: JsonFactory, credential: Credential, bucketName: String,
                                          projection: String): Bucket = {

                            Method fromJsonWithScopes has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              def fromJsonWithScopes(jsonInputStream: InputStream, transport: HttpTransport, jsonFactory: JsonFactory, scopes: Iterable[String], timeout: Long): Credential =

                              Method list has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                def list(httpTransport: HttpTransport, jsonFactory: JsonFactory, credential: Credential, project: String,
                                         filterOpt: Option[String]): List[DatabaseInstance] = {

                                Method get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  def get(httpTransport: HttpTransport, jsonFactory: JsonFactory, credential: Credential, project: String,
                                          operationName: String): Operation =

                                  Method get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    def get(httpTransport: HttpTransport, jsonFactory: JsonFactory, credential: Credential,
                                            projectId: String, databaseInstanceId: String):

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

                                        @Test
                                        public void testTerminateInstances() throws Exception {
                                            toTest.execute(getCommonInputs("TerminateInstances", HEADERS), getRebootStartStopTerminateInstancesInputs());
                                    
                                            verify(amazonSignatureServiceMock, times(1)).signRequestHeaders(any(InputsWrapper.class), eq(getHeadersMap()),
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 163..170
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 172..179
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 218..225
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 255..262
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 264..271
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 273..280
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 282..289
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 291..298
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 300..307
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 328..335
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 403..410
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 546..553
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 555..562
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 564..571
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 653..660
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 662..669

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

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

                                        @Test
                                        public void testDeleteLoadBalancers() throws Exception {
                                            toTest.execute(getCommonInputsForLoadBalancers("DeleteLoadBalancer", HEADERS), getLoadBalancerInputs());
                                    
                                            verify(amazonSignatureServiceMock, times(1)).signRequestHeaders(any(InputsWrapper.class), eq(getHeadersMap()),
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 172..179
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 218..225
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 255..262
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 264..271
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 273..280
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 282..289
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 291..298
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 300..307
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 328..335
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 403..410
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 546..553
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 555..562
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 564..571
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 653..660
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 662..669
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 671..678

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

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

                                        @Test
                                        public void testStartInstances() throws Exception {
                                            toTest.execute(getCommonInputs("StartInstances", HEADERS), getRebootStartStopTerminateInstancesInputs());
                                    
                                            verify(amazonSignatureServiceMock, times(1)).signRequestHeaders(any(InputsWrapper.class), eq(getHeadersMap()),
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 163..170
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 172..179
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 218..225
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 255..262
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 264..271
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 273..280
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 282..289
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 291..298
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 300..307
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 328..335
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 403..410
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 555..562
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 564..571
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 653..660
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 662..669
                                    cs-amazon/src/test/java/io/cloudslang/content/amazon/execute/QueryApiExecutorTest.java on lines 671..678

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

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

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

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

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

                                    Refactorings

                                    Further Reading

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language