Showing 4,841 of 7,782 total issues

Method process has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void process(Session sess, HttpServletRequest request, HttpServletResponse response, PageDefinition pagedef,
            String path) throws ServletException, IOException {
        final WebApp wapp = sess.getWebApp();
        final WebAppCtrl wappc = (WebAppCtrl) wapp;

Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/http/ZumlExtendlet.java - About 1 hr to fix

    Method parseContent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static final ZScript parseContent(String content, int lineno) {
            String prefix = null, zslang = null;
            final int len = content != null ? content.length() : 0;
            if (len > 0) {
                //Don't generate prefix if content is empty (i.e., keep empty)
    Severity: Minor
    Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/ZScript.java - About 1 hr to fix

      Method getCache has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @SuppressWarnings("unchecked")
          private static final ResourceCache<PageDefinition> getCache(WebApp wapp) {
              ResourceCache<PageDefinition> cache = (ResourceCache<PageDefinition>) wapp.getAttribute(ATTR_PAGE_CACHE);
              if (cache == null) {
                  synchronized (PageDefinitions.class) {
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinitions.java - About 1 hr to fix

        Method getIndex has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static int getIndex(ShadowElement owner, Component insertion, Map<Component, Integer> cacheMap) {
                if (insertion == null)
                    return -1;
                if (insertion.getParent() == null) {
                    if (owner == null) {
        Severity: Minor
        Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java - About 1 hr to fix

          Method writeObject has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
                  s.defaultWriteObject();
          
                  s.writeObject(_langdef != null ? _langdef.getName() : null);
                  s.writeObject(_owner != null ? _owner.getUuid() : null);
          Severity: Minor
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/PageImpl.java - About 1 hr to fix

            Method setBindingArgs has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public void setBindingArgs(final Map<String, Object> bindingArgs) {
                    this._bindingArgs = bindingArgs;
                    _paramResolvers.put(BindingParam.class, new ParamResolver<Annotation>() {
                        public Object resolveParameter(Annotation anno, Class<?> returnType, Supplier<String> parameterName) {
                            Object val = bindingArgs.get(getAnnotatedParameterName(BindingParam.class, ((BindingParam) anno).value(), parameterName));
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/ParamCall.java - About 1 hr to fix

              Method parseValidator has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private ExpressionAnnoInfo parseValidator(Component comp, String propName) {
                      final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, VALIDATOR_ANNO);
                      if (annos.size() == 0)
                          return null;
                      if (annos.size() > 1) {
              Severity: Minor
              Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                Method parseTemplate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private ExpressionAnnoInfo parseTemplate(Component comp, String propName) {
                        final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, TEMPLATE_ANNO);
                        if (annos.size() == 0)
                            return null;
                        if (annos.size() > 1) {
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                  Method parseConverter has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private ExpressionAnnoInfo parseConverter(Component comp, String propName) {
                          final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, CONVERTER_ANNO);
                          if (annos.size() == 0)
                              return null;
                          if (annos.size() > 1) {
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

                    Method removeBindings0 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private void removeBindings0(Component comp) {
                            checkInit();
                            if (_rootComp == comp) {
                                //the binder component was detached, unregister queue
                                unsubscribeQueue(_quename, _quescope, _queueListener);
                    Severity: Minor
                    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr to fix

                      Method insertBefore has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public boolean insertBefore(Component newChild, Component refChild) {
                              if (newChild instanceof Rows) {
                                  if (super.insertBefore(newChild, refChild)) {
                                      _rows = (Rows) newChild;
                                      return true;
                      Severity: Minor
                      Found in zul/src/main/java/org/zkoss/zul/Grid.java - About 1 hr to fix

                        Method ungroup has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public void ungroup(boolean ascending) {
                                final Comparator<?> cmpr = ascending ? _sortAsc : _sortDsc;
                                if (cmpr != null) {
                        
                                    final Listbox listbox = getListbox();
                        Severity: Minor
                        Found in zul/src/main/java/org/zkoss/zul/Listheader.java - About 1 hr to fix

                          Method insertBefore has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public boolean insertBefore(Component newChild, Component refChild) {
                                  if (newChild instanceof Caption) {
                                      refChild = getFirstChild();
                                      //always makes caption as the first child
                                      if (super.insertBefore(newChild, refChild)) {
                          Severity: Minor
                          Found in zul/src/main/java/org/zkoss/zul/Panel.java - About 1 hr to fix

                            Method addToolbar has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public boolean addToolbar(String name, Toolbar toolbar) {
                                    Component refChild = null;
                                    if ("tbar".equals(name)) {
                                        if (_tbar != null)
                                            throw new UiException("Only one top toolbar child is allowed: " + this);
                            Severity: Minor
                            Found in zul/src/main/java/org/zkoss/zul/Panel.java - About 1 hr to fix

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

                                  public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
                                      final String cmd = request.getCommand();
                                      if (cmd.equals(Events.ON_OPEN)) {
                                          OpenEvent evt = OpenEvent.getOpenEvent(request);
                                          _open = evt.isOpen();
                              Severity: Minor
                              Found in zul/src/main/java/org/zkoss/zul/Group.java - About 1 hr to fix

                                Method setValue has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public void setValue(Comparable<?> series, Comparable<?> category, Number value) {
                                        List<Comparable<?>> key = new ArrayList<Comparable<?>>(2);
                                        key.add(series);
                                        key.add(category);
                                
                                
                                Severity: Minor
                                Found in zul/src/main/java/org/zkoss/zul/SimpleCategoryModel.java - About 1 hr to fix

                                  Method insertBefore has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public boolean insertBefore(Component child, Component refChild) {
                                          boolean sel = !getChildren().stream().filter(Component::isVisible).findAny().isPresent(), desel = false;
                                          final Tab newtab = (Tab) child;
                                          if (!sel && newtab.isSelected()) {
                                              if (newtab.getTabbox() != null) // B65-ZK-1597
                                  Severity: Minor
                                  Found in zul/src/main/java/org/zkoss/zul/Tabs.java - About 1 hr to fix

                                    Method setThreadLocals has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        @SuppressWarnings("unchecked")
                                        private void setThreadLocals() {
                                            if (_threadLocals != null) {
                                                try {
                                                    Class cls = Classes

                                      Function d3_svg_lineMonotoneTangents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function d3_svg_lineMonotoneTangents(points) {
                                        var tangents = [],
                                            d,
                                            a,
                                            b,
                                      Severity: Minor
                                      Found in zktest/src/main/webapp/js/d3.js - About 1 hr to fix

                                        Function d3_svg_line has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function d3_svg_line(projection) {
                                          var x = d3_svg_lineX,
                                              y = d3_svg_lineY,
                                              interpolate = "linear",
                                              interpolator = d3_svg_lineInterpolators[interpolate],
                                        Severity: Minor
                                        Found in zktest/src/main/webapp/js/d3.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language