Showing 7,775 of 7,775 total issues

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

    public static Map<String, Object> evalArgs(BindEvaluatorX eval, Component comp, Map<String, Object> args,
            Map<String, Object> implicit) {
        if (args == null) {
            return null;
        }
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/BindEvaluatorXUtil.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 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 create has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static AccessInfo create(Binding binding, String accessExpr, Class<?> expectedType, ConditionType type,
            String command, boolean ignoreTracker) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/AccessInfo.java - About 45 mins to fix

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

        private Method getCommandMethod(Class<?> clz, String command, CommandMethodInfoProvider cmdInfo,
                Map<Class<?>, Map<String, CachedItem<Method>>> cache, int commandParamCount, boolean isGlobal) {
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (matchMedias != null && args.size() != 0) {
                                  if (!matchMedias[0].isEmpty()) {
                                      for (String s : matchMedias) {
                                          if (!_matchMediaValues.containsKey(s))
                                              continue;
      Severity: Major
      Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

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

            private int doCommand(Component comp, CommandBinding commandBinding, String command, Event evt,
                    Map<String, Object> commandArgs, Set<Property> notifys) {
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

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

              protected void handleNotifyChange(Binder binder, BindContext ctx, Object viewModel, Method m, ParamCall parCall, Set<Property> changes) {

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

                public void addFormLoadBindings(Component comp, String id, String loadExpr, String[] beforeCmds, String[] afterCmds,
                        Map<String, Object> bindingArgs) {
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

              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 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 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 equals has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      static boolean equals(Object[] a, Object[] b) {
                          if (a == b) {
                              return true;
                          }
                          if (a == null || b == null) {
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/KeyFactory.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

                  Avoid deeply nested control flow statements.
                  Open

                                          if (renderer instanceof TemplateRendererCtrl) {
                                              ((TemplateRendererCtrl) renderer).setAttributeName(attr);
                                          }
                  Severity: Major
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (annot.annotationType() == ImmutableFields.class) {
                                                found = true;
                                                break;
                                            }
                    Severity: Major
                    Found in zkbind/src/main/java/org/zkoss/bind/impl/FormBindingImpl.java - About 45 mins to fix

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

                          private void addFormLoadBindings0(Component comp, String formId, String loadExpr, String[] beforeCmds,
                                  String[] afterCmds, Map<String, Object> bindingArgs) {
                      Severity: Minor
                      Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

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

                                private void remove(Entry toRemove) {
                                    Entry[] tab = this.table;
                                    int index = (toRemove.hash & 0x7fffffff) % tab.length;
                        
                                    for (Entry e = tab[index], prev = null; e != null; e = e.next) {
                        Severity: Minor
                        Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.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 newLoadFormBinding has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            protected LoadFormBinding newLoadFormBinding(Component comp, String formId, String loadExpr,
                                    ConditionType conditionType, String command, Map<String, Object> bindingArgs) {
                        Severity: Minor
                        Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ("ZKMatchMedia".equals(name)) {
                                                      matchMedias = value.trim().split(",");
                                                  } else if ("ZKClientInfo".equals(name)) {
                                                      args.put(BinderCtrl.CLIENT_INFO, JSONValue.parse(value));
                                                  }
                          Severity: Major
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language