Showing 4,841 of 7,782 total issues

Method parseRange has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static int[] parseRange(String range) {
        range = range.toLowerCase(java.util.Locale.ENGLISH);
        for (int j = 0, k, len = range.length(); (k = range.indexOf("bytes", j)) >= 0;) {
            for (k += 5; k < len;) {
                char cc = range.charAt(k++);
Severity: Minor
Found in zweb/src/main/java/org/zkoss/web/servlet/http/Https.java - About 1 hr to fix

    Method browser has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private static boolean browser(String userAgent, String type) {
            if (userAgent == null) //Bug ZK-1582: userAgent could be null if it is robot.
                return false;
    
            int last = (type = type.trim()).length();
    Severity: Minor
    Found in zweb/src/main/java/org/zkoss/web/servlet/Servlets.java - About 1 hr to fix

      Method removeFromQueryString has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static final StringBuffer removeFromQueryString(StringBuffer sb, String name)
                  throws UnsupportedEncodingException {
              name = encodeURIComponent(name);
      
              if (name == null || name.isEmpty())
      Severity: Minor
      Found in zweb/src/main/java/org/zkoss/web/servlet/http/Encodes.java - About 1 hr to fix

        Function load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jQuery.fn.load = function( url, params, callback ) {
            var selector, type, response,
                self = this,
                off = url.indexOf( " " );
        
        
        Severity: Minor
        Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

          Function isValid has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function isValid(m) {
                  if (m._isValid == null) {
                      var flags = getParsingFlags(m),
                          parsedParts = some.call(flags.parsedDateParts, function (i) {
                              return i != null;
          Severity: Minor
          Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 hr to fix

            Function Request has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function Request(input, options) {
                    options = options || {}
                    var body = options.body
                    if (Request.prototype.isPrototypeOf(input)) {
                        if (input.bodyUsed) {
            Severity: Minor
            Found in zk/src/main/resources/web/js/zk/ext/fetch.js - About 1 hr to fix

              Function clientInfo has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          export function clientInfo(dtid?: string): void {
                              zAu._cInfoReg = true;
                              var orient = '',
                                  dpr = 1.0;
              
              
              Severity: Minor
              Found in zk/src/main/resources/web/js/zk/au.ts - About 1 hr to fix

                Function _rmDesktop has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        export function _rmDesktop(dt: zk.Desktop, dummy?: boolean): void {
                            var url = zk.ajaxURI(undefined, { desktop: dt, au: true }),
                                data = jq.param({
                                    dtid: dt.id,
                                    cmd_0: dummy ? 'dummy' : 'rmDesktop',
                Severity: Minor
                Found in zk/src/main/resources/web/js/zk/au.ts - About 1 hr to fix

                  Function relativeTime$1 has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
                          var duration = createDuration(posNegDuration).abs(),
                              seconds = round(duration.as('s')),
                              minutes = round(duration.as('m')),
                              hours = round(duration.as('h')),
                  Severity: Minor
                  Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 hr to fix

                    Function addAft has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                export function addAft(wgt: zk.Widget, ...codes: string[]): void {
                                    const p = wgt.parent,
                                        onSizeChildren: zk.Widget[] = [],
                                        fn = function (child: zk.Widget): void {
                                            var act = _beforeAction(child, 'show') as never;
                    Severity: Minor
                    Found in zk/src/main/resources/web/js/zk/au.ts - About 1 hr to fix

                      Function rounding has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          rounding(valStr: string, ri: number, rounding: number, minus: boolean): string {
                              switch (rounding) {
                                  case 0: //UP
                                      valStr = up(valStr, ri);
                                      break;
                      Severity: Minor
                      Found in zk/src/main/resources/web/js/zk/fmt/numfmt.ts - About 1 hr to fix

                        Function _escapeQuote has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _escapeQuote(fmt: string, localizedSymbols: zk.LocalizedSymbols): Efmt {
                                //note we do NOT support mixing of quoted and unquoted percent
                                var cc, q = -2, shift = 0, ret = '', jdot = -1, purejdot = -1, pure = '', prej = -1,
                                    validPercent = fmt ? !new RegExp('(\'[' + localizedSymbols.PERCENT + '|' + localizedSymbols.PER_MILL + ']+\')', 'g').test(fmt) : true;
                                    //note we do NOT support mixing of quoted and unquoted percent|permill
                        Severity: Minor
                        Found in zk/src/main/resources/web/js/zk/fmt/numfmt.ts - About 1 hr to fix

                          Function _scroll has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _scroll(): void {
                                  var current = new Date(),
                                      delta = current.valueOf() - this.lastScrolled!.valueOf();
                                  this.lastScrolled = current;
                                  if (this.opts.scroll == window) {
                          Severity: Minor
                          Found in zk/src/main/resources/web/js/zk/drag.ts - About 1 hr to fix

                            Function constructor has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                constructor(widget: zk.Widget, currentTarget: object) {
                                    super(); // FIXME: params?
                                    this.$view = widget;
                                    this.$currentTarget = currentTarget;
                                    this._aftercmd = {};
                            Severity: Minor
                            Found in zkbind/src/main/resources/web/js/zkbind/Binder.ts - About 1 hr to fix

                              Function getForSourceFile has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function getForSourceFile(sourceFilePath: string): TSDocConfigFile {
                                  const sourceFileFolder = path.dirname(path.resolve(sourceFilePath));
                                  // First, determine the file to be loaded. If not found, the configFilePath will be an empty string.
                                  const configFilePath = TSDocConfigFile.findConfigPathForFolder(sourceFileFolder);
                                  // If configFilePath is an empty string, then we'll use the folder of sourceFilePath as our cache key.
                              Severity: Minor
                              Found in eslint-plugin-zk/src/rules/tsdocConfigCache.ts - About 1 hr to fix

                                Function getTsdocConfig has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        function getTsdocConfig(): TSDocConfiguration | undefined {
                                            const tsdocConfig = new TSDocConfiguration();
                                            try {
                                                const tsdocConfigFile = getForSourceFile(context.getFilename());
                                                if (!tsdocConfigFile.fileNotFound) {
                                Severity: Minor
                                Found in eslint-plugin-zk/src/rules/tsdocValidation.ts - About 1 hr to fix

                                  Function Literal has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              Literal(node) {
                                                  if (node.raw === 'null') {
                                                      let parent = node.parent;
                                                      while (parent) {
                                                          if (visitedNode[parent.range.toString()]) {
                                  Severity: Minor
                                  Found in eslint-plugin-zk/src/rules/noNull.ts - About 1 hr to fix

                                    Method zzRefill has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      private boolean zzRefill() throws java.io.IOException {
                                    
                                        /* first: make room (if you can) */
                                        if (zzStartRead > 0) {
                                          System.arraycopy(zzBuffer, zzStartRead,
                                    Severity: Minor
                                    Found in zcommon/src/main/java/org/zkoss/json/parser/Yylex.java - About 1 hr to fix

                                      Method normalize has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static final String normalize(String path) {
                                              if (path == null)
                                                  return "";
                                      
                                              //remove consecutive slashes
                                      Severity: Minor
                                      Found in zcommon/src/main/java/org/zkoss/io/Files.java - About 1 hr to fix

                                        Method checkNamespacePrefix has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static final void checkNamespacePrefix(String prefix, Locator loc) {
                                                if (prefix == null || prefix.length() == 0)
                                                    return; //OK: null or empty
                                        
                                                String reason = null;
                                        Severity: Minor
                                        Found in zcommon/src/main/java/org/zkoss/idom/Verifier.java - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language