Showing 4,841 of 7,782 total issues

Method getTarget has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private final Target getTarget(EvaluationContext ctx) throws ELException {
        ctx.putContext(AstValue.class, new Integer(this.jjtGetNumChildren()));
        // evaluate expr-a to value-a
        ctx.putContext(Node.class, this.children[0]); //20110905, henrichen: bind property node
        Object base = this.children[0].getValue(ctx);
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/AstValue.java - About 2 hrs to fix

    Method onCreate has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public void onCreate() {
            try {
                ServletContext context = ServletFns.getCurrentServletContext();
                prop = new Properties();
                prop.load(new FileInputStream(new File(context.getRealPath(PATH + CONFIG))));
    Severity: Major
    Found in zktest/src/main/java/org/zkoss/zktest/test2/MainLayout.java - About 2 hrs to fix

      Method parseDesktopConfig has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private static void parseDesktopConfig(Configuration config, Element conf) throws Exception {
              //theme-uri
              for (Iterator<Element> it = conf.getElements("theme-uri").iterator(); it.hasNext();) {
                  final Element el = (Element) it.next();
                  final String uri = el.getText(true);
      Severity: Major
      Found in zk/src/main/java/org/zkoss/zk/ui/sys/ConfigParser.java - About 2 hrs to fix

        Method modifyAttrValueIfSimplified has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static String modifyAttrValueIfSimplified(String attrName, String attrValue) {
                boolean isCommand = attrValue.matches("@(global-)?command\\(.*\\)");
                if (attrValue.matches("@\\(.*\\)") || isCommand) {
                    if (Events.isValid(attrName) || isCommand) {
                        int attrValueIndex = attrValue.indexOf("(") + 1;
        Severity: Major
        Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 2 hrs to fix

          Method setParent has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public void setParent(Component parent) {
                  if (_parent == parent)
                      return; //nothing changed
          
                  checkParentChild(parent, this); //create _chdinf
          Severity: Major
          Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 2 hrs to fix

            Method locate has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @SuppressWarnings("unchecked")
                public static final String locate(ServletContext ctx, ServletRequest request, String pgpath, Locator locator)
                        throws ServletException {
                    if (pgpath == null)
                        return pgpath;
            Severity: Major
            Found in zweb/src/main/java/org/zkoss/web/servlet/Servlets.java - About 2 hrs to fix

              Function bc_divide has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  bc_divide: function(a, b, c) {
                      var d, e, g, f, h, k, l, m, n, q, s, p, r, t;
                      if (libbcmath.bc_is_zero(b)) return -1;
                      if (libbcmath.bc_is_zero(a)) return libbcmath.bc_new_num(1, c);
                      0 === b.n_scale && 1 === b.n_len && 1 === b.n_value[0] && (d = libbcmath.bc_new_num(
              Severity: Major
              Found in zktest/src/main/webapp/test2/js/zk-3913-PDF417lib.js - About 2 hrs to fix

                Function getCompaction has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    getCompaction: function(a, b, c) {
                        c = c || !0;
                        var d = [];
                        switch (a) {
                            case 900:
                Severity: Major
                Found in zktest/src/main/webapp/test2/js/zk-3913-PDF417lib.js - About 2 hrs to fix

                  Function d3_svg_area has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function d3_svg_area(projection) {
                    var x0 = d3_svg_lineX,
                        x1 = d3_svg_lineX,
                        y0 = 0,
                        y1 = d3_svg_lineY,
                  Severity: Major
                  Found in zktest/src/main/webapp/js/d3.js - About 2 hrs to fix

                    Function localeWeekdaysParse has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function localeWeekdaysParse(weekdayName, format, strict) {
                            var i, mom, regex;
                    
                            if (this._weekdaysParseExact) {
                                return handleStrictParse$1.call(this, weekdayName, format, strict);
                    Severity: Major
                    Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 2 hrs to fix

                      Function alert has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      jq.alert = function (msg, opts) {
                          if (opts && opts.mode == 'os')
                              return $alert(msg);
                      
                          opts = opts || {};
                      Severity: Major
                      Found in zul/src/main/resources/web/js/zul/dom.ts - About 2 hrs to fix

                        File ELArithmetic.java has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*
                         * Licensed to the Apache Software Foundation (ASF) under one or more
                         * contributor license agreements.  See the NOTICE file distributed with
                         * this work for additional information regarding copyright ownership.
                         * The ASF licenses this file to You under the Apache License, Version 2.0
                        Severity: Minor
                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELArithmetic.java - About 2 hrs to fix

                          Method escape has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              static void escape(final char[] text, final int offset, final int len, final Writer writer,
                                                 final JavaScriptEscapeType escapeType, final JavaScriptEscapeLevel escapeLevel)
                                                 throws IOException {
                          
                                  if (text == null || text.length == 0) {
                          Severity: Major
                          Found in zcommon/src/main/java/org/zkoss/lang/JavaScriptEscapeUtil.java - About 2 hrs to fix

                            Method LambdaParameters has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              final public void LambdaParameters() throws ParseException {
                                                                         /*@bgen(jjtree) LambdaParameters */
                              AstLambdaParameters jjtn000 = new AstLambdaParameters(JJTLAMBDAPARAMETERS);
                              boolean jjtc000 = true;
                              jjtree.openNodeScope(jjtn000);
                            Severity: Major
                            Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 2 hrs to fix

                              Method buildRootCtx has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private ComponentMatchCtx buildRootCtx() {
                                      Component rt = _root == null ? _page.getFirstRoot() : _root;
                                      if (_posOffset > 0) {
                                          Selector selector = _selectorList.get(0);
                                          for (int i = 0; i < _posOffset; i++) {
                              Severity: Major
                              Found in zk/src/main/java/org/zkoss/zk/ui/select/impl/ComponentIterator.java - About 2 hrs to fix

                                Method addAttribute has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private void addAttribute(ComponentInfo compInfo, Namespace attrns, String name, String value, ConditionImpl cond,
                                            org.zkoss.xml.Locator xl) throws Exception {
                                        if (Events.isValid(name)) {
                                            boolean bZkAttr = attrns == null;
                                            if (!bZkAttr) {
                                Severity: Major
                                Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 2 hrs to fix

                                  Method optimizeNativeInfos has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private static void optimizeNativeInfos(NativeInfo compInfo) {
                                          //Optimize 1: merge to prolog, if the first children are
                                          //native and have no child
                                          for (Iterator it = compInfo.getChildren().iterator(); it.hasNext();) {
                                              final NodeInfo o = (NodeInfo) it.next();
                                  Severity: Major
                                  Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 2 hrs to fix

                                    Method readObject has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
                                            s.defaultReadObject();
                                    
                                            //read definition
                                            Object def = s.readObject();
                                    Severity: Major
                                    Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 2 hrs to fix

                                      Method init has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public void init(PageConfig config) {
                                              final Execution exec = Executions.getCurrent();
                                              if (((ExecutionCtrl) exec).isRecovering()) {
                                                  final String uuid = config.getUuid(), id = config.getId();
                                                  if (uuid == null || id == null)
                                      Severity: Major
                                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/PageImpl.java - About 2 hrs to fix

                                        Method render has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                public void render(final Comboitem item, final Object data, final int index) {
                                                    final Combobox cb = (Combobox) item.getParent();
                                                    final Template tm = cb.getTemplate("model");
                                                    if (tm == null) {
                                                        item.setLabel(Objects.toString(data));
                                        Severity: Major
                                        Found in zul/src/main/java/org/zkoss/zul/Combobox.java - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language