Showing 7,775 of 7,775 total issues

Consider simplifying this complex logical expression.
Open

                    } else if (c1 == '8' || c1 == '9' || c1 == '\n' || c1 == '\r' || c1 == '\u2028' || c1 == '\u2029') {

                        // '8' and '9' are not valid octal escape sequences, and the other four characters
                        // are LineTerminators, which are not allowed as escape sequences. So we leave it as is
                        // and expect the corresponding JavaScript engine to fail (except in the case of slash + '\n',
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/JavaScriptEscapeUtil.java - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                                if (!((cf >= '0' && cf <= '9') || (cf >= 'A' && cf <= 'F') || (cf >= 'a' && cf <= 'f'))) {
                                    break;
                                }
    Severity: Major
    Found in zcommon/src/main/java/org/zkoss/lang/JavaScriptEscapeUtil.java - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                                  if (!((cf >= '0' && cf <= '9') || (cf >= 'A' && cf <= 'F') || (cf >= 'a' && cf <= 'f'))) {
                                      break;
                                  }
      Severity: Major
      Found in zcommon/src/main/java/org/zkoss/lang/JavaScriptEscapeUtil.java - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if (_type == null && _id == null && _classes.isEmpty() && _pseudoClasses.isEmpty() && _attributes.isEmpty()
                        && _pseudoElements.isEmpty())
                    return "*";
        Severity: Major
        Found in zk/src/main/java/org/zkoss/zk/ui/select/impl/SimpleSelectorSequence.java - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                              if ((cc < 'a' || cc > 'z') && (cc < 'A' || cc > 'Z') && (cc < '0' || cc > '9'))
                                  throw new UiException(
                                          message("Invalid extension; only letters and numbers are allowed: " + ext, elm));
          Severity: Major
          Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionLoaders.java - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                                            if ((cc < 'a' || cc > 'z') && (cc < 'A'
                                                    || cc > 'Z') && (cc < '0' || cc > '9'))
                                                return false;
            Severity: Major
            Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/impl/AnnotationHelper.java - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                                  if ((cc >= 'a' && cc <= 'z') || (cc >= 'A' && cc <= 'Z')
                                          || cc == '_' || cc == '$') {
                                      for (; j < len; ++j) {
                                          switch (cc = val.charAt(j)) {
                                          case '(':
              Severity: Major
              Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/impl/AnnotationHelper.java - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                                        if (!isZkAttr(langdef, attrns) && !isZKNamespace(attURI) && !"xmlns".equals(attPref)
                                                && !("xmlns".equals(attnm) && "".equals(attPref))
                                                && !"http://www.w3.org/2001/XMLSchema-instance".equals(attURI)) {
                
                                            // Bug ZK-2995
                Severity: Major
                Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                                  if (!"xmlns".equals(attnm) && !"xml".equals(attnm) && !attURI.contains("w3.org")
                                          && (attPref == null || (!"xmlns".equals(attPref) && !"xml".equals(attPref))))
                                      params.put(attnm, attval);
                  Severity: Major
                  Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                    if (!"xmlns".equals(attnm) && !"xml".equals(attnm) && !attURI.contains("w3.org")
                                            && (attPref == null || (!"xmlns".equals(attPref) && !"xml".equals(attPref))))
                                        warnWrongZkAttr(attr);
                    Severity: Major
                    Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                                      if (isZkElement(langdef, e, bNativeContent) && ("attribute".equals(n) || "custom-attributes".equals(n)
                                              || "variables".equals(n) || "template".equals(n) || "zscript".equals(n))) { //we have to skip zscript because of B50-3259479
                                          zkElem = n;
                                          textAsAllowed = false;
                                          //unable to handle them because EL/zscript might affect
                      Severity: Major
                      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                                    if (!bNativeContent && !bNative && (shouldIgnoreAnnotNamespace
                                                            || (attURI.length() == 0 || LanguageDefinition.ZK_NAMESPACE.endsWith(attURI)))
                                                            && AnnotationHelper.isAnnotation(attvaltrim)) {
                                                        if (attrAnnHelper == null)
                                                            attrAnnHelper = new AnnotationHelper();
                        Severity: Major
                        Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if (name == null || name.length() == 0 || namespace == null || namespace.length() == 0 || pageRenderer == null
                                          || locator == null)
                                      throw new IllegalArgumentException();
                          Severity: Major
                          Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/LanguageDefinition.java - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if (this == comp || comp._parent != null || comp._next != null || comp._prev != null || comp._chdinf != null
                                            || comp._page != null)
                                        throw new IllegalStateException();
                            Severity: Major
                            Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                              if (ownerPage == null //detached
                                                      || (_pgInvalid != null && _pgInvalid.contains(ownerPage))
                                                      || isAncestor(_invalidated, owner, true) || isAncestor(_attached, owner, true)
                                                      || isAncestor(removed, owner, true)) {
                                                  addPageRemoved(page);
                              Severity: Major
                              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiVisualizer.java - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if (_recovering || _disabled || page == null || page instanceof VolatilePage || !_exec.isAsyncUpdate(page)
                                                || isCUDisabled(comp))
                                            return; //nothing to do
                                Severity: Major
                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiVisualizer.java - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                      if ((val == null || (val instanceof Serializable) || (val instanceof Externalizable))
                                                              && !(val instanceof Component) && (filter == null || filter.accept(nm, val))) {
                                                          s.writeObject(nm);
                                                          s.writeObject(val);
                                                      }
                                  Severity: Major
                                  Found in zk/src/main/java/org/zkoss/zk/scripting/bsh/BSHInterpreter.java - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                    if (!_multiple || (!paging && isAllRendered() && (curSeldItems == null || curSeldItems.size() <= 1))) {
                                                        final Treeitem item = curSeldItems != null && curSeldItems.size() > 0
                                                                ? curSeldItems.iterator().next() : null;
                                                        selectItem(item);
                                                        if (_model instanceof TreeSelectableModel) {
                                    Severity: Major
                                    Found in zul/src/main/java/org/zkoss/zul/Tree.java - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if (parent != null && !(parent instanceof Window) && !(parent instanceof Groupbox) && !(parent instanceof Panel)
                                                      && !(parent instanceof Tab) && !(parent instanceof LayoutRegion))
                                                  throw new UiException("Wrong parent: " + parent);
                                      Severity: Major
                                      Found in zul/src/main/java/org/zkoss/zul/Caption.java - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                if (Double.compare(lowerBound, _lowerBound) != 0 || Double.compare(upperBound, _upperBound) != 0
                                                        || Double.compare(startAngle, _startAngle) != 0 || Double.compare(extent, _extent) != 0
                                                        || Double.compare(majorTickInterval, _majorTickInterval) != 0
                                                        || Double.compare(minorTickCount, _minorTickCount) != 0) {
                                                    _lowerBound = lowerBound;
                                        Severity: Major
                                        Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language