CloudSlang/cs-actions

View on GitHub
cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java

Summary

Maintainability
F
3 days
Test Coverage

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

/*
 * Copyright 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 13 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 verifyAddAttachmentInputs has 13 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                  @Nullable final String filePath,
                  @Nullable final String contentName,
                  @Nullable final String contentBytes,
                  @Nullable final String userPrincipalName,
                  @Nullable final String userId,

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

            public static List<String> verifyUpdateUserInputs(@Nullable final String accountEnabled,
                                                              @Nullable final String userIdToUpdate,
                                                              @Nullable final String userPrincipalNameToUpdate,
                                                              @Nullable final String forceChangePassword,
                                                              @Nullable final String proxyPort,

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

              public static List<String> verifyGetAttachmentInputs(@Nullable final String messageId,
                                                                   @Nullable final String userPrincipalName,
                                                                   @Nullable final String attachmentId,
                                                                   @Nullable final String userId,
                                                                   @Nullable final String proxyPort,

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

                public static List<String> verifyMoveMessageInputs(@Nullable final String userPrincipalName,
                                                                   @Nullable final String userId,
                                                                   @Nullable final String messageId,
                                                                   @Nullable final String destinationId,
                                                                   @Nullable final String proxyPort,

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

                  public static List<String> verifyGetMessageInputs(@Nullable final String messageId,
                                                                    @Nullable final String userPrincipalName,
                                                                    @Nullable final String userId,
                                                                    @Nullable final String proxyPort,
                                                                    @Nullable final String trust_all_roots,

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

                    public static List<String> verifySendEmailInputs(@Nullable final String clientId,
                                                                     @NotNull final String proxyPort,
                                                                     @Nullable final String userPrincipalName,
                                                                     @Nullable final String userId,
                                                                     @Nullable final String trust_all_roots,

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

                      public static List<String> verifyCommonInputs(@Nullable final String userPrincipalName,
                                                                    @Nullable final String userId,
                                                                    @Nullable final String proxyPort,
                                                                    @Nullable final String trust_all_roots,
                                                                    @Nullable final String connectTimeout,

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

                        public static List<String> verifyCommonUserInputs(@Nullable final String proxyPort,
                                                                          @Nullable final String trust_all_roots,
                                                                          @Nullable final String connectTimeout,
                                                                          @Nullable final String socketTimeout,
                                                                          @Nullable final String keepAlive,

                      Method verifyCreateMessageInputs has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public static List<String> verifyCreateMessageInputs(@Nullable final String sender, @Nullable final String importance,
                                                                               @Nullable final String toRecipients, @Nullable final String isRead,
                                                                               @Nullable final String isDeliveryReceiptRequested,
                                                                               @Nullable final String isReadReceiptRequested,
                                                                               @Nullable final String inferenceClassification) {

                        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, @NotNull final String proxyPort) {

                          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, @Nullable final String password, @NotNull final String proxyPort) {
                                  final List<String> exceptionMessages = new ArrayList<>();
                                  addVerifyLoginType(exceptionMessages, loginType, LOGIN_TYPE);
                                  addVerifyNotNullOrEmpty(exceptionMessages, clientId, CLIENT_ID);
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 42..61
                          cs-oauth/src/main/java/io/cloudslang/content/oauth/utils/InputsValidation.java on lines 34..48
                          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 4 locations. Consider refactoring.
                          Open

                              @NotNull
                              public static List<String> verifyCommonUserInputs(@Nullable final String proxyPort,
                                                                                @Nullable final String trust_all_roots,
                                                                                @Nullable final String connectTimeout,
                                                                                @Nullable final String socketTimeout,
                          cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/InputsValidation.java on lines 30..49
                          cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/InputsValidation.java on lines 23..42
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 244..259

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

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

                              @NotNull
                              public static List<String> verifyCreateMessageInputs(@Nullable final String sender, @Nullable final String importance,
                                                                                   @Nullable final String toRecipients, @Nullable final String isRead,
                                                                                   @Nullable final String isDeliveryReceiptRequested,
                                                                                   @Nullable final String isReadReceiptRequested,
                          cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/InputsValidation.java on lines 30..49
                          cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/InputsValidation.java on lines 23..42
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 171..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 92.

                          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
                              public static List<String> verifyMoveMessageInputs(@Nullable final String userPrincipalName,
                                                                                 @Nullable final String userId,
                                                                                 @Nullable final String messageId,
                                                                                 @Nullable final String destinationId,
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 103..123
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 222..242

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

                          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
                              public static List<String> verifyUpdateUserInputs(@Nullable final String accountEnabled,
                                                                                @Nullable final String userIdToUpdate,
                                                                                @Nullable final String userPrincipalNameToUpdate,
                                                                                @Nullable final String forceChangePassword,
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 103..123
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 149..169

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

                          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
                              public static List<String> verifyGetAttachmentInputs(@Nullable final String messageId,
                                                                                   @Nullable final String userPrincipalName,
                                                                                   @Nullable final String attachmentId,
                                                                                   @Nullable final String userId,
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 149..169
                          cs-office-365/src/main/java/io/cloudslang/content/office365/utils/InputsValidation.java on lines 222..242

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

                          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)) {
                                      exceptions.add(String.format(EXCEPTION_NULL_EMPTY, inputName));
                                  } else if (!NumberUtilities.isValidInt(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-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 356..366
                          cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/InputsValidation.java on lines 88..97
                          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 12 locations. Consider refactoring.
                          Open

                              @NotNull
                              private static List<String> addVerifyBoolean(@NotNull List<String> exceptions, @Nullable final String input, @NotNull final String inputName) {
                                  if (isEmpty(input)) {
                                      exceptions.add(String.format(EXCEPTION_NULL_EMPTY, inputName));
                                  } else if (!isValid(input)) {
                          cs-azure/src/main/java/io/cloudslang/content/azure/utils/InputsValidation.java on lines 116..125
                          cs-excel/src/main/java/io/cloudslang/content/excel/utils/InputsValidation.java on lines 149..157
                          cs-hashicorp-terraform/src/main/java/io/cloudslang/content/hashicorp/terraform/utils/InputsValidation.java on lines 251..260
                          cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/utils/InputsValidator.java on lines 132..140
                          cs-microfocus-sitescope/src/main/java/io/cloudslang/content/sitescope/utils/InputsValidation.java on lines 138..146
                          cs-nutanix-prism/src/main/java/io/cloudslang/content/nutanix/prism/utils/InputsValidation.java on lines 64..73
                          cs-oracle-cloud/src/main/java/io/cloudslang/content/oracle/oci/utils/InputsValidation.java on lines 63..72
                          cs-sharepoint/src/main/java/io/cloudslang/content/sharepoint/utils/InputsValidation.java on lines 102..110
                          cs-tesseract/src/main/java/io/cloudslang/content/tesseract/utils/InputsValidation.java on lines 114..122
                          cs-winrm/src/main/java/io/cloudslang/content/winrm/utils/InputsValidation.java on lines 113..121
                          cs-winrm/src/main/java/io/cloudslang/content/winrm/utils/InputsValidation.java on lines 123..131

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

                          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)) {
                                      exceptions.add(String.format(EXCEPTION_NULL_EMPTY, inputName));
                                  } else if (!isValidIpPort(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-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 333..343
                          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-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))) {
                                      exceptions.add(String.format(EXCEPTION_INVALID_LOGIN_TYPE, inputName));
                                  }
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 313..321
                          cs-oauth/src/main/java/io/cloudslang/content/oauth/utils/InputsValidation.java on lines 50..56
                          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> addVerifyUserInputs(@NotNull List<String> exceptions, @Nullable final String userPrincipalName,
                                                                              @Nullable final String userId) {
                                  if (isEmpty(userPrincipalName) && isEmpty(userId)) {
                                      exceptions.add(String.format(EXCEPTION_INVALID_LOGIN_TYPE_REST, USER_PRINCIPAL_NAME, USER_ID));
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 293..301
                          cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 303..311

                          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