CloudSlang/cs-actions

View on GitHub
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java

Summary

Maintainability
F
3 days
Test Coverage

File InputsValidation.java has 328 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Method verifyCreateUserInputs has 14 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static List<String> verifyCreateUserInputs(@Nullable final String accountEnabled,
                                                          @Nullable final String displayName,
                                                          @Nullable final String mailNickname,
                                                          @Nullable final String userPrincipalName,
                                                          @Nullable final String forceChangePassword,

      Method verifyUpdateUserInputs has 12 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static List<String> verifyUpdateUserInputs(@Nullable final String accountEnabled,
                                                            @Nullable final String userId,
                                                            @Nullable final String userPrincipalName,
                                                            @Nullable final String forceChangePassword,
                                                            @Nullable final String proxyPort,

        Method verifyLicenseInputs has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public static List<String> verifyLicenseInputs(@Nullable final String userPrincipalName,
                                                           @Nullable final String userId,
                                                           @Nullable final String licenses,
                                                           @Nullable final String proxyPort,
                                                           @Nullable final String trust_all_roots,

          Method verifyIsUserInGroupInputs has 11 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static List<String> verifyIsUserInGroupInputs(@Nullable final String userPrincipalName,
                                                                   @Nullable final String userId,
                                                                   @Nullable final String securityEnabledGroups,
                                                                   @Nullable final String proxyPort,
                                                                   @Nullable final String trust_all_roots,

            Method verifyDeleteInputs has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static List<String> verifyDeleteInputs(@Nullable final String userPrincipalName,
                                                              @Nullable final String userId,
                                                              @Nullable final String proxyPort,
                                                              @Nullable final String trustAllRoots,
                                                              @Nullable final String x509HostnameVerifier,

              Method verifyChangePasswordInputs has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public static List<String> verifyChangePasswordInputs(@Nullable final String currentPassword,
                                                                        @Nullable final String newPassword,
                                                                        @Nullable final String proxyPort,
                                                                        @Nullable final String trust_all_roots,
                                                                        @Nullable final String x509HostnameVerifier,

                Method verifyGetInputs has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static List<String> verifyGetInputs(@Nullable final String userPrincipalName,
                                                               @Nullable final String userId,
                                                               @Nullable final String proxyPort,
                                                               @Nullable final String trustAllRoots,
                                                               @Nullable final String x509HostnameVerifier,

                  Method verifyResetUserPasswordInputs has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public static List<String> verifyResetUserPasswordInputs(@Nullable final String forceChangePassword,
                                                                               @Nullable final String password,
                                                                               @Nullable final String proxyPort,
                                                                               @Nullable final String trustAllRoots,
                                                                               @Nullable final String x509HostnameVerifier,

                    Method verifyGetUserDetailsInputs has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public static List<String> verifyGetUserDetailsInputs(@Nullable final String userId,
                                                                              @Nullable final String proxyPort,
                                                                              @Nullable final String trustAllRoots,
                                                                              @Nullable final String x509HostnameVerifier,
                                                                              @Nullable final String connectTimeout,

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

                          public static List<String> verifyCommonUserInputs(@Nullable final String proxyPort,
                                                                            @Nullable final String trustAllRoots,
                                                                            @Nullable final String x509HostnameVerifier,
                                                                            @Nullable final String connectTimeout,
                                                                            @Nullable final String socketTimeout,

                        Method verifyAuthorizationInputs has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public static List<String> verifyAuthorizationInputs(@Nullable final String loginType,
                                                                                 @Nullable final String clientId,
                                                                                 @Nullable final String clientSecret,
                                                                                 @Nullable final String username,
                                                                                 @Nullable final String password,

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

                              @NotNull
                              public static List<String> verifyAuthorizationInputs(@Nullable final String loginType,
                                                                                   @Nullable final String clientId,
                                                                                   @Nullable final String clientSecret,
                                                                                   @Nullable final String username,
                          cs-oauth/src/main/java/io/cloudslang/content/oauth/utils/InputsValidation.java on lines 34..48
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 46..60
                          cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/InputsValidation.java on lines 46..60

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

                          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> verifyCommonUserInputs(@Nullable final String proxyPort,
                                                                                @Nullable final String trustAllRoots,
                                                                                @Nullable final String x509HostnameVerifier,
                                                                                @Nullable final String connectTimeout,
                          cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/InputsValidation.java on lines 90..111

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

                          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

                              public static List<String> verifyIsUserInGroupInputs(@Nullable final String userPrincipalName,
                                                                                   @Nullable final String userId,
                                                                                   @Nullable final String securityEnabledGroups,
                                                                                   @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 249..269

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 70.

                          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> verifyLicenseInputs(@Nullable final String userPrincipalName,
                                                                             @Nullable final String userId,
                                                                             @Nullable final String licenses,
                                                                             @Nullable final String proxyPort,
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 202..223

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

                          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

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

                              @NotNull
                              private static List<String> addVerifyNumber(@NotNull List<String> exceptions,
                                                                          @Nullable final String input,
                                                                          @NotNull final String inputName) {
                                  if (isEmpty(input)) {
                          cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/InputsValidation.java on lines 275..284
                          cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/InputsValidator.java on lines 142..150
                          cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/InputsValidation.java on lines 160..168
                          cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/InputsValidation.java on lines 88..97
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 342..350
                          cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/InputsValidation.java on lines 74..83
                          cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/InputsValidation.java on lines 112..120
                          cs-winrm/src/main/java/io/cloudslang/content/winrm/utils/InputsValidation.java on lines 133..141

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

                          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> verifyDeleteInputs(@Nullable final String userPrincipalName,
                                                                            @Nullable final String userId,
                                                                            @Nullable final String proxyPort,
                                                                            @Nullable final String trustAllRoots,
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 105..123

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 59.

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

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

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

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

                          Refactorings

                          Further Reading

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

                              @NotNull
                              public static List<String> verifyGetInputs(@Nullable final String userPrincipalName,
                                                                         @Nullable final String userId,
                                                                         @Nullable final String proxyPort,
                                                                         @Nullable final String trustAllRoots,
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 63..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 59.

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

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

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

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

                          Refactorings

                          Further Reading

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

                              @NotNull
                              private static List<String> addVerifyProxy(@NotNull List<String> exceptions,
                                                                         @Nullable final String input,
                                                                         @NotNull final String inputName) {
                                  if (isEmpty(input)) {
                          cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/InputsValidation.java on lines 231..240
                          cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/InputsValidation.java on lines 128..136
                          cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/InputsValidation.java on lines 44..53
                          cs-oauth/src/main/java/io/cloudslang/content/oauth/utils/InputsValidation.java on lines 66..74
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 322..330
                          cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/InputsValidation.java on lines 52..61
                          cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/InputsValidation.java on lines 92..100

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

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

                              @NotNull
                              private static List<String> addVerifyLoginType(@NotNull List<String> exceptions,
                                                                             @Nullable final String input,
                                                                             @NotNull final String inputName) {
                                  if (!(StringUtilities.equalsIgnoreCase(input, API) || StringUtilities.equalsIgnoreCase(input, NATIVE))) {
                          cs-oauth/src/main/java/io/cloudslang/content/oauth/utils/InputsValidation.java on lines 50..56
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 294..300
                          cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/InputsValidation.java on lines 76..82

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

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

                              @NotNull
                              private static List<String> addVerifyUserIdOrPrincipalName(@NotNull List<String> exceptions,
                                                                                         @Nullable final String userId,
                                                                                         @Nullable final String userPrincipalName) {
                                  if (isEmpty(userPrincipalName) && isEmpty(userId)) {
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 293..301
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 285..292

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

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

                              @NotNull
                              private static List<String> addVerifyUserInputs(@NotNull List<String> exceptions,
                                                                              @Nullable final String userPrincipalName,
                                                                              @Nullable final String userId) {
                                  if (isEmpty(userPrincipalName) && isEmpty(userId)) {
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 303..311
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 285..292

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

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

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

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

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

                          Refactorings

                          Further Reading

                          There are no issues that match your filters.

                          Category
                          Status