Showing 4,829 of 7,767 total issues

File WScroll.ts has 600 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* WScroll.ts

    Purpose:

    Description:
Severity: Major
Found in zul/src/main/resources/web/js/zul/WScroll.ts - About 1 day to fix

    ListModelListProxy has 70 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class ListModelListProxy<E> extends ListModelList<E> implements Proxy, FormProxyObject, Serializable {
        private static final long serialVersionUID = 20210608113022L;
        private ListModelList<E> _cache;
        private ListModelList<E> _origin;
        private boolean _dirty;
    Severity: Major
    Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java - About 1 day to fix

      Function ajax has 257 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          ajax: function( url, options ) {
      
              // If url is an object, simulate pre-1.5 signature
              if ( typeof url === "object" ) {
                  options = url;
      Severity: Major
      Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 day to fix

        File Chart.java has 592 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* Chart.java
        
            Purpose:
                
            Description:
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Chart.java - About 1 day to fix

          ExecutionImpl has 69 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class ExecutionImpl extends AbstractExecution {
              private final ServletContext _ctx;
              private final HttpServletRequest _request;
              private final HttpServletResponse _response;
              private final RequestContext _xelctx;
          Severity: Major
          Found in zk/src/main/java/org/zkoss/zk/ui/http/ExecutionImpl.java - About 1 day to fix

            File KeyFactory.java has 589 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             *  Copyright 2004 Brian S O'Neill
             *
             *  Licensed under the Apache License, Version 2.0 (the "License");
             *  you may not use this file except in compliance with the License.
            Severity: Major
            Found in zkbind/src/main/java/org/zkoss/bind/impl/KeyFactory.java - About 1 day to fix

              Method addTracking has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected void addTracking(List<String> series) {
                      final Binding binding = _ctx.getBinding();
                      final boolean dotracker = !_ctx.ignoreTracker();
              
                      if (binding != null && series != null && !series.isEmpty()) {

              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

              Function parseDate has 252 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  parseDate(
                      txt: string,
                      fmt: string,
                      nonLenient?: boolean,
                      refval?: DateImpl,
              Severity: Major
              Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 1 day to fix

                File Util.java has 580 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 * Licensed to the Apache Software Foundation (ASF) under one or more
                 * contributor license agreements.  See the NOTICE file distributed with
                 * this work for additional information regarding copyright ownership.
                 * The ASF licenses this file to You under the Apache License, Version 2.0
                Severity: Major
                Found in zel/src/main/java/org/zkoss/zel/Util.java - About 1 day to fix

                  Method wireOthers has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private void wireOthers(Object x) {
                          //check methods
                          final Class cls = _controller.getClass();
                          Method[] mtds = cls.getMethods();
                          for (int j = 0; j < mtds.length; ++j) {
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/util/ConventionWire.java - About 1 day 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 syncModel has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public void syncModel(int offset, int limit) {
                          int min = offset;
                          int max = offset + limit - 1;
                  
                          final ListModel model = _grid.getModel();
                  Severity: Minor
                  Found in zul/src/main/java/org/zkoss/zul/impl/GridDataLoader.java - About 1 day 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

                  File HtmlBasedComponent.java has 575 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* HtmlBasedComponent.java
                  
                      Purpose:
                  
                      Description:
                  Severity: Major
                  Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java - About 1 day to fix

                    Method Assignment has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
                    Open

                      final public void Assignment() throws ParseException {
                        if (jj_2_2(4)) {
                          LambdaExpression();
                        } else {
                          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                    Severity: Minor
                    Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 1 day 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 fillShadowElement has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private JSONObject fillShadowElement(HtmlShadowElement se, AbstractComponent current, ListIterator<AbstractComponent> cit) {
                            String name = se.toString();
                            int index = name.lastIndexOf("->");
                            if (index > 0)
                                name = name.substring(index + 2);

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

                        public List<AuResponse> getResponses(Collection<Component> renderedComps) throws IOException {
                            _ending = true; //no more modifying UI (invalidate/addSmartUpdate...)
                    
                            /*        if (log.finerable())
                                        log.finer("ei: "+this+"\nInvalidated: "+_invalidated+"\nSmart Upd: "+_smartUpdated
                    Severity: Minor
                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiVisualizer.java - About 1 day 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

                    File BSHInterpreter.java has 572 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /* BSHInterpreter.java
                    
                        Purpose:
                            
                        Description:
                    Severity: Major
                    Found in zk/src/main/java/org/zkoss/zk/scripting/bsh/BSHInterpreter.java - About 1 day to fix

                      File Element.java has 569 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /* Element.java
                      
                      
                          Purpose:
                          Description:
                      Severity: Major
                      Found in zcommon/src/main/java/org/zkoss/idom/Element.java - About 1 day to fix

                        Method parse has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private Object parse(RequestContext reqctx, InputStream is, String path) throws Exception {
                                final Element root = new SAXBuilder(true, false, true).build(is).getRootElement();
                                final String name = IDOMs.getRequiredAttributeValue(root, "name");
                                if (name.length() == 0)
                                    throw new UiException("The name attribute must be specified, " + root.getLocator() + ", " + path);
                        Severity: Major
                        Found in zk/src/main/java/org/zkoss/zk/ui/http/WpdExtendlet.java - About 1 day to fix

                          Method yylex has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
                          Open

                            public Yytoken yylex() throws java.io.IOException, ParseException {
                              int zzInput;
                              int zzAction;
                          
                              // cached fields:
                          Severity: Minor
                          Found in zcommon/src/main/java/org/zkoss/json/parser/Yylex.java - About 1 day 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 getValue has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public Object getValue(EvaluationContext ctx)
                                      throws ELException {
                          
                                  FunctionMapper fnMapper = ctx.getFunctionMapper();
                          
                          Severity: Minor
                          Found in zel/src/main/java/org/zkoss/zel/impl/parser/AstFunction.java - About 1 day 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