Showing 4,841 of 7,782 total issues

File Configuration.java has 1528 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* Configuration.java

    Purpose:
        
    Description:
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java - About 4 days to fix

    File au.ts has 1505 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* au.ts
    
        Purpose:
            ZK Client Engine
        Description:
    Severity: Major
    Found in zk/src/main/resources/web/js/zk/au.ts - About 4 days to fix

      File Parser.java has 1497 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* Parser.java
      
          Purpose:
              
          Description:
      Severity: Major
      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 3 days to fix

        Method jjMoveNfa_0 has a Cognitive Complexity of 195 (exceeds 5 allowed). Consider refactoring.
        Open

        private int jjMoveNfa_0(int startState, int curPos)
        {
           int startsAt = 0;
           jjnewStateCnt = 8;
           int i = 1;
        Severity: Minor
        Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParserTokenManager.java - About 3 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 DesktopImpl.java has 1462 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

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

          Configuration has 192 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class Configuration {
              private static final Logger log = LoggerFactory.getLogger(Configuration.class);
          
              private static final String PROP_EXPRESS_FACTORY = "org.zkoss.xel.ExpressionFactory.class";
          
          
          Severity: Major
          Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java - About 3 days to fix

            Method parse has a Cognitive Complexity of 184 (exceeds 5 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: Minor
            Found in zk/src/main/java/org/zkoss/zk/ui/http/WpdExtendlet.java - About 3 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

            Function createDOMPurify has 735 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function createDOMPurify() {
                let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
                const DOMPurify = root => createDOMPurify(root);
            
                /**
            Severity: Major
            Found in zk/src/main/resources/web/js/zk/ext/purify.js - About 3 days to fix

              Method Compare has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
              Open

                final public void Compare() throws ParseException {
                  Concatenation();
                  label_10:
                  while (true) {
                    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              Severity: Minor
              Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 3 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

              Listbox has 178 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public class Listbox extends MeshElement {
                  private static final long serialVersionUID = 2009111111L;
                  public static final String LOADING_MODEL = "org.zkoss.zul.loadingModel";
                  public static final String SYNCING_MODEL = "org.zkoss.zul.syncingModel";
              
              
              Severity: Major
              Found in zul/src/main/java/org/zkoss/zul/Listbox.java - About 3 days to fix

                File HtmlShadowElement.java has 1325 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

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

                  File zk-3913-PDF417lib.js has 1305 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*The MIT License (MIT)
                  
                  Copyright (c) 2014 James Liu j@jamesliu.info
                  */
                  
                  
                  Severity: Major
                  Found in zktest/src/main/webapp/test2/js/zk-3913-PDF417lib.js - About 3 days to fix

                    File Grid.java has 1280 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

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

                      ELParser has 160 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      @SuppressWarnings("all") // Ignore warnings in generated code
                      public class ELParser/*@bgen(jjtree)*/implements ELParserTreeConstants, ELParserConstants {/*@bgen(jjtree)*/
                        protected JJTELParserState jjtree = new JJTELParserState();
                          public static Node parse(String ref) throws ELException {
                              try {
                      Severity: Major
                      Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 3 days to fix

                        Tree has 158 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        @SuppressWarnings("serial")
                        public class Tree extends MeshElement {
                            private static final Logger log = LoggerFactory.getLogger(Tree.class);
                            private static final String ATTR_ON_INIT_RENDER_POSTED = "org.zkoss.zul.Tree.onInitLaterPosted";
                            public static final int DEFAULT_THROTTLE_MILLIS = 300;
                        Severity: Major
                        Found in zul/src/main/java/org/zkoss/zul/Tree.java - About 3 days to fix

                          BinderImpl has 148 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          public class BinderImpl implements Binder, BinderCtrl, Serializable {
                              private static final long serialVersionUID = 1463169907348730644L;
                          
                              private static final Logger _log = LoggerFactory.getLogger(BinderImpl.class);
                          
                          
                          Severity: Major
                          Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 2 days to fix

                            Method service has a Cognitive Complexity of 142 (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();
                                    boolean isSelModel = _model instanceof Selectable;
                                    if (cmd.equals(Events.ON_SELECT)) {
                            Severity: Minor
                            Found in zul/src/main/java/org/zkoss/zul/Tree.java - About 2 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

                            Method parseItems has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private void parseItems(final PageDefinition pgdef, final NodeInfo parent, Collection items,
                                        AnnotationHelper annHelper, boolean bNativeContent) throws Exception {
                                    LanguageDefinition parentlang = getLanguageDefinition(parent);
                                    if (parentlang == null)
                                        parentlang = pgdef.getLanguageDefinition();
                            Severity: Minor
                            Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 2 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

                            DesktopImpl has 137 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            public class DesktopImpl implements Desktop, DesktopCtrl, java.io.Serializable {
                                private static final Logger log = LoggerFactory.getLogger(DesktopImpl.class);
                                private static final long serialVersionUID = 20101123L;
                            
                                /** Represents media stored with {@link #getDownloadMediaURI}.
                            Severity: Major
                            Found in zk/src/main/java/org/zkoss/zk/ui/impl/DesktopImpl.java - About 2 days to fix

                              File PageImpl.java has 1062 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /* PageImpl.java
                              
                                  Purpose:
                              
                                  Description:
                              Severity: Major
                              Found in zk/src/main/java/org/zkoss/zk/ui/impl/PageImpl.java - About 2 days to fix
                                Severity
                                Category
                                Status
                                Source
                                Language