Showing 2,859 of 2,859 total issues

Function verifyFiles has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function verifyFiles(files, callback) {
  var dir = path.resolve(verifyDir, 'doc-' + id++);

  files = Object.keys(files).map(function(name) {
    return {
Severity: Minor
Found in tools/doc/addon-verify.js - About 1 hr to fix

    Function removeListener has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function removeListener(type, listener) {
      var list, position, length, i;
    
      if (!util.isFunction(listener))
        throw TypeError('listener must be a function');
    Severity: Minor
    Found in lib/events.js - About 1 hr to fix

      Function _listen2 has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Server.prototype._listen2 = function(address, port, addressType, backlog, fd) {
        debug('listen2', address, port, addressType, backlog);
        var self = this;
      
        // If there is not yet a handle, we need to create one and bind.
      Severity: Minor
      Found in lib/net.js - About 1 hr to fix

        Function unrefTimeout has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function unrefTimeout() {
          var now = Timer.now();
        
          debug('unrefTimer fired');
        
        
        Severity: Minor
        Found in lib/timers.js - About 1 hr to fix

          Function backtraceCommandToJSONRequest_ has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          DebugRequest.prototype.backtraceCommandToJSONRequest_ = function(args) {
            // Build a backtrace request from the text command.
            var request = this.createRequest('backtrace');
          
            // Default is to show top 10 frames.
          Severity: Minor
          Found in deps/v8/src/d8.js - About 1 hr to fix

            Function main has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function main(conf) {
              http = require('http');
              var chunk;
              var len = conf.kb * 1024;
              switch (conf.type) {
            Severity: Minor
            Found in benchmark/http/end-vs-write-end.js - About 1 hr to fix

              Function set_bnd has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function set_bnd(b, x)
                  {
                      if (b===1) {
                          for (var i = 1; i <= width; i++) {
                              x[i] =  x[i + rowSize];
              Severity: Minor
              Found in deps/v8/benchmarks/navier-stokes.js - About 1 hr to fix

                Function checkoutTreeish has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function checkoutTreeish (from, resolvedURL, resolvedTreeish, tmpdir, cb) {
                  var args = ['checkout', resolvedTreeish]
                  git.whichAndExec(
                    args,
                    { cwd: tmpdir, env: gitEnv() },
                Severity: Minor
                Found in deps/npm/lib/cache/add-remote-git.js - About 1 hr to fix

                  Function readdir has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function readdir(name) {
                      resolveLeft++
                      fs.readdir(name, function (er, inst) {
                        if (er) return resolveLeft--
                  
                  
                  Severity: Minor
                  Found in deps/npm/lib/install.js - About 1 hr to fix

                    Function get has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function get (uri, params, cb) {
                      assert(typeof uri === "string", "must pass registry URI to get")
                      assert(params && typeof params === "object", "must pass params to get")
                      assert(typeof cb === "function", "must pass callback to get")
                    
                    
                    Severity: Minor
                    Found in deps/npm/lib/cache/caching-client.js - About 1 hr to fix

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

                        if (opts.chunkSize) {
                          if (opts.chunkSize < exports.Z_MIN_CHUNK ||
                              opts.chunkSize > exports.Z_MAX_CHUNK) {
                            throw new Error('Invalid chunk size: ' + opts.chunkSize);
                          }
                      Severity: Major
                      Found in lib/zlib.js and 3 other locations - About 1 hr to fix
                      lib/zlib.js on lines 321..326
                      lib/zlib.js on lines 328..333
                      lib/zlib.js on lines 335..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 61.

                      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 4 locations. Consider refactoring.
                      Open

                        if (opts.windowBits) {
                          if (opts.windowBits < exports.Z_MIN_WINDOWBITS ||
                              opts.windowBits > exports.Z_MAX_WINDOWBITS) {
                            throw new Error('Invalid windowBits: ' + opts.windowBits);
                          }
                      Severity: Major
                      Found in lib/zlib.js and 3 other locations - About 1 hr to fix
                      lib/zlib.js on lines 314..319
                      lib/zlib.js on lines 328..333
                      lib/zlib.js on lines 335..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 61.

                      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 (!pkg) return readLocalPkg(function (er, pkg) {
                          if (er) return cb(er)
                          if (!pkg) return cb(new Error(owner.usage))
                          add(user, pkg, cb)
                        })
                      Severity: Major
                      Found in deps/npm/lib/owner.js and 1 other location - About 1 hr to fix
                      deps/npm/lib/owner.js on lines 152..156

                      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 61.

                      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(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break;
                      Severity: Major
                      Found in deps/v8/benchmarks/crypto.js and 1 other location - About 1 hr to fix
                      deps/v8/benchmarks/crypto.js on lines 1606..1606

                      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 61.

                      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(this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break;
                      Severity: Major
                      Found in deps/v8/benchmarks/crypto.js and 1 other location - About 1 hr to fix
                      deps/v8/benchmarks/crypto.js on lines 1602..1602

                      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 61.

                      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 (!noAssert) {
                          checkInt(this,
                                   value,
                                   offset,
                                   byteLength,
                      Severity: Major
                      Found in lib/buffer.js and 1 other location - About 1 hr to fix
                      lib/buffer.js on lines 819..826

                      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 61.

                      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 4 locations. Consider refactoring.
                      Open

                        if (opts.level) {
                          if (opts.level < exports.Z_MIN_LEVEL ||
                              opts.level > exports.Z_MAX_LEVEL) {
                            throw new Error('Invalid compression level: ' + opts.level);
                          }
                      Severity: Major
                      Found in lib/zlib.js and 3 other locations - About 1 hr to fix
                      lib/zlib.js on lines 314..319
                      lib/zlib.js on lines 321..326
                      lib/zlib.js on lines 335..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 61.

                      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 (!noAssert) {
                          checkInt(this,
                                   value,
                                   offset,
                                   byteLength,
                      Severity: Major
                      Found in lib/buffer.js and 1 other location - About 1 hr to fix
                      lib/buffer.js on lines 842..849

                      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 61.

                      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 (desc.get) {
                                var getter = Stringify(desc.get);
                                props.push("get " + name + getter.slice(getter.indexOf('(')));
                              }
                      Severity: Major
                      Found in deps/v8/src/d8.js and 1 other location - About 1 hr to fix
                      deps/v8/src/d8.js on lines 2013..2016

                      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 61.

                      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

                      function bnShiftRight(n) {
                        var r = nbi();
                        if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
                        return r;
                      }
                      Severity: Major
                      Found in deps/v8/benchmarks/crypto.js and 1 other location - About 1 hr to fix
                      deps/v8/benchmarks/crypto.js on lines 862..866

                      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 61.

                      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