Showing 4,841 of 7,782 total issues

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 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 collectSavePropertyBinding has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      Method 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 addPropertyInitBinding has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public void addPropertyInitBinding(Component comp, String attr, String initExpr, Map<String, Object> initArgs,
                  String converterExpr, Map<String, Object> converterArgs) {
      Severity: Minor
      Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

        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

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

              private void addPropertyInitBinding0(Component comp, String attr, String initExpr, Map<String, Object> bindingArgs,
                      String converterExpr, Map<String, Object> converterArgs) {
          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 (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

              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

                Avoid deeply nested control flow statements.
                Open

                                                if (wve != null) {
                                                    Component c = wve.getComponent();
                                                    if (c == null)
                                                        c = wvc;
                                                    Clients.wrongValue(c, wve.getMessage());
                Severity: Major
                Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.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 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 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) {

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

                                    public List<Binding> getLoadPromptBindings(Component comp, String attr) {
                                        checkInit();
                                        final List<Binding> bindings = new ArrayList<Binding>();
                                        final BindingKey bkey = getBindingKey(comp, attr);
                                        final List<LoadPropertyBinding> loadBindings = _propertyBindingHandler.getLoadPromptBindings(bkey);
                                Severity: Minor
                                Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.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 ("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 testBindingRendererCase has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      private boolean testBindingRendererCase(LoadBinding binding) {
                                          if (binding instanceof LoadChildrenBinding)
                                              return true;
                                          if (binding instanceof LoadPropertyBinding) {
                                              LoadPropertyBinding lb = (LoadPropertyBinding) binding;
                                  Severity: Minor
                                  Found in zkbind/src/main/java/org/zkoss/bind/tracker/impl/TrackerImpl.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