Showing 2,859 of 2,859 total issues

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))
    rm(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 129..133

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

                        lastY = y[currentRow] = (y0[currentRow] + a * (lastY + y[++currentRow] + y[++lastRow] + y[++nextRow])) * invC;
Severity: Major
Found in deps/v8/benchmarks/navier-stokes.js and 1 other location - About 1 hr to fix
deps/v8/benchmarks/navier-stokes.js on lines 150..150

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.memLevel) {
    if (opts.memLevel < exports.Z_MIN_MEMLEVEL ||
        opts.memLevel > exports.Z_MAX_MEMLEVEL) {
      throw new Error('Invalid memLevel: ' + opts.memLevel);
    }
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 328..333

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.set) {
          var setter = Stringify(desc.set);
          props.push("set " + name + setter.slice(setter.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 2009..2012

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 bnShiftLeft(n) {
  var r = nbi();
  if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(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 869..873

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

    (const_nboyer = (new sc_Pair((new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))))),null)))))))))));
Severity: Major
Found in deps/v8/benchmarks/earley-boyer.js and 1 other location - About 1 hr to fix
deps/v8/benchmarks/earley-boyer.js on lines 3466..3466

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

                        lastX = x[currentRow] = (x0[currentRow] + a*(lastX+x[++currentRow]+x[++lastRow]+x[++nextRow])) * invC;
Severity: Major
Found in deps/v8/benchmarks/navier-stokes.js and 1 other location - About 1 hr to fix
deps/v8/benchmarks/navier-stokes.js on lines 189..189

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

Function parseSignature has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function parseSignature(text, sig) {
  var params = text.match(paramExpr);
  if (!params) return;
  params = params[1];
  // the [ is irrelevant. ] indicates optionalness.
Severity: Minor
Found in tools/doc/json.js - About 1 hr to fix

    Function processIncludes has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function processIncludes(input, cb) {
      var includes = input.match(includeExpr);
      if (includes === null) return cb(null, input);
      var errState = null;
      console.error(includes);
    Severity: Minor
    Found in tools/doc/generate.js - About 1 hr to fix

      Function exithandler has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function exithandler(code, signal) {
          if (exited) return;
          exited = true;
      
          if (timeoutId) {
      Severity: Minor
      Found in lib/child_process.js - About 1 hr to fix

        Function objEquiv has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function objEquiv(a, b) {
          if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))
            return false;
          // an identical 'prototype' property.
          if (a.prototype !== b.prototype) return false;
        Severity: Minor
        Found in lib/assert.js - About 1 hr to fix

          Function onread has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function onread(nread, buffer) {
            var handle = this;
            var self = handle.owner;
            assert(handle === self._handle, 'handle != self._handle');
          
          
          Severity: Minor
          Found in lib/net.js - About 1 hr to fix

            Function toString has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Buffer.prototype.toString = function(encoding, start, end) {
              var loweredCase = false;
            
              start = start >>> 0;
              end = util.isUndefined(end) || end === Infinity ? this.length : end >>> 0;
            Severity: Minor
            Found in lib/buffer.js - About 1 hr to fix

              Function ReadableState has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ReadableState(options, stream) {
                options = options || {};
              
                // object stream flag. Used to make read(n) ignore n and to
                // make all the buffer merging and length checks go away
              Severity: Minor
              Found in lib/_stream_readable.js - About 1 hr to fix

                Function addListener has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                EventEmitter.prototype.addListener = function addListener(type, listener) {
                  var m;
                
                  if (!util.isFunction(listener))
                    throw TypeError('listener must be a function');
                Severity: Minor
                Found in lib/events.js - About 1 hr to fix

                  Function bnpAddTo has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function bnpAddTo(a,r) {
                    var this_array = this.array;
                    var a_array = a.array;
                    var r_array = r.array;
                    var i = 0, c = 0, m = Math.min(a.t,this.t);
                  Severity: Minor
                  Found in deps/v8/benchmarks/crypto.js - About 1 hr to fix

                    Function bnpSubTo has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function bnpSubTo(a,r) {
                      var this_array = this.array;
                      var r_array = r.array;
                      var a_array = a.array;
                      var i = 0, c = 0, m = Math.min(a.t,this.t);
                    Severity: Minor
                    Found in deps/v8/benchmarks/crypto.js - About 1 hr to fix

                      Function project has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function project(u, v, p, div)
                          {
                              var h = -0.5 / Math.sqrt(width * height);
                              for (var j = 1 ; j <= height; j++ ) {
                                  var row = j * rowSize;
                      Severity: Minor
                      Found in deps/v8/benchmarks/navier-stokes.js - About 1 hr to fix

                        Function findPlotRange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          this.findPlotRange = function(
                            range_start_override, range_end_override, result_callback) {
                            var start_found = (range_start_override || range_start_override == 0);
                            var end_found = (range_end_override || range_end_override == 0);
                            range_start = start_found ? range_start_override : Infinity;
                        Severity: Minor
                        Found in deps/v8/tools/profviz/composer.js - About 1 hr to fix

                          Function version has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function version (args, silent, cb_) {
                            if (typeof cb_ !== "function") cb_ = silent, silent = false
                            if (args.length > 1) return cb_(version.usage)
                          
                            var packagePath = path.join(npm.localPrefix, "package.json")
                          Severity: Minor
                          Found in deps/npm/lib/version.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language