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

Summary

Maintainability
F
1 wk
Test Coverage

File AnnotateBinderHelper.java has 778 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* AnnotateBinderHelper.java

    Purpose:
        
    Description:
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 day to fix

    Method processPropertyBindings has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        private void processPropertyBindings(Component comp, String propName) {
            final ComponentCtrl compCtrl = (ComponentCtrl) comp;
    
            //validator and converter information
            ExpressionAnnoInfo validatorInfo = parseValidator(comp, propName);
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 3 hrs 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

    AnnotateBinderHelper has 27 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class AnnotateBinderHelper {
        private final Binder _binder;
    
        public static final String INIT_ANNO = "init";
        public static final String BIND_ANNO = "bind";
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 3 hrs to fix

      Method processPropertyBindings has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void processPropertyBindings(Component comp, String propName) {
              final ComponentCtrl compCtrl = (ComponentCtrl) comp;
      
              //validator and converter information
              ExpressionAnnoInfo validatorInfo = parseValidator(comp, propName);
      Severity: Minor
      Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

        Method processPropertyPromptBindings has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private void processPropertyPromptBindings(Component comp, String propName, Annotation ann,
                    ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
                String expr = null;
                Map<String, String[]> args = null;
                for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

          Method processFormBindings has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private void processFormBindings(Component comp) {
                  final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                  final BindEvaluatorX eval = _binder.getEvaluatorX();
                  //validator information
                  ExpressionAnnoInfo validatorInfo = parseValidator(comp, FORM_ATTR);
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

            Method processCommandBinding has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void processCommandBinding(Component comp, String propName) {
                    final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                    final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, COMMAND_ANNO);
                    if (anncol.size() == 0)
                        return;
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

              Method processFormBindings has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

                  private void processFormBindings(Component comp) {
                      final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                      final BindEvaluatorX eval = _binder.getEvaluatorX();
                      //validator information
                      ExpressionAnnoInfo validatorInfo = parseValidator(comp, FORM_ATTR);
              Severity: Minor
              Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processChildrenPromptBindings has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private void processChildrenPromptBindings(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) {
                      String expr = null;
                      Map<String, String[]> args = null;
                      for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                          final Entry<String, String[]> entry = it.next();
              Severity: Minor
              Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                Method processGlobalCommandBinding has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private void processGlobalCommandBinding(Component comp, String propName) {
                        final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                        final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, GLOBAL_COMMAND_ANNO);
                        if (anncol.size() == 0)
                            return;
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                  Method processPropertySaveBindings has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private void processPropertySaveBindings(Component comp, String propName, Annotation ann,
                              ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
                          String saveExpr = null;
                          final List<String> beforeCmds = new ArrayList<String>();
                          final List<String> afterCmds = new ArrayList<String>();
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                    Method processFormSaveBindings has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private void processFormSaveBindings(Component comp, String formId, Annotation ann,
                                ExpressionAnnoInfo validatorInfo) {
                            String saveExpr = null;
                            final List<String> beforeCmds = new ArrayList<String>();
                            final List<String> afterCmds = new ArrayList<String>();
                    Severity: Minor
                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                      Method processChildrenLoadBindings has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private void processChildrenLoadBindings(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) {
                              String loadExpr = null;
                              final List<String> beforeCmds = new ArrayList<String>();
                              final List<String> afterCmds = new ArrayList<String>();
                      
                      
                      Severity: Minor
                      Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                        Method processPropertyLoadBindings has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private void processPropertyLoadBindings(Component comp, String propName, Annotation ann,
                                    ExpressionAnnoInfo converterInfo) {
                                String loadExpr = null;
                                final List<String> beforeCmds = new ArrayList<String>();
                                final List<String> afterCmds = new ArrayList<String>();
                        Severity: Minor
                        Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                          Method parseTemplate has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private ExpressionAnnoInfo parseTemplate(Component comp, String propName) {
                                  final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, TEMPLATE_ANNO);
                                  if (annos.size() == 0)
                                      return null;
                                  if (annos.size() > 1) {
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processAllComponentsBindings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private void processAllComponentsBindings(Component comp) {
                                  final Binder selfBinder = BinderUtil.getBinder(comp);
                                  //check if a component was binded already(by any binder)
                                  if (selfBinder != null) //this component already binded ! skip all of its children
                                      return;
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processCommandBinding has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private void processCommandBinding(Component comp, String propName) {
                                  final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                                  final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, COMMAND_ANNO);
                                  if (anncol.size() == 0)
                                      return;
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 parseConverter has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private ExpressionAnnoInfo parseConverter(Component comp, String propName) {
                                  final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, CONVERTER_ANNO);
                                  if (annos.size() == 0)
                                      return null;
                                  if (annos.size() > 1) {
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processGlobalCommandBinding has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private void processGlobalCommandBinding(Component comp, String propName) {
                                  final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                                  final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, GLOBAL_COMMAND_ANNO);
                                  if (anncol.size() == 0)
                                      return;
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 parseValidator has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private ExpressionAnnoInfo parseValidator(Component comp, String propName) {
                                  final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, VALIDATOR_ANNO);
                                  if (annos.size() == 0)
                                      return null;
                                  if (annos.size() > 1) {
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processFormLoadBindings has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private void processFormLoadBindings(Component comp, String formId, Annotation ann) {
                                  String loadExpr = null;
                                  final List<String> beforeCmds = new ArrayList<String>();
                                  final List<String> afterCmds = new ArrayList<String>();
                          
                          
                          Severity: Minor
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                            Method parseConverter has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private ExpressionAnnoInfo parseConverter(Component comp, String propName) {
                                    final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, CONVERTER_ANNO);
                                    if (annos.size() == 0)
                                        return null;
                                    if (annos.size() > 1) {
                            Severity: Minor
                            Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                              Method parseValidator has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private ExpressionAnnoInfo parseValidator(Component comp, String propName) {
                                      final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, VALIDATOR_ANNO);
                                      if (annos.size() == 0)
                                          return null;
                                      if (annos.size() > 1) {
                              Severity: Minor
                              Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                                Method parseTemplate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private ExpressionAnnoInfo parseTemplate(Component comp, String propName) {
                                        final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, TEMPLATE_ANNO);
                                        if (annos.size() == 0)
                                            return null;
                                        if (annos.size() > 1) {
                                Severity: Minor
                                Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                                  Method processAllComponentsBindings has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private void processAllComponentsBindings(Component comp) {
                                          final Binder selfBinder = BinderUtil.getBinder(comp);
                                          //check if a component was binded already(by any binder)
                                          if (selfBinder != null) //this component already binded ! skip all of its children
                                              return;
                                  Severity: Minor
                                  Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

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

                                        private void processChildrenLoadBindings(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) {
                                            String loadExpr = null;
                                            final List<String> beforeCmds = new ArrayList<String>();
                                            final List<String> afterCmds = new ArrayList<String>();
                                    
                                    
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processFormLoadBindings has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processFormLoadBindings(Component comp, String formId, Annotation ann) {
                                            String loadExpr = null;
                                            final List<String> beforeCmds = new ArrayList<String>();
                                            final List<String> afterCmds = new ArrayList<String>();
                                    
                                    
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processPropertyPromptBindings has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processPropertyPromptBindings(Component comp, String propName, Annotation ann,
                                                ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
                                            String expr = null;
                                            Map<String, String[]> args = null;
                                            for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processPropertyLoadBindings has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processPropertyLoadBindings(Component comp, String propName, Annotation ann,
                                                ExpressionAnnoInfo converterInfo) {
                                            String loadExpr = null;
                                            final List<String> beforeCmds = new ArrayList<String>();
                                            final List<String> afterCmds = new ArrayList<String>();
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processPropertySaveBindings has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processPropertySaveBindings(Component comp, String propName, Annotation ann,
                                                ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
                                            String saveExpr = null;
                                            final List<String> beforeCmds = new ArrayList<String>();
                                            final List<String> afterCmds = new ArrayList<String>();
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processFormSaveBindings has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processFormSaveBindings(Component comp, String formId, Annotation ann,
                                                ExpressionAnnoInfo validatorInfo) {
                                            String saveExpr = null;
                                            final List<String> beforeCmds = new ArrayList<String>();
                                            final List<String> afterCmds = new ArrayList<String>();
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processChildrenPromptBindings has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processChildrenPromptBindings(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) {
                                            String expr = null;
                                            Map<String, String[]> args = null;
                                            for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                                final Entry<String, String[]> entry = it.next();
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processComponentBindings0 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processComponentBindings0(Component comp) {
                                            final List<String> props = AnnotationUtil.getNonSystemProperties(comp); // look every property has annotation
                                            for (final Iterator<?> it = props.iterator(); it.hasNext();) {
                                                final String propName = (String) it.next();
                                                if (isEventProperty(propName)) {
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 55 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 processPropertyInit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processPropertyInit(Component comp, String propName, Annotation ann,
                                                ExpressionAnnoInfo converterInfo) {
                                            String initExpr = null;
                                    
                                            Map<String, String[]> args = null;
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processChildrenInit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processChildrenInit(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) {
                                            String initExpr = null;
                                    
                                            Map<String, String[]> args = null;
                                            for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processReferenceBinding has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processReferenceBinding(Component comp, String propName, Annotation ann) {
                                            String loadExpr = null;
                                    
                                            Map<String, String[]> args = null;
                                            for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processFormInit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private void processFormInit(Component comp, String formId, Annotation ann) {
                                            String initExpr = null;
                                    
                                            Map<String, String[]> args = null;
                                            for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.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 processPropertySaveBindings has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        private void processPropertySaveBindings(Component comp, String propName, Annotation ann,
                                                ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 35 mins to fix

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

                                          private void processPropertyPromptBindings(Component comp, String propName, Annotation ann,
                                                  ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
                                      Severity: Minor
                                      Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 35 mins to fix

                                        Method processChildrenBindings has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            private void processChildrenBindings(Component comp) {
                                                final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                                                ExpressionAnnoInfo converterInfo = parseConverter(comp, CHILDREN_ATTR);
                                                //scan init first
                                                Collection<Annotation> initannos = compCtrl.getAnnotations(CHILDREN_ATTR, INIT_ANNO);
                                        Severity: Minor
                                        Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 35 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

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

                                            private void processPropertyLoadBindings(Component comp, String propName, Annotation ann,
                                                    ExpressionAnnoInfo converterInfo) {
                                                String loadExpr = null;
                                                final List<String> beforeCmds = new ArrayList<String>();
                                                final List<String> afterCmds = new ArrayList<String>();
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 610..646

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

                                        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 processFormSaveBindings(Component comp, String formId, Annotation ann,
                                                    ExpressionAnnoInfo validatorInfo) {
                                                String saveExpr = null;
                                                final List<String> beforeCmds = new ArrayList<String>();
                                                final List<String> afterCmds = new ArrayList<String>();
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 418..454

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

                                        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 ExpressionAnnoInfo parseTemplate(Component comp, String propName) {
                                                final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, TEMPLATE_ANNO);
                                                if (annos.size() == 0)
                                                    return null;
                                                if (annos.size() > 1) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 789..820
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 822..852

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

                                        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 ExpressionAnnoInfo parseConverter(Component comp, String propName) {
                                                final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, CONVERTER_ANNO);
                                                if (annos.size() == 0)
                                                    return null;
                                                if (annos.size() > 1) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 822..852
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 854..884

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

                                        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 ExpressionAnnoInfo parseValidator(Component comp, String propName) {
                                                final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, VALIDATOR_ANNO);
                                                if (annos.size() == 0)
                                                    return null;
                                                if (annos.size() > 1) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 789..820
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 854..884

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

                                        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 processFormInit(Component comp, String formId, Annotation ann) {
                                                String initExpr = null;
                                        
                                                Map<String, String[]> args = null;
                                                for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 294..320

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

                                        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 processReferenceBinding(Component comp, String propName, Annotation ann) {
                                                String loadExpr = null;
                                        
                                                Map<String, String[]> args = null;
                                                for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 548..573

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                                for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                                    final Entry<String, String[]> entry = it.next();
                                                    final String tag = entry.getKey();
                                                    final String[] tagExpr = entry.getValue();
                                                    if ("value".equals(tag)) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 716..738

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                                for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
                                                    final Entry<String, String[]> entry = it.next();
                                                    final String tag = entry.getKey();
                                                    final String[] tagExpr = entry.getValue();
                                                    if ("value".equals(tag)) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 357..379

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                                for (final Iterator<Entry<String, String[]>> it = attrs.entrySet().iterator(); it.hasNext();) {
                                                    final Entry<String, String[]> entry = it.next();
                                                    final String tag = entry.getKey();
                                                    final String[] tagExpr = entry.getValue();
                                                    if ("value".equals(tag)) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 163..175

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                                for (final Iterator<Entry<String, String[]>> it = attrs.entrySet().iterator(); it.hasNext();) {
                                                    final Entry<String, String[]> entry = it.next();
                                                    final String tag = entry.getKey();
                                                    final String[] tagExpr = entry.getValue();
                                                    if ("value".equals(tag)) {
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 203..215

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

                                        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

                                                try {
                                                    BinderUtil.pushContext().setCurrentLocation(ann.getLocation());
                                                    for (String cmd : cmdExprs) {
                                                        commandBinder.addCommandBinding(comp, propName, cmd, parsedArgs);
                                                    }
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 219..226

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

                                        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

                                                try {
                                                    BinderUtil.pushContext().setCurrentLocation(ann.getLocation());
                                                    for (String cmd : cmdExprs) {
                                                        _binder.addGlobalCommandBinding(comp, propName, cmd, parsedArgs);
                                                    }
                                        zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java on lines 179..186

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

                                        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