Showing 1,193 of 2,859 total issues

Function parse has 170 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
  if (!util.isString(url)) {
    throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
  }

Severity: Major
Found in lib/url.js - About 6 hrs to fix

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

    function main(conf) {
      dur = +conf.dur;
      len = +conf.len;
      type = conf.type;
    
    
    Severity: Major
    Found in benchmark/net/net-pipe.js and 2 other locations - About 6 hrs to fix
    benchmark/net/net-c2s.js on lines 18..42
    benchmark/net/net-s2c.js on lines 18..42

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

    function main(conf) {
      dur = +conf.dur;
      len = +conf.len;
      type = conf.type;
    
    
    Severity: Major
    Found in benchmark/net/net-s2c.js and 2 other locations - About 6 hrs to fix
    benchmark/net/net-c2s.js on lines 18..42
    benchmark/net/net-pipe.js on lines 18..42

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

    function main(conf) {
      dur = +conf.dur;
      len = +conf.len;
      type = conf.type;
    
    
    Severity: Major
    Found in benchmark/net/net-c2s.js and 2 other locations - About 6 hrs to fix
    benchmark/net/net-pipe.js on lines 18..42
    benchmark/net/net-s2c.js on lines 18..42

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

      while exit_code is None:
        if (not end_time is None) and (time.time() >= end_time):
          # Kill the process and wait for it to exit.
          KillProcessWithID(process.pid)
          exit_code = process.wait()
    Severity: Major
    Found in tools/test.py and 1 other location - About 6 hrs to fix
    deps/v8/tools/testrunner/local/commands.py on lines 94..105

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

      while exit_code is None:
        if (not end_time is None) and (time.time() >= end_time):
          # Kill the process and wait for it to exit.
          KillProcessWithID(process.pid)
          exit_code = process.wait()
    Severity: Major
    Found in deps/v8/tools/testrunner/local/commands.py and 1 other location - About 6 hrs to fix
    tools/test.py on lines 544..555

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function nextToken has 168 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    sc_Tokenizer.prototype.nextToken = function() {
        var port = this.port;
    
        function isNumberChar(c) {
        return (c >= "0" && c <= "9");
    Severity: Major
    Found in deps/v8/benchmarks/earley-boyer.js - About 6 hrs to fix

      Function _ttyWrite has 165 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Interface.prototype._ttyWrite = function(s, key) {
        key = key || {};
      
        // Ignore escape key - Fixes #2876
        if (key.name == 'escape') return;
      Severity: Major
      Found in lib/readline.js - About 6 hrs to fix

        Function DebugRequest has 165 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function DebugRequest(cmd_line) {
          // If the very first character is a { assume that a JSON request have been
          // entered as a command. Converting that to a JSON request is trivial.
          if (cmd_line && cmd_line.length > 0 && cmd_line.charAt(0) == '{') {
            this.request_ = cmd_line;
        Severity: Major
        Found in deps/v8/src/d8.js - About 6 hrs to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            if(a.t < this.t) {
              c += a.s;
              while(i < this.t) {
                c += this_array[i];
                r_array[i++] = c&BI_DM;
          Severity: Major
          Found in deps/v8/benchmarks/crypto.js and 1 other location - About 6 hrs to fix
          deps/v8/benchmarks/crypto.js on lines 388..405

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 167.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            if(a.t < this.t) {
              c -= a.s;
              while(i < this.t) {
                c += this_array[i];
                r_array[i++] = c&BI_DM;
          Severity: Major
          Found in deps/v8/benchmarks/crypto.js and 1 other location - About 6 hrs to fix
          deps/v8/benchmarks/crypto.js on lines 945..962

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 167.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            for (id, length) in delay_ids:
              native_name = "native %s.js" % id
              get_index_cases.append(GET_DELAY_INDEX_CASE % { 'id': id, 'i': i })
              get_script_source_cases.append(GET_DELAY_SCRIPT_SOURCE_CASE % {
                'id': id,
          Severity: Major
          Found in tools/js2c.py and 1 other location - About 6 hrs to fix
          tools/js2c.py on lines 327..340

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 102.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            for (id, length) in ids:
              native_name = "native %s.js" % id
              get_index_cases.append(GET_DELAY_INDEX_CASE % { 'id': id, 'i': i })
              get_script_source_cases.append(GET_DELAY_SCRIPT_SOURCE_CASE % {
                'id': id,
          Severity: Major
          Found in tools/js2c.py and 1 other location - About 6 hrs to fix
          tools/js2c.py on lines 312..325

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 102.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function sh_highlightString has 157 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function sh_highlightString(inputString, language) {
            if (/Konqueror/.test(navigator.userAgent)) {
              if (! language.konquered) {
                for (var s = 0; s < language.length; s++) {
                  for (var p = 0; p < language[s].length; p++) {
          Severity: Major
          Found in doc/sh_main.js - About 6 hrs to fix

            Function connectionListener has 157 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function connectionListener(socket) {
              var self = this;
              var outgoing = [];
              var incoming = [];
            
            
            Severity: Major
            Found in lib/_http_server.js - About 6 hrs to fix

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                  elif upper_bound == -1:
                    sh = "a negative %s" % self.number_name
                  elif lower_bound == 0:
                    sh = "a non-negative %s" % self.number_name
                  elif upper_bound == 0:
              Severity: Major
              Found in tools/closure_linter/gflags.py and 1 other location - About 6 hrs to fix
              tools/closure_linter/gflags.py on lines 2124..2133

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 101.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                  if lower_bound is not None and upper_bound is not None:
                    sh = ("%s in the range [%s, %s]" % (sh, lower_bound, upper_bound))
                  elif lower_bound == 0:
                    sh = "a non-negative %s" % self.number_name
                  elif upper_bound == 0:
              Severity: Major
              Found in tools/closure_linter/gflags.py and 1 other location - About 6 hrs to fix
              tools/closure_linter/gflags.py on lines 2179..2188

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 101.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function runBlock9 has 153 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function runBlock9() {
                  for (var i = 0; i < 5; i++) {
                    s94[i].split(re32);
                    s95[i].split(re32);
                    'svz_zlfcnpr_hfre-ivrj-pbzzragf,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
              Severity: Major
              Found in deps/v8/benchmarks/regexp.js - About 6 hrs to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                def ParseOperatorExpression(scan):
                  left = ParseAtomicExpression(scan)
                  if not left: return None
                  while scan.HasMore() and (scan.Current() in BINARIES):
                    op = scan.Current()
                Severity: Major
                Found in tools/test.py and 1 other location - About 6 hrs to fix
                tools/test.py on lines 1047..1057

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 99.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                def ParseLogicalExpression(scan):
                  left = ParseConditionalExpression(scan)
                  if not left: return None
                  while scan.HasMore() and (scan.Current() in LOGICALS):
                    op = scan.Current()
                Severity: Major
                Found in tools/test.py and 1 other location - About 6 hrs to fix
                tools/test.py on lines 1021..1031

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 99.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language