Showing 2,859 of 2,859 total issues

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

MINIDUMP_HEADER = Descriptor([
  ("signature", ctypes.c_uint32),
  ("version", ctypes.c_uint32),
  ("stream_count", ctypes.c_uint32),
  ("stream_directories_rva", ctypes.c_uint32),
Severity: Major
Found in deps/v8/tools/grokdump.py and 1 other location - About 2 hrs to fix
deps/v8/tools/grokdump.py on lines 443..450

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

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

    self.assertEquals([(self.nodes['a'], self.nodes['b'], self.nodes['a'])],
                      self.nodes['a'].FindCycles())
Severity: Major
Found in tools/gyp/pylib/gyp/input_test.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/input_test.py on lines 56..57

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

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 library_dir not in xcode_standard_library_dirs and (
            not xct.HasBuildSetting(_library_search_paths_var) or
            library_dir not in xct.GetBuildSetting(_library_search_paths_var)):
          xct.AppendBuildSetting(_library_search_paths_var, library_dir)
Severity: Major
Found in tools/gyp/pylib/gyp/generator/xcode.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/generator/xcode.py on lines 1193..1197

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

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

    self.assertEquals([(self.nodes['b'], self.nodes['a'], self.nodes['b'])],
                      self.nodes['b'].FindCycles())
Severity: Major
Found in tools/gyp/pylib/gyp/input_test.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/input_test.py on lines 54..55

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

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

  target._send = function(message, handle, swallowErrors) {
    assert(this.connected || this._channel);

    if (util.isUndefined(message))
      throw new TypeError('message cannot be undefined');
Severity: Major
Found in lib/child_process.js - About 2 hrs to fix

    Function pipe has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Stream.prototype.pipe = function(dest, options) {
      var source = this;
    
      function ondata(chunk) {
        if (dest.writable) {
    Severity: Major
    Found in lib/stream.js - About 2 hrs to fix

      Function listen has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Server.prototype.listen = function() {
        var self = this;
      
        var lastArg = arguments[arguments.length - 1];
        if (util.isFunction(lastArg)) {
      Severity: Major
      Found in lib/net.js - About 2 hrs to fix

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

        SplayTree.prototype.find = function(key) {
          if (this.isEmpty()) {
            return null;
          }
          this.splay_(key);
        Severity: Major
        Found in deps/v8/benchmarks/spinning-balls/splay-tree.js and 2 other locations - About 2 hrs to fix
        deps/v8/benchmarks/splay.js on lines 224..230
        deps/v8/tools/splaytree.js on lines 131..137

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

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

        SplayTree.prototype.find = function(key) {
          if (this.isEmpty()) {
            return null;
          }
          this.splay_(key);
        Severity: Major
        Found in deps/v8/benchmarks/splay.js and 2 other locations - About 2 hrs to fix
        deps/v8/benchmarks/spinning-balls/splay-tree.js on lines 129..135
        deps/v8/tools/splaytree.js on lines 131..137

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

        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

                    ind = function(nt, sc_nts_10) {
                        var i;
                        {
                            (i = ((sc_nts_10.length)-(1)));
                            while (true) {
        Severity: Major
        Found in deps/v8/benchmarks/earley-boyer.js and 1 other location - About 2 hrs to fix
        deps/v8/benchmarks/earley-boyer.js on lines 4023..4037

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

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

        SplayTree.prototype.find = function(key) {
          if (this.isEmpty()) {
            return null;
          }
          this.splay_(key);
        Severity: Major
        Found in deps/v8/tools/splaytree.js and 2 other locations - About 2 hrs to fix
        deps/v8/benchmarks/spinning-balls/splay-tree.js on lines 129..135
        deps/v8/benchmarks/splay.js on lines 224..230

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

        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

                            sc_ind_43 = function(nt, sc_nts_49) {
                                var i;
                                {
                                    (i = ((sc_nts_49.length)-(1)));
                                    while (true) {
        Severity: Major
        Found in deps/v8/benchmarks/earley-boyer.js and 1 other location - About 2 hrs to fix
        deps/v8/benchmarks/earley-boyer.js on lines 3836..3850

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

        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

        File view.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // npm view [pkg [pkg ...]]
        
        module.exports = view
        view.usage = "npm view pkg[@version] [<field>[.subfield]...]"
        
        
        Severity: Minor
        Found in deps/npm/lib/view.js - About 2 hrs to fix

          Function decode has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function decode(input) {
                  // Don't use UCS-2
                  var output = [],
                      inputLength = input.length,
                      out,
          Severity: Major
          Found in lib/punycode.js - About 2 hrs to fix

            Function Agent has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Agent(options) {
              if (!(this instanceof Agent))
                return new Agent(options);
            
              EventEmitter.call(this);
            Severity: Major
            Found in lib/_http_agent.js - About 2 hrs to fix

              Function Stringify has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Stringify(x, depth) {
                if (depth === undefined)
                  depth = stringifyDepthLimit;
                else if (depth === 0)
                  return "*";
              Severity: Major
              Found in deps/v8/src/d8.js - About 2 hrs to fix

                Function write has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                OutgoingMessage.prototype.write = function(chunk, encoding, callback) {
                  var self = this;
                
                  if (this.finished) {
                    var err = new Error('write after end');
                Severity: Major
                Found in lib/_http_outgoing.js - About 2 hrs to fix

                  Function resolver has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    return function resolver (what, cb) {
                      if (resolveLeft) return setTimeout(function () {
                        resolver(what, cb)
                      }, to++)
                  
                  
                  Severity: Major
                  Found in deps/npm/lib/install.js - About 2 hrs to fix

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

                        if (opts.flush !== binding.Z_NO_FLUSH &&
                            opts.flush !== binding.Z_PARTIAL_FLUSH &&
                            opts.flush !== binding.Z_SYNC_FLUSH &&
                            opts.flush !== binding.Z_FULL_FLUSH &&
                            opts.flush !== binding.Z_FINISH &&
                    Severity: Major
                    Found in lib/zlib.js and 2 other locations - About 2 hrs to fix
                    lib/assert.js on lines 161..165
                    lib/zlib.js on lines 343..347

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

                    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 (npm.config.get("save-optional")) {
                          deps = d.optionalDependencies || {}
                          Object.keys(deps).forEach(function (k) {
                            types[k] = "optionalDependencies"
                          })
                    Severity: Major
                    Found in deps/npm/lib/outdated.js and 1 other location - About 2 hrs to fix
                    deps/npm/lib/outdated.js on lines 192..199

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

                    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