CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

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

    @Test
    public void testFailOverNodeInvalidInternalNodeIpAddress() throws Exception {
        setExpectedExceptions(RuntimeException.class, exception, "The provided value for: " +
                "\" anything here but not [at] symbol \" input must be a valid Couchbase internal node format.");

cs-couchbase/src/test/java/io.cloudslang.content.couchbase/execute/CouchbaseServiceTest.java on lines 373..383

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

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

    @NotNull
    public static List<String> verifyCreateWorkspaceVariablesInput(@Nullable final String workspaceVariableJson,@Nullable final String sensitiveWorkspaceVariableJson) {
        final List<String> exceptionMessages = new ArrayList<>();
        if(!workspaceVariableJson.isEmpty()){
            addVerifyRequestBody(exceptionMessages,workspaceVariableJson);
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/InputsValidation.java on lines 91..103

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

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

    @NotNull
    public static List<String> verifyCreateVariablesInput(@Nullable final String variableJson,@Nullable final String sensitiveVariableJson) {
        final List<String> exceptionMessages = new ArrayList<>();
        if(!variableJson.isEmpty()){
            addVerifyRequestBody(exceptionMessages,variableJson);
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/InputsValidation.java on lines 105..117

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

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 testFailOverNodeNoIPv4Address() throws Exception {
        setExpectedExceptions(RuntimeException.class, exception, "The value of: [ blah blah blah ] input as part " +
                "of: [ns_2@ blah blah blah ] input must be a valid IPv4 address.");

cs-couchbase/src/test/java/io.cloudslang.content.couchbase/execute/CouchbaseServiceTest.java on lines 385..395

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

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

            final Map<String, String> result = deleteUser(AzureActiveDirectoryCommonInputs.builder()
                            .authToken(authToken)
                            .proxyHost(proxyHost)
                            .proxyPort(proxyPort)
                            .proxyUsername(proxyUsername)
cs-openshift/src/main/java/io/cloudslang/content/redhat/actions/GetTokenAction.java on lines 73..90

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

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

Method modifyAttributes has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static void modifyAttributes(String firstName, String lastName, String displayName, String street, String city,
                                        String zipOrPostalCode, String stateOrProvince, List<ModificationItem> mods) {

    Method MakeLDAPConnection has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public DirContext MakeLDAPConnection(String host, String username, String password,  String timeout,
                                             String proxyHost, int proxyPort, String proxyUsername, String proxyPassword) throws NamingException {

      Method verifyCommonInputs has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static List<String> verifyCommonInputs(@Nullable final String port,
                                                        @Nullable final String proxyPort,
                                                        @Nullable final String trustAllRoots,
                                                        @Nullable final String connectTimeout,
                                                        @Nullable final String socketTimeout,

        Method iteration has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            private static List<File> iteration(String destination, Integer dpi, PDFRenderer renderer, List<File> fileList,
                                                String fileName, Integer fromPage, Integer toPage, String pageIndex)

          Method verifyExtractTextFromPDF has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static List<String> verifyExtractTextFromPDF(@Nullable final String filePath,
                                                                  @Nullable final String dataPath,
                                                                  @Nullable final String textBlocks,
                                                                  @Nullable final String deskew,
                                                                  @Nullable final String fromPage,

            Method setSpecificQueryParamValue has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                private static void setSpecificQueryParamValue(Map<String, String> queryParamsMap, String[] referenceArray,
                                                               String inputString, String referenceInputName, String currentInputName,
                                                               String suffix, String delimiter, int index) {

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

                  public Map<String, String> execute(@Param(value = ACCESS_KEY_ID, required = true, description = ACCESS_KEY_ID_DESC) final String accessKeyId,
                                                     @Param(value = ACCESS_KEY_SECRET, required = true, encrypted = true, description = ACCESS_KEY_SECRET_ID_DESC) final String accessKeySecret,
                                                     @Param(value = PROXY_HOST, description = PROXY_HOST_DESC) final String proxyHost,
                                                     @Param(value = PROXY_PORT, description = PROXY_PORT_DESC) final String proxyPort,
                                                     @Param(value = PROXY_USERNAME, description = PROXY_USERNAME_DESC) final String proxyUsername,

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

                    public Map<String, String> execute(@Param(value = ACCESS_KEY_ID, required = true, description = ACCESS_KEY_ID_DESC) final String accessKeyId,
                                                       @Param(value = ACCESS_KEY_SECRET, required = true, encrypted = true, description = ACCESS_KEY_SECRET_ID_DESC) final String accessKeySecret,
                                                       @Param(value = PROXY_HOST, description = PROXY_HOST_DESC) final String proxyHost,
                                                       @Param(value = PROXY_PORT, description = PROXY_PORT_DESC) final String proxyPort,
                                                       @Param(value = PROXY_USERNAME, description = PROXY_USERNAME_DESC) final String proxyUsername,

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

                      public Map<String, String> execute(@Param(value = ACCESS_KEY_ID, required = true, description = ACCESS_KEY_ID_DESC) final String accessKeyId,
                                                         @Param(value = ACCESS_KEY_SECRET, required = true, encrypted = true, description = ACCESS_KEY_SECRET_ID_DESC) final String accessKeySecret,
                                                         @Param(value = PROXY_HOST, description = PROXY_HOST_DESC) final String proxyHost,
                                                         @Param(value = PROXY_PORT, description = PROXY_PORT_DESC) final String proxyPort,
                                                         @Param(value = PROXY_USERNAME, description = PROXY_USERNAME_DESC) final String proxyUsername,

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

                        public Map<String, String> execute(@Param(value = STORAGE_ACCOUNT, required = true) String storageAccount,
                                                           @Param(value = KEY, required = true, encrypted = true) String key,
                                                           @Param(value = CONTAINER_NAME, required = true) String containerName,
                                                           @Param(value = PROXY_HOST) String proxyHost,
                                                           @Param(value = PROXY_PORT) String proxyPort,

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

                          public Map<String, String> execute(@Param(value = STORAGE_ACCOUNT, required = true) String storageAccount,
                                                             @Param(value = KEY, required = true, encrypted = true) String key,
                                                             @Param(value = CONTAINER_NAME, required = true) String containerName,
                                                             @Param(value = PROXY_HOST) String proxyHost,
                                                             @Param(value = PROXY_PORT) String proxyPort,

                        Method verifySCPCopyFileInputs has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                    @Nullable final String host,
                                    @Nullable final String port,
                                    @Nullable final String localFile,
                                    @Nullable final String copyAction,
                                    @Nullable final String remoteFile,

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

                              public Map<String, String> execute(@Param(value = STORAGE_ACCOUNT, required = true) String storageAccount,
                                                                 @Param(value = KEY, required = true, encrypted = true) String key,
                                                                 @Param(value = CONTAINER_NAME, required = true) String containerName,
                                                                 @Param(value = PROXY_HOST) String proxyHost,
                                                                 @Param(value = PROXY_PORT) String proxyPort,

                            Method getQueryParams has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public static String getQueryParams(@NotNull final String availabilityDomain, @NotNull final String compartmentId, @NotNull final String displayName, @NotNull final String limit, @NotNull final String page, @NotNull final String sortBy, @NotNull final String sortOrder, @NotNull final String instanceName) {

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

                                          @Param(value = TYPE_UUID, required = true, description = TYPE_UUID_DESC) final String typeUuid,
                                          @Param(value = DEPLOY_SEQUENCE, required = true, description = DEPLOY_SEQ_DESC) final String deploySequence,
                                          @Param(value = BASE_RESOURCE_UUID_LIST, description = BR_UUID_DESC) final String baseResourceUuidList,
                                          @Param(value = BASE_RESOURCE_CI_TYPE_LIST, description = BR_CITYPE_DESC) final String baseResourceCiTypeList,
                                          @Param(value = BASE_RESOURCE_TYPE_UUID_LIST, description = BR_TYPE_UUID_DESC) final String baseResourceTypeUuidList,
                                Severity
                                Category
                                Status
                                Source
                                Language