CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

Identical blocks of code found in 7 locations. Consider refactoring.
Open

    @NotNull
    public static Proxy getProxy(@NotNull final String proxyHost, final int proxyPort, @NotNull final String proxyUser, @NotNull final String proxyPassword) {
        if (StringUtilities.isBlank(proxyHost)) {
            return Proxy.NO_PROXY;
        }
cs-azure/src/main/java/io/cloudslang/content/azure/utils/HttpUtils.java on lines 52..66
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtils.java on lines 26..40
cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/HttpUtils.java on lines 39..53
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/HttpUtils.java on lines 41..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/HttpUtils.java on lines 34..48
cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/HttpUtils.java on lines 27..41

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

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

Identical blocks of code found in 7 locations. Consider refactoring.
Open

    @NotNull
    public static Proxy getProxy(@NotNull final String proxyHost, final int proxyPort, @NotNull final String proxyUser, @NotNull final String proxyPassword) {
        if (StringUtilities.isBlank(proxyHost)) {
            return Proxy.NO_PROXY;
        }
cs-azure/src/main/java/io/cloudslang/content/azure/utils/HttpUtils.java on lines 52..66
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtils.java on lines 26..40
cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/HttpUtils.java on lines 39..53
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/HttpUtils.java on lines 34..48
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/HttpUtils.java on lines 39..53
cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/HttpUtils.java on lines 27..41

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

Identical blocks of code found in 7 locations. Consider refactoring.
Open

    @org.jetbrains.annotations.NotNull
    public static Proxy getProxy(@org.jetbrains.annotations.NotNull final String proxyHost, final int proxyPort, @org.jetbrains.annotations.NotNull final String proxyUser, @org.jetbrains.annotations.NotNull final String proxyPassword) {
        if (StringUtilities.isBlank(proxyHost)) {
            return Proxy.NO_PROXY;
        }
cs-azure/src/main/java/io/cloudslang/content/azure/utils/HttpUtils.java on lines 52..66
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtils.java on lines 26..40
cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/HttpUtils.java on lines 39..53
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/HttpUtils.java on lines 41..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/HttpUtils.java on lines 34..48
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/HttpUtils.java on lines 39..53

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

Identical blocks of code found in 7 locations. Consider refactoring.
Open

    @NotNull
    public static Proxy getProxy(@NotNull final String proxyHost, final int proxyPort, @NotNull final String proxyUser, @NotNull final String proxyPassword) {
        if (StringUtilities.isBlank(proxyHost)) {
            return Proxy.NO_PROXY;
        }
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtils.java on lines 26..40
cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/HttpUtils.java on lines 39..53
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/HttpUtils.java on lines 41..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/HttpUtils.java on lines 34..48
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/HttpUtils.java on lines 39..53
cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/HttpUtils.java on lines 27..41

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

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

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

        } catch (Exception e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/EnableComputerAccountService.java on lines 83..90
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

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

        } catch (NamingException e) {
            Exception exception = CustomSSLSocketFactory.getException();
            if (exception == null)
                exception = e;
            results.put(EXCEPTION, String.valueOf(exception));
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/CreateComputerAccountService.java on lines 98..105
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DeleteComputerAccountService.java on lines 75..82
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/DisableComputerAccountService.java on lines 84..91
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/GetComputerAccountOUService.java on lines 81..88
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/IsComputerAccountEnabledService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/MoveComputerAccountToOUService.java on lines 74..81
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/ResetComputerAccountService.java on lines 80..87
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/computers/UpdateComputerAccountService.java on lines 88..95
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/CreateGroupService.java on lines 106..113
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/groups/DeleteGroupService.java on lines 78..85
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/CreateUserService.java on lines 112..119
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DeleteUserService.java on lines 76..83
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/DisableUserService.java on lines 86..93
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/EnableUserService.java on lines 85..92
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/IsUserEnabledService.java on lines 79..86
cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/ResetUserPasswordService.java on lines 74..81

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

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

Identical blocks of code found in 7 locations. Consider refactoring.
Open

    @org.jetbrains.annotations.NotNull
    public static Proxy getProxy(@org.jetbrains.annotations.NotNull final String proxyHost, final int proxyPort, @org.jetbrains.annotations.NotNull final String proxyUser, @org.jetbrains.annotations.NotNull final String proxyPassword) {
        if (StringUtilities.isBlank(proxyHost)) {
            return Proxy.NO_PROXY;
        }
cs-azure/src/main/java/io/cloudslang/content/azure/utils/HttpUtils.java on lines 52..66
cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/HttpUtils.java on lines 39..53
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/HttpUtils.java on lines 41..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/HttpUtils.java on lines 34..48
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/HttpUtils.java on lines 39..53
cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/HttpUtils.java on lines 27..41

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

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

Identical blocks of code found in 7 locations. Consider refactoring.
Open

    @NotNull
    public static Proxy getProxy(@NotNull final String proxyHost, final int proxyPort, @NotNull final String proxyUser, @NotNull final String proxyPassword) {
        if (StringUtilities.isBlank(proxyHost)) {
            return Proxy.NO_PROXY;
        }
cs-azure/src/main/java/io/cloudslang/content/azure/utils/HttpUtils.java on lines 52..66
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtils.java on lines 26..40
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/HttpUtils.java on lines 41..55
cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/HttpUtils.java on lines 34..48
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/HttpUtils.java on lines 39..53
cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/HttpUtils.java on lines 27..41

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

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

Identical blocks of code found in 7 locations. Consider refactoring.
Open

    @NotNull
    public static Proxy getProxy(@NotNull final String proxyHost, final int proxyPort, @NotNull final String proxyUser, @NotNull final String proxyPassword) {
        if (StringUtilities.isBlank(proxyHost)) {
            return Proxy.NO_PROXY;
        }
cs-azure/src/main/java/io/cloudslang/content/azure/utils/HttpUtils.java on lines 52..66
cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/HttpUtils.java on lines 26..40
cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/HttpUtils.java on lines 39..53
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/HttpUtils.java on lines 41..55
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/HttpUtils.java on lines 39..53
cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/HttpUtils.java on lines 27..41

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

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

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

        if (t != null) {
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            t.printStackTrace(pw);
            final String stackTraceAsString = sw.toString();
cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/StringUtils.java on lines 94..106

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

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

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

    public static String toString(SQLException e) {
        String curr = exceptionToString(e) + "\nstate:" + e.getSQLState();
        while ((e = e.getNextException()) != null)
            curr += "\n\n" + exceptionToString(e) + "\nstate:" + e.getSQLState();
        return curr;
cs-database/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java on lines 86..91

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

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

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

        if (t != null) {
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            t.printStackTrace(pw);
            final String stackTraceAsString = sw.toString();
cs-rft/src/main/java/io/cloudslang/content/rft/utils/StringUtils.java on lines 93..105

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

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

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

    public static String toString(SQLException e) {
        String curr = exceptionToString(e) + "\nstate:" + e.getSQLState();
        while ((e = e.getNextException()) != null)
            curr += "\n\n" + exceptionToString(e) + "\nstate:" + e.getSQLState();
        return curr;
cs-oracle-cloud-databases/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java on lines 84..89

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

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