Showing 7,775 of 7,775 total issues

Consider simplifying this complex logical expression.
Open

        if (!"horizontal".equals(orient) && !"top".equals(orient) && !"bottom".equals(orient)
                && !"vertical".equals(orient) && !"right".equals(orient) && !"left".equals(orient))
            throw new WrongValueException("Unknow orient : " + orient);
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Tabbox.java - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                                if (firstItemIndex <= index && index <= lastItemIndex // ZK-2658
                                        && !curSeldItems.contains(item)
                                        && (!paging || (from <= index && index < to))
                                ) {
                                    removeItemFromSelection(item);
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Listbox.java - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                  else if (!"rect".equals(shape) && !"rectangle".equals(shape) && !"circle".equals(shape)
                          && !"circ".equals(shape) && !"polygon".equals(shape) && !"poly".equals(shape))
                      throw new WrongValueException("Unknown shape: " + shape);
      Severity: Major
      Found in zul/src/main/java/org/zkoss/zul/Area.java - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                    if (0 < f[1]) {
                        var k = a.substr(e, f[1] - e),
                            l = [],
                            l = k.match(/([\x09\x0a\x0d\x20-\x7e]{5,})/g);
                        if (null == l) l = [];
        Severity: Major
        Found in zktest/src/main/webapp/test2/js/zk-3913-PDF417lib.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                      if ( support.qsa &&
                          !nonnativeSelectorCache[ selector + " " ] &&
                          ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
          
                          // Support: IE 8 only
          Severity: Major
          Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

            if ( !support.focusin ) {
                jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
            
                    // Attach a single capturing handler on the document while someone wants focusin/focusout
                    var handler = function( event ) {
            Severity: Major
            Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                      if ( !rneedsContext.test( selectors ) ) {
                          for ( ; i < l; i++ ) {
                              cur = this[ i ];
                              let wgt = (hasZTag || hasZID) ? cur[zk.Widget._TARGET] || zk.Widget.$(cur, {exact: 1}) : false;
                              for ( ; cur && cur !== context; cur = ((hasZTag || hasZID) && wgt ? wgt.$n() : cur.parentNode)) {
              Severity: Major
              Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                        if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
                            context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
                
                            context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
                                .replace( runescape, funescape ), context ) || [] )[ 0 ];
                Severity: Major
                Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if ( matcher[ expando ] ) {
                  
                                  // Find the next relative operator (if any) for proper handling
                                  j = ++i;
                                  for ( ; j < len; j++ ) {
                  Severity: Major
                  Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if (
                                !(
                                    (milliseconds >= 0 && days >= 0 && months >= 0) ||
                                    (milliseconds <= 0 && days <= 0 && months <= 0)
                                )
                    Severity: Major
                    Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                            if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
                              serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
                            }
                      Severity: Major
                      Found in zk/src/main/resources/web/js/zk/ext/purify.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                              } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
                                return false;
                              } else ;
                        Severity: Major
                        Found in zk/src/main/resources/web/js/zk/ext/purify.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                          if ((clearAllSiblings || isTargetWgt) && (isHorizontal && isRow) || (!isHorizontal && !isRow)) {
                                              fcc.style.flexGrow = '';
                                              jqFcc.removeClass(flexItemClass);
                                              if (fcc != c && !c.style[dim])
                                                  c.style[dim] = '';
                          Severity: Major
                          Found in zk/src/main/resources/web/js/zk/flex.ts - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                        if (v != 410 //not timeout (SC_GONE)
                                            && !(reqInf.rtags && reqInf.rtags.isDummy) //ZK-3304: dummy request shouldn't reset timeout
                                            && (!reqInf.rtags || !reqInf.rtags.onTimer || zk.timerAlive)) // Bug ZK-2720 only timer-keep-alive should reset the timeout
                                            zAu._resetTimeout();
                            Severity: Major
                            Found in zk/src/main/resources/web/js/zk/au.ts - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                          if ((wgt._vflex === undefined || (wgt._vflexsz && wgt._vflex == 'min'))
                                              && (wgt._hflex === undefined || (wgt._hflexsz && wgt._hflex == 'min')))
                                              return;
                              Severity: Major
                              Found in zk/src/main/resources/web/js/zk/flex.ts - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                            if ((v = response.headers.get('ZK-Error'))
                                                && !zAu.onResponseError(response, v = zk.parseInt(v) ?? v)
                                                && (v == 5501 || v == 5502) //Handle only ZK's SC_OUT_OF_SEQUENCE or SC_ACTIVATION_TIMEOUT
                                                && zAu.confirmRetry('FAILED_TO_RESPONSE',
                                                    v == 5501 ? 'Request out of sequence' : 'Activation timeout')) {
                                Severity: Major
                                Found in zk/src/main/resources/web/js/zk/au.ts - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if (p && (!zk.isLoaded('zul.grid') || !(p instanceof zul.grid.Row))
                                              && (!zk.isLoaded('zul.sel') || (!(p instanceof zul.sel.Listitem) && !(p instanceof zul.sel.Treerow))))
                                              tevt.stopPropagation();
                                  Severity: Major
                                  Found in zk/src/main/resources/web/js/zk/domtouch.ts - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if ((v = node?.clientWidth) && ofs[0] > (v + zkn.sumStyles('l', jqBorders)) && ofs[0] < (node.offsetWidth - zkn.sumStyles('r', jqBorders))
                                            || (v = node?.clientHeight) && ofs[1] > (v + zkn.sumStyles('t', jqBorders)) && ofs[1] < (node.offsetHeight - zkn.sumStyles('b', jqBorders))) //scrollbar
                                                return;
                                    Severity: Major
                                    Found in zk/src/main/resources/web/js/zk/drag.ts - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if (p && (!zk.isLoaded('zul.grid') || !(p instanceof zul.grid.Row))
                                                  && (!zk.isLoaded('zul.sel') || (!(p instanceof zul.sel.Listitem) && !(p instanceof zul.sel.Treerow))))
                                              tevt.stopPropagation();
                                      Severity: Major
                                      Found in zk/src/main/resources/web/js/zk/domtouch.ts - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                if ((this.needV && domBottom <= viewBottom && domTop >= viewTop)
                                                    || (this.needH && domRight <= viewRight && domLeft >= viewLeft))
                                                    return true;
                                                else
                                                    return false;
                                        Severity: Major
                                        Found in zul/src/main/resources/web/js/zul/Scrollbar.ts - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language