Showing 2,859 of 2,859 total issues

Function getFlatProfile has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Profile.prototype.getFlatProfile = function(opt_label) {
  var counters = new CallTree();
  var rootLabel = opt_label || CallTree.ROOT_NODE_LABEL;
  var precs = {};
  precs[rootLabel] = 0;
Severity: Minor
Found in deps/v8/tools/profile.js - About 1 hr to fix

    Function installAndRetest has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function installAndRetest (set, filter, dir, unavoidable, silent, cb) {
      //return cb(null, set)
      var remove = []
    
      asyncMap(set, function (item, cb) {
    Severity: Minor
    Found in deps/npm/lib/dedupe.js - About 1 hr to fix

      Function gyp_main has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def gyp_main(args):
        my_name = os.path.basename(sys.argv[0])
      
        parser = RegeneratableOptionParser()
        usage = 'usage: %s [options ...] [build_file ...]'
      Severity: Minor
      Found in tools/gyp/pylib/gyp/__init__.py - About 1 hr to fix

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

        Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
          offset = offset >>> 0;
          if (!noAssert)
            checkOffset(offset, 8, this.length);
          return internal.readDoubleLE(this, offset);
        Severity: Major
        Found in lib/buffer.js and 3 other locations - About 1 hr to fix
        lib/buffer.js on lines 682..687
        lib/buffer.js on lines 690..695
        lib/buffer.js on lines 706..711

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

        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

        Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
          offset = offset >>> 0;
          if (!noAssert)
            checkOffset(offset, 8, this.length);
          return internal.readDoubleBE(this, offset);
        Severity: Major
        Found in lib/buffer.js and 3 other locations - About 1 hr to fix
        lib/buffer.js on lines 682..687
        lib/buffer.js on lines 690..695
        lib/buffer.js on lines 698..703

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

        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

          fs.readdir(globalDir, function (er, pkgs) {
            global = (pkgs || []).filter(function (p) {
              return p.charAt(0) !== "."
            })
            next()
        Severity: Major
        Found in deps/npm/lib/utils/completion/installed-shallow.js and 1 other location - About 1 hr to fix
        deps/npm/lib/utils/completion/installed-shallow.js on lines 20..25

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

        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

          var dep = p[1]
            , dir = path.resolve(p[0], "node_modules", dep)
            , has = p[2]
            , want = p[3]
            , latest = p[4]
        Severity: Major
        Found in deps/npm/lib/outdated.js and 1 other location - About 1 hr to fix
        deps/npm/lib/outdated.js on lines 133..138

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

        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

        Profile.prototype.addLibrary = function(
            name, startAddr, endAddr) {
          var entry = new CodeMap.CodeEntry(
              endAddr - startAddr, name);
          this.codeMap_.addLibrary(startAddr, entry);
        Severity: Major
        Found in deps/v8/tools/profile.js and 1 other location - About 1 hr to fix
        deps/v8/tools/profile.js on lines 118..124

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

        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

            var dep = p[1]
              , dir = path.resolve(p[0], "node_modules", dep)
              , has = p[2]
              , want = p[3]
              , latest = p[4]
        Severity: Major
        Found in deps/npm/lib/outdated.js and 1 other location - About 1 hr to fix
        deps/npm/lib/outdated.js on lines 89..94

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

        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

        Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
          offset = offset >>> 0;
          if (!noAssert)
            checkOffset(offset, 4, this.length);
          return internal.readFloatLE(this, offset);
        Severity: Major
        Found in lib/buffer.js and 3 other locations - About 1 hr to fix
        lib/buffer.js on lines 690..695
        lib/buffer.js on lines 698..703
        lib/buffer.js on lines 706..711

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

        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

        Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
          offset = offset >>> 0;
          if (!noAssert)
            checkOffset(offset, 4, this.length);
          return internal.readFloatBE(this, offset);
        Severity: Major
        Found in lib/buffer.js and 3 other locations - About 1 hr to fix
        lib/buffer.js on lines 682..687
        lib/buffer.js on lines 698..703
        lib/buffer.js on lines 706..711

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

        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

        Profile.prototype.addStaticCode = function(
            name, startAddr, endAddr) {
          var entry = new CodeMap.CodeEntry(
              endAddr - startAddr, name);
          this.codeMap_.addStaticCode(startAddr, entry);
        Severity: Major
        Found in deps/v8/tools/profile.js and 1 other location - About 1 hr to fix
        deps/v8/tools/profile.js on lines 102..108

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

        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

          else fs.readdir(localDir, function (er, pkgs) {
            local = (pkgs || []).filter(function (p) {
              return p.charAt(0) !== "."
            })
            next()
        Severity: Major
        Found in deps/npm/lib/utils/completion/installed-shallow.js and 1 other location - About 1 hr to fix
        deps/npm/lib/utils/completion/installed-shallow.js on lines 26..31

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

        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 _tabComplete has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Interface.prototype._tabComplete = function() {
          var self = this;
        
          self.pause();
          self.completer(self.line.slice(0, self.cursor), function(err, rv) {
        Severity: Minor
        Found in lib/readline.js - About 1 hr to fix

          Function ChildProcess has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function ChildProcess() {
            EventEmitter.call(this);
          
            // Initialize TCPWrap and PipeWrap
            process.binding('tcp_wrap');
          Severity: Minor
          Found in lib/child_process.js - About 1 hr to fix

            Function socketOnData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function socketOnData(d) {
              var socket = this;
              var req = this._httpMessage;
              var parser = this.parser;
            
            
            Severity: Minor
            Found in lib/_http_client.js - About 1 hr to fix

              Function parseListItem has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function parseListItem(item) {
                if (item.options) item.options.forEach(parseListItem);
                if (!item.textRaw) return;
              
                // the goal here is to find the name, type, default, and optional.
              Severity: Minor
              Found in tools/doc/json.js - About 1 hr to fix

                Function _onResponse has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Client.prototype._onResponse = function(res) {
                  var cb,
                      index = -1;
                
                  this._reqCallbacks.some(function(fn, i) {
                Severity: Minor
                Found in lib/_debugger.js - About 1 hr to fix

                  Function callback has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function callback(availInAfter, availOutAfter) {
                      if (self._hadError)
                        return;
                  
                      var have = availOutBefore - availOutAfter;
                  Severity: Minor
                  Found in lib/zlib.js - About 1 hr to fix

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

                    function main(conf) {
                      var api = conf.api;
                      if (api === 'stream' && process.version.match(/^v0\.[0-8]\./)) {
                        console.error('Crypto streams not available until v0.10');
                        // use the legacy, just so that we can compare them.
                    Severity: Minor
                    Found in benchmark/crypto/cipher-stream.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language