Showing 4,841 of 7,782 total issues

Function setMatcher has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
    if ( postFilter && !postFilter[ expando ] ) {
        postFilter = setMatcher( postFilter );
    }
    if ( postFinder && !postFinder[ expando ] ) {
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 2 hrs to fix

    Function done has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function done( status, nativeStatusText, responses, headers ) {
                var isSuccess, success, error, response, modified,
                    statusText = nativeStatusText;
    
                // Ignore repeat invocations
    Severity: Major
    Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 2 hrs to fix

      File ProxyHelper.java has 283 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /** ProxyHelper.java.
      
          Purpose:
      
          Description:
      Severity: Minor
      Found in zkbind/src/main/java/org/zkoss/bind/proxy/ProxyHelper.java - About 2 hrs to fix

        Method jjMoveStringLiteralDfa1_2 has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        private int jjMoveStringLiteralDfa1_2(long active0)
        {
           try { curChar = input_stream.readChar(); }
           catch(java.io.IOException e) {
              jjStopStringLiteralDfa_2(0, active0);
        Severity: Major
        Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParserTokenManager.java - About 2 hrs to fix

          Method jjMoveStringLiteralDfa1_1 has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          private int jjMoveStringLiteralDfa1_1(long active0)
          {
             try { curChar = input_stream.readChar(); }
             catch(java.io.IOException e) {
                jjStopStringLiteralDfa_1(0, active0);
          Severity: Major
          Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParserTokenManager.java - About 2 hrs to fix

            Method writeAppInfo has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void writeAppInfo(RequestContext reqctx, OutputStream out, WebApp wapp) throws IOException, ServletException {
                    final String verInfoEnabled = Library.getProperty("org.zkoss.zk.ui.versionInfo.enabled", "true");
                    final boolean exposeVer = "true".equals(verInfoEnabled);
                    final StringBuffer sb = new StringBuffer(256);
                    if (exposeVer)
            Severity: Major
            Found in zk/src/main/java/org/zkoss/zk/ui/http/WpdExtendlet.java - About 2 hrs to fix

              Method execCreateChild0 has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static Component execCreateChild0(CreateInfo ci, Component parent, ComponentInfo childInfo,
                          String replaceableText, Component insertBefore) {
                      Composer composer = childInfo.resolveComposer(ci.page, parent);
                      ComposerExt composerExt = null;
                      boolean bPopComposer = false;
              Severity: Major
              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

                Function resolve has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    function resolve( depth, deferred, handler, special ) {
                                        return function() {
                                            var that = this,
                                                args = arguments,
                                                mightThrow = function() {
                Severity: Major
                Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 2 hrs to fix

                  Function _sanitizeElements has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      const _sanitizeElements = function _sanitizeElements(currentNode) {
                        let content = null;
                  
                        /* Execute a hook if present */
                        _executeHook('beforeSanitizeElements', currentNode, null);
                  Severity: Major
                  Found in zk/src/main/resources/web/js/zk/ext/purify.js - About 2 hrs to fix

                    Function listbox$mold$ has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function listbox$mold$(out) {
                        var uuid = this.uuid,
                            zclsHTML = this.getZclass(),
                            innerWidth = zUtl.encodeXML(this.getInnerWidth()),
                            wdAttr = innerWidth === '100%' ? ' width="100%"' : '',
                    Severity: Major
                    Found in zul/src/main/resources/web/js/zul/sel/mold/listbox.js - About 2 hrs to fix

                      Method normalize has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static final String normalize(String path) {
                              if (path == null)
                                  return "";
                      
                              //remove consecutive slashes
                      Severity: Minor
                      Found in zcommon/src/main/java/org/zkoss/io/Files.java - About 2 hrs 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 parseMethod has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static final MethodInfo parseMethod(String signature) 
                          throws IllegalSyntaxException {
                              int len = signature.length();
                              int j = Strings.skipWhitespaces(signature, 0);
                              int k = Strings.anyOf(signature, "( \t\n\r", j);
                      Severity: Minor
                      Found in zcommon/src/main/java/org/zkoss/lang/Classes.java - About 2 hrs 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 init has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public void init() throws ServletException {
                              final ServletContext ctx = getServletContext();
                              final ServletConfig config = getServletConfig();
                              String param = config.getInitParameter("compress");
                              if (param != null)

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

                          @Command
                          public void treeSelect(
                                  @ContextParam(ContextType.TRIGGER_EVENT) SelectEvent event) {
                      //        Clients.log("selection count before select "
                      //                + treeModel.getSelectionCount());

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

                          private static void outEndJavaScriptFunc(Execution exec, Writer out, String extra, boolean aupg, boolean afterLoad)
                                  throws IOException {
                              final String ac = outResponseJavaScripts(exec, true);
                              if (aupg) {
                                  if (extra.length() > 0 || ac.length() > 0) {
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/sys/HtmlPageRenders.java - About 2 hrs 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 getVisibleChildren has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static Collection<Component> getVisibleChildren(Component comp) {
                              final Collection<Component> children = comp.getChildren();
                              return new AbstractCollection<Component>() {
                                  public int size() {
                                      int size = 0;
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/Components.java - About 2 hrs 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 parsePageDirective has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static void parsePageDirective(PageDefinition pgdef, ProcessingInstruction pi, Map<String, String> params)
                                  throws Exception {
                              for (Map.Entry<String, String> me : pi.parseData().entrySet()) {
                                  final String nm = me.getKey();
                                  final String val = me.getValue();
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 2 hrs 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 getAttributeOrFellow has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public Object getAttributeOrFellow(String name, boolean recurse) {
                              Object val = getAttribute(name);
                              if (val != null || hasAttribute(name))
                                  return val;
                      
                      
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 2 hrs 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 enableServerPush has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private boolean enableServerPush(ServerPush serverPush, boolean enable, Serializable enabler) {
                              synchronized (enablers) {
                                  boolean enablersEmptyBefore = enablers.isEmpty();
                                  if (enable) {
                                      //handle dummy target
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/DesktopImpl.java - About 2 hrs 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 init has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public void init() throws ServletException {
                              final ServletConfig config = getServletConfig();
                              final ServletContext ctx = getServletContext();
                              ctx.setAttribute(ATTR_UPDATE_SERVLET, this);
                      
                      
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/au/http/DHtmlUpdateServlet.java - About 2 hrs 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