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 validate_sourceFileDoesNotExist_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();

cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 176..190

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testExecuteEmptyName() {
        String jsonObject = "{}";
        String name = "";
        String value = "1";
cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 38..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

    @NotNull
    public static List<String> verifyResetUserPasswordInputs(@Nullable final String forceChangePassword,
                                                             @Nullable final String password,
                                                             @Nullable final String proxyPort,
                                                             @Nullable final String trustAllRoots,
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 271..290

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

    @NotNull
    public static List<String> verifyChangePasswordInputs(@Nullable final String currentPassword,
                                                          @Nullable final String newPassword,
                                                          @Nullable final String proxyPort,
                                                          @Nullable final String trust_all_roots,
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 179..200

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testEmptyArray2() throws Exception {
        String array1 = "[1,2,3]";
        String array2 = "";
        final Map<String, String> returnResult = mergeArrays.execute(array1, array2);
cs-json/src/test/java/io/cloudslang/content/json/actions/MergeArraysTest.java on lines 61..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void validate_destinationFileAlreadyExists_ValidationException() {
        //Arrange
        R abbyyRequestMock = mockAbbyyRequest();

cs-abbyy/src/test/java/io/cloudslang/content/abbyy/validators/AbbyyInputValidatorTest.java on lines 229..243

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testExecuteSimpleAll() {
        String jsonObject = "{}";
        String name = "test";
        String value = "1";
cs-json/src/test/java/io/cloudslang/content/json/actions/AddJsonPropertyToObjectTest.java on lines 232..241

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

    @Test
    public void testEmptyArray1() throws Exception {
        String array1 = "";
        String array2 = "[1,2,3]";
        final Map<String, String> returnResult = mergeArrays.execute(array1, array2);
cs-json/src/test/java/io/cloudslang/content/json/actions/MergeArraysTest.java on lines 80..88

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

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

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

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

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

Refactorings

Further Reading

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/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/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/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/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/CreateUserService.java on lines 112..119
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/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
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/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/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
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

Severity
Category
Status
Source
Language