zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java

Summary

Maintainability
D
2 days
Test Coverage

Method collectSaveFormBinding has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void collectSaveFormBinding(Component comp, SaveFormBinding binding, String command, Event evt,
            Set<Property> validates) {
        //ZK-3185: Enable form validation with reference and collection binding
        String formId = binding.getFormId();
        Component formComp = binding.getComponent();
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 1 hr to fix

    Method collectSaveFormBinding has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        private void collectSaveFormBinding(Component comp, SaveFormBinding binding, String command, Event evt,
                Set<Property> validates) {
            //ZK-3185: Enable form validation with reference and collection binding
            String formId = binding.getFormId();
            Component formComp = binding.getComponent();
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method validateSaveFormBinding has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private boolean validateSaveFormBinding(Component comp, SaveFormBinding binding, String command,
                Map<String, Property[]> validates, boolean valid, Set<Property> notifys) {
            //validate tracked savebinding
            Set<SaveBinding> savebindings = ((BinderCtrl) binding.getBinder())
                    .getFormAssociatedSaveBindings(binding.getComponent());
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 1 hr to fix

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

          private boolean validateSavePropertyBinding(Component comp, SavePropertyBinding binding, String command,
                  Map<String, Property[]> validates, boolean valid, Set<Property> notifys) {
      Severity: Minor
      Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 45 mins to fix

        Method validateSaveFormBinding has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            private boolean validateSaveFormBinding(Component comp, SaveFormBinding binding, String command,
                    Map<String, Property[]> validates, boolean valid, Set<Property> notifys) {
                //validate tracked savebinding
                Set<SaveBinding> savebindings = ((BinderCtrl) binding.getBinder())
                        .getFormAssociatedSaveBindings(binding.getComponent());
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 45 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

            private boolean validateSaveFormBinding(Component comp, SaveFormBinding binding, String command,
                    Map<String, Property[]> validates, boolean valid, Set<Property> notifys) {
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 45 mins to fix

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

              private void collectSavePropertyBinding(Component comp, SavePropertyBinding binding, String command, Event evt,
                      Set<Property> validates, boolean checkFormFieldFromCollection) {
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 45 mins to fix

            Method validateSavePropertyAfter has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                private boolean validateSavePropertyAfter(Component comp, String command, Map<String, Property[]> validates,
                        boolean valid, Set<Property> notifys) {
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

              Method validateSavePropertyBefore has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  private boolean validateSavePropertyBefore(Component comp, String command, Map<String, Property[]> validates,
                          boolean valid, Set<Property> notifys) {
              Severity: Minor
              Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

                Method collectSavePropertyBinding has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    private void collectSavePropertyBinding(Component comp, SavePropertyBinding binding, String command, Event evt,
                                                            Set<Property> validates) {
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

                  Method collectSaveFormBinding has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      private void collectSaveFormBinding(Component comp, SaveFormBinding binding, String command, Event evt,
                              Set<Property> validates) {
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

                    Method validateSaveAfter has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public boolean validateSaveAfter(Component comp, String command, Map<String, Property[]> validates, boolean valid,
                                Set<Property> notifys) {
                    Severity: Minor
                    Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

                      Method validateSaveBefore has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public boolean validateSaveBefore(Component comp, String command, Map<String, Property[]> validates, boolean valid,
                                  Set<Property> notifys) {
                      Severity: Minor
                      Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

                        Method validateSaveFormBefore has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            private boolean validateSaveFormBefore(Component comp, String command, Map<String, Property[]> validates,
                                    boolean valid, Set<Property> notifys) {
                        Severity: Minor
                        Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

                          Method validateSaveFormAfter has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              private boolean validateSaveFormAfter(Component comp, String command, Map<String, Property[]> validates,
                                      boolean valid, Set<Property> notifys) {
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 35 mins to fix

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

                                private boolean validateSavePropertyBefore(Component comp, String command, Map<String, Property[]> validates,
                                        boolean valid, Set<Property> notifys) {
                                    final List<SavePropertyBinding> bindings = _infoProvider.getSaveBeforeBindings().get(command); //_saveBeforeBindings.get(command);
                                    boolean r = valid;
                                    if (bindings != null) {
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 145..155
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 179..189

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

                            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

                                private boolean validateSaveFormBefore(Component comp, String command, Map<String, Property[]> validates,
                                        boolean valid, Set<Property> notifys) {
                                    final List<SaveFormBinding> bindings = _infoProvider.getSaveFormBeforeBindings().get(command); //_saveFormBeforeBindings.get(command);
                                    boolean r = valid;
                                    if (bindings != null) {
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 132..142
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 179..189

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

                            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

                                private boolean validateSaveFormAfter(Component comp, String command, Map<String, Property[]> validates,
                                        boolean valid, Set<Property> notifys) {
                                    final List<SaveFormBinding> bindings = _infoProvider.getSaveFormAfterBindings().get(command); //_saveFormBeforeBindings.get(command);
                                    boolean r = valid;
                                    if (bindings != null) {
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 132..142
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 145..155

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

                            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 boolean validateSaveAfter(Component comp, String command, Map<String, Property[]> validates, boolean valid,
                                        Set<Property> notifys) {
                                    boolean r = valid;
                                    r &= validateSavePropertyAfter(comp, command, validates, r, notifys);
                                    r &= validateSaveFormAfter(comp, command, validates, r, notifys);
                            Severity: Minor
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java and 1 other location - About 45 mins to fix
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 123..129

                            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

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

                                public boolean validateSaveBefore(Component comp, String command, Map<String, Property[]> validates, boolean valid,
                                        Set<Property> notifys) {
                                    boolean r = valid;
                                    r &= validateSavePropertyBefore(comp, command, validates, r, notifys);
                                    r &= validateSaveFormBefore(comp, command, validates, r, notifys);
                            Severity: Minor
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java and 1 other location - About 45 mins to fix
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 157..163

                            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

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

                                private void collectSavePropertyAfter(Component comp, String command, Event evt, Set<Property> validates) {
                                    final List<SavePropertyBinding> bindings = _infoProvider.getSaveAfterBindings().get(command); //_saveAfterBindings.get(command);
                                    if (bindings != null) {
                                        for (SavePropertyBinding binding : bindings) {
                                            collectSavePropertyBinding(comp, binding, command, evt, validates);
                            Severity: Major
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java and 3 other locations - About 45 mins to fix
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 76..83
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 86..93
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 112..119

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

                            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

                                private void collectSavePropertyBefore(Component comp, String command, Event evt, Set<Property> validates) {
                                    final List<SavePropertyBinding> bindings = _infoProvider.getSaveBeforeBindings().get(command); //_saveBeforeBindings.get(command);
                                    if (bindings != null) {
                                        for (SavePropertyBinding binding : bindings) {
                                            collectSavePropertyBinding(comp, binding, command, evt, validates);
                            Severity: Major
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java and 3 other locations - About 45 mins to fix
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 86..93
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 102..109
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 112..119

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

                            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

                                private void collectSaveFormAfter(Component comp, String command, Event evt, Set<Property> validates) {
                                    final List<SaveFormBinding> bindings = _infoProvider.getSaveFormAfterBindings().get(command); //_saveFormAfterBindings.get(command);
                                    if (bindings != null) {
                                        for (SaveFormBinding binding : bindings) {
                                            collectSaveFormBinding(comp, binding, command, evt, validates);
                            Severity: Major
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java and 3 other locations - About 45 mins to fix
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 76..83
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 86..93
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 102..109

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

                            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

                                private void collectSaveFormBefore(Component comp, String command, Event evt, Set<Property> validates) {
                                    final List<SaveFormBinding> bindings = _infoProvider.getSaveFormBeforeBindings().get(command); //_saveFormBeforeBindings.get(command);
                                    if (bindings != null) {
                                        for (SaveFormBinding binding : bindings) {
                                            collectSaveFormBinding(comp, binding, command, evt, validates);
                            Severity: Major
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java and 3 other locations - About 45 mins to fix
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 76..83
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 102..109
                            zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 112..119

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

                            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

                                private void clearValidationMessage(Binder binder, Component component, String attr) {
                                    ValidationMessages vmsgs = ((BinderCtrl) binder).getValidationMessages();
                                    if (vmsgs != null) {
                                        vmsgs.clearMessages(component, attr);
                                    }
                            Severity: Minor
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java and 1 other location - About 30 mins to fix
                            zkbind/src/main/java/org/zkoss/bind/impl/AbstractBindingHandler.java on lines 55..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 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