Showing 4,834 of 7,774 total issues

File jquery.js has 7143 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v3.5.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 2 wks to fix

    File moment.js has 4580 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    //! moment.js
    //! version : 2.29.4
    //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
    //! license : MIT
    //! momentjs.com
    Severity: Major
    Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 wk to fix

      File d3.js has 3443 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function(){if (!Date.now) Date.now = function() {
        return +new Date;
      };
      try {
        document.createElement("div").style.setProperty("opacity", 0, "");
      Severity: Major
      Found in zktest/src/main/webapp/js/d3.js - About 1 wk to fix

        Function Sizzle has 1734 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        ( function( window ) {
        var i,
            support,
            Expr,
            getText,
        Severity: Major
        Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 wk to fix

          Method jjMoveNfa_1 has a Cognitive Complexity of 413 (exceeds 5 allowed). Consider refactoring.
          Open

          private int jjMoveNfa_1(int startState, int curPos)
          {
             int startsAt = 0;
             jjnewStateCnt = 30;
             int i = 1;

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

          private int jjMoveNfa_2(int startState, int curPos)
          {
             int startsAt = 0;
             jjnewStateCnt = 30;
             int i = 1;

          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 AbstractComponent.java has 2933 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

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

            File ELParser.java has 2789 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* Generated By:JJTree&JavaCC: Do not edit this line. ELParser.java */
            package org.zkoss.zel.impl.parser;
            import java.io.StringReader;
            
            import org.zkoss.zel.ELException;
            Severity: Major
            Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 1 wk to fix

              File Listbox.java has 2658 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

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

                Function parseDate has a Cognitive Complexity of 340 (exceeds 5 allowed). Consider refactoring.
                Open

                    parseDate(
                        txt: string,
                        fmt: string,
                        nonLenient?: boolean,
                        refval?: DateImpl,
                Severity: Minor
                Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 1 wk 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 BinderImpl.java has 2385 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* BinderImpl.java
                
                    Purpose:
                        
                    Description:
                Severity: Major
                Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 6 days to fix

                  Method parseItem has a Cognitive Complexity of 303 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private Object parseItem(PageDefinition pgdef, NodeInfo parent, Element el, AnnotationHelper annHelper,
                              boolean bNativeContent, ParsingState parsingState) throws Exception {
                          final String nm = el.getLocalName();
                          final Namespace ns = el.getNamespace();
                          final String pref = ns != null ? ns.getPrefix() : "";
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 6 days 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 Tree.java has 2159 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* Tree.java
                  
                      Purpose:
                  
                      Description:
                  Severity: Major
                  Found in zul/src/main/java/org/zkoss/zul/Tree.java - About 5 days to fix

                    File ELParserTokenManager.java has 2104 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /* Generated By:JJTree&JavaCC: Do not edit this line. ELParserTokenManager.java */
                    package org.zkoss.zel.impl.parser;
                    import java.io.StringReader;
                    
                    import org.zkoss.zel.ELException;
                    Severity: Major
                    Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParserTokenManager.java - About 5 days to fix

                      File UiEngineImpl.java has 2078 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /* UiEngineImpl.java
                      
                          Purpose:
                              
                          Description:
                      Severity: Major
                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 5 days to fix

                        Method service has a Cognitive Complexity of 276 (exceeds 5 allowed). Consider refactoring.
                        Open

                            @SuppressWarnings({ "rawtypes", "unchecked" })
                            public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
                                final String cmd = request.getCommand();
                                if (cmd.equals(Events.ON_DATA_LOADING)) {
                                    if (_rod) {
                        Severity: Minor
                        Found in zul/src/main/java/org/zkoss/zul/Listbox.java - About 5 days 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

                        AbstractComponent has 263 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        public class AbstractComponent implements Component, ComponentCtrl, java.io.Serializable {
                            private static final Logger log = LoggerFactory.getLogger(AbstractComponent.class);
                            private static final long serialVersionUID = 20100719L;
                        
                            /** Map(Class, Map(String name, Integer flags)). */
                        Severity: Major
                        Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 5 days to fix

                          Method parseLang has a Cognitive Complexity of 223 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private static void parseLang(Document doc, Locator locator, URL url, boolean addon) throws Exception {
                                  final Element root = doc.getRootElement();
                                  final String lang = IDOMs.getRequiredElementValue(root, "language-name");
                                  final LanguageDefinition langdef;
                                  final Device device;
                          Severity: Minor
                          Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionLoaders.java - About 4 days 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 dom.ts has 1579 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /* eslint-disable @typescript-eslint/dot-notation */
                          /* dom.ts
                          
                              Purpose:
                                  Enhance jQuery
                          Severity: Major
                          Found in zk/src/main/resources/web/js/zk/dom.ts - About 4 days to fix

                            File d3.layout.js has 1549 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            (function(){d3.layout = {};
                            // Implements hierarchical edge bundling using Holten's algorithm. For each
                            // input link, a path is computed that travels through the tree, up the parent
                            // hierarchy to the least common ancestor, and then back down to the destination
                            // node. Each path is simply an array of nodes.
                            Severity: Major
                            Found in zktest/src/main/webapp/js/d3.layout.js - About 4 days to fix
                              Severity
                              Category
                              Status
                              Source
                              Language