Showing 4,841 of 7,782 total issues

Consider simplifying this complex logical expression.
Open

        if (!nested || (_itemsSpecified && _items == null) || (_endSpecified && _end < _beg)
                || (!_itemsSpecified && !_endSpecified) || !isEffective())
            return;
Severity: Critical
Found in zweb/src/main/java/org/zkoss/web/servlet/dsp/action/ForEach.java - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        if ( ( !support.boxSizingReliable() && isBorderBox ||
    
            // Support: IE 10 - 11+, Edge 15 - 18+
            // IE/Edge misreport `getComputedStyle` of table rows with width/height
            // set in CSS while `offset*` properties report correct values.
    Severity: Critical
    Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

              } else if ((mindex >= 0 && mindex <= i /*&& mmindex >= i location French will lose last char */)
                  || (eindex >= 0 && eindex <= i) || (aa > -1 && aa <= i) || (gg > -1 && gg <= i)) {
                  if (c.match(/\w/)) {
                      ary.push(c);
                  } else {
      Severity: Critical
      Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 1 hr to fix

        Method load has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static final boolean load(String flnm) {
                final InputStream strm = ContentTypes.class.getResourceAsStream(flnm);
                if (strm == null)
                    return false;
        
        
        Severity: Minor
        Found in zcommon/src/main/java/org/zkoss/util/media/ContentTypes.java - About 1 hr to fix

          Method defaultResolveEntity has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected InputSource defaultResolveEntity(String publicId, String systemId)
              throws SAXException {
                  if (systemId == null)
                      return null;
          
          
          Severity: Minor
          Found in zcommon/src/main/java/org/zkoss/idom/input/SAXHandler.java - About 1 hr to fix

            Method getDefaultTLDs has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private static final Map<String, URL> getDefaultTLDs() {
                    Map<String, URL> defURLs = _defURLsRef.get();
                    if (defURLs != null) {
                        return defURLs;
                    }
            Severity: Minor
            Found in zcommon/src/main/java/org/zkoss/xel/taglib/Taglibs.java - About 1 hr to fix

              Method nextToken has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static final Result nextToken(String src, int from,
                  char[] separators, boolean escBackslash, boolean quotAsToken,
                  boolean parenthesis)
                  throws IllegalSyntaxException {
                      final int len = src.length();
              Severity: Minor
              Found in zcommon/src/main/java/org/zkoss/lang/Strings.java - About 1 hr to fix

                Method invoke has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @SuppressWarnings("null") // args[i] can't be null due to earlier checks
                    public Object invoke(ELContext context, Object... args)
                            throws ELException {
                
                        if (context == null) {
                Severity: Minor
                Found in zel/src/main/java/org/zkoss/zel/LambdaExpression.java - About 1 hr to fix

                  Method generateParseException has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    public ParseException generateParseException() {
                      jj_expentries.clear();
                      boolean[] la1tokens = new boolean[62];
                      if (jj_kind >= 0) {
                        la1tokens[jj_kind] = true;
                  Severity: Minor
                  Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 1 hr to fix

                    Method UpdateLineColumn has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      protected void UpdateLineColumn(char c)
                      {
                        column++;
                    
                        if (prevCharIsLF)
                    Severity: Minor
                    Found in zel/src/main/java/org/zkoss/zel/impl/parser/SimpleCharStream.java - About 1 hr to fix

                      Method getValue has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public Object getValue(ELContext context, Object base, Object property) {
                      
                              if (context == null) {
                                  throw new NullPointerException();
                              }
                      Severity: Minor
                      Found in zel/src/main/java/org/zkoss/zel/StaticFieldELResolver.java - About 1 hr to fix

                        Method treeSelect has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method doAfterCompose has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              @Override
                              public void doAfterCompose(final Component comp) throws Exception {
                                  super.doAfterCompose(comp);
                          
                                  button.addEventListener(Events.ON_CLICK, new EventListener<Event>() {

                            Method serveResource has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException {
                                    final WebManager webman = getWebManager();
                                    final WebApp wapp = webman.getWebApp();
                            
                                    final HttpServletRequest httpreq = ResourceHttpServletRequest.getInstance(request);
                            Severity: Minor
                            Found in zk/src/main/java/org/zkoss/zk/ui/http/DHtmlLayoutPortlet.java - About 1 hr to fix

                              Method service has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public void service(AuRequest request, boolean everError) {
                                      final String cmd = request.getCommand();
                                      if (cmd.equals(Events.ON_CLICK) || cmd.equals(Events.ON_DOUBLE_CLICK) || cmd.equals(Events.ON_RIGHT_CLICK)
                                              || cmd.equals(Events.ON_MOUSE_OVER) || cmd.equals(Events.ON_MOUSE_OUT)) {
                                          Events.postEvent(MouseEvent.getMouseEvent(request));
                              Severity: Minor
                              Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java - About 1 hr to fix

                                Method getAttributes has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public Map<String, Object> getAttributes(int scope) {
                                        switch (scope) {
                                        case SPACE_SCOPE:
                                            if (this instanceof IdSpace)
                                                return getAttributes();
                                Severity: Minor
                                Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 1 hr to fix

                                  Method enableServerPush has 33 lines of code (exceeds 25 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 1 hr to fix

                                    Method checkPageRemoved has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private void checkPageRemoved(Set<Component> removed) {
                                            //1. scan once
                                            final Desktop desktop = _exec.getDesktop();
                                            Set<Page> pages = null;
                                            for (Page page : desktop.getPages()) {
                                    Severity: Minor
                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiVisualizer.java - About 1 hr to fix

                                      Method mergeResponses has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private List<AuResponse> mergeResponses(List<AuResponse> responses) {
                                              if (responses.size() >= 2) { // worth merging
                                                  List<AuSetAttribute> bulk = new LinkedList<>();
                                                  ListIterator<AuResponse> iterator = responses.listIterator();
                                                  Object previousDepends = null, currentDepends = null;
                                      Severity: Minor
                                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                        Method getFromNamespace has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected Object getFromNamespace(String name) {
                                                final Scope scope = getCurrent();
                                                if (scope != null) { //null means no scope allowed!
                                                    final Execution exec = Executions.getCurrent();
                                                    if (exec != null && exec != scope) {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language