Showing 2,859 of 2,859 total issues

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

  def do_kp(self, address):
    """
     Teach V8 heap layout information to the inspector. Set the first
     pointer-space page by passing any pointer into that page.
    """
Severity: Major
Found in deps/v8/tools/grokdump.py and 2 other locations - About 2 hrs to fix
deps/v8/tools/grokdump.py on lines 2893..2900
deps/v8/tools/grokdump.py on lines 2902..2909

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

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

  handle_arg_parser = ArgParser(
      re.compile("^\s*CONVERT_ARG_HANDLE_CHECKED\((\w+), (\w+), (\d+)\)"),
      lambda match: Arg(match.group(1), match.group(2), int(match.group(3))))
Severity: Major
Found in deps/v8/tools/generate-runtime-tests.py and 2 other locations - About 2 hrs to fix
deps/v8/tools/generate-runtime-tests.py on lines 806..808
deps/v8/tools/generate-runtime-tests.py on lines 822..825

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

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 _ConsString(self, name):
    s1 = self._RawRandomString(8, 15)
    s2 = self._RawRandomString(8, 15)
    # 'foo12345' + (function() { return 'bar12345';})()
    return self._Variable(name,
Severity: Major
Found in deps/v8/tools/generate-runtime-tests.py and 1 other location - About 2 hrs to fix
deps/v8/tools/generate-runtime-tests.py on lines 379..383

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

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 k, v in subdict.iteritems():
    if v.__class__ == dict:
      LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data, variables,
                                    None, check)
    elif v.__class__ == list:
Severity: Major
Found in tools/gyp/pylib/gyp/input.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/input.py on lines 293..299

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

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

  def do_kd(self, address):
    """
     Teach V8 heap layout information to the inspector. Set the first
     data-space page by passing any pointer into that page.
    """
Severity: Major
Found in deps/v8/tools/grokdump.py and 2 other locations - About 2 hrs to fix
deps/v8/tools/grokdump.py on lines 2902..2909
deps/v8/tools/grokdump.py on lines 2911..2918

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

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

  def do_km(self, address):
    """
     Teach V8 heap layout information to the inspector. Set the first
     map-space page by passing any pointer into that page.
    """
Severity: Major
Found in deps/v8/tools/grokdump.py and 2 other locations - About 2 hrs to fix
deps/v8/tools/grokdump.py on lines 2893..2900
deps/v8/tools/grokdump.py on lines 2911..2918

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

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 key not in self.map:
      end = self.end
      curr = end[1]
      curr[2] = end[1] = self.map[key] = [key, curr, end]
Severity: Major
Found in tools/gyp/pylib/gyp/generator/msvs.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/ordered_dict.py on lines 75..78

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

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 key not in self:
            root = self.__root
            last = root[0]
            last[1] = root[0] = self.__map[key] = [last, root, key]
Severity: Major
Found in tools/gyp/pylib/gyp/ordered_dict.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/generator/msvs.py on lines 122..125

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

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 _SeqTwoByteString(self, name):
    s1 = self._RawRandomString(1, 5)
    s2 = self._RawRandomString(1, 5)
    # 'foo' + unicode + 'bar'
    return self._Variable(name, "\"%s\" + \"\\2082\" + \"%s\"" % (s1, s2))
Severity: Major
Found in deps/v8/tools/generate-runtime-tests.py and 1 other location - About 2 hrs to fix
deps/v8/tools/generate-runtime-tests.py on lines 390..395

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

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 item in sublist:
    if item.__class__ == dict:
      LoadBuildFileIncludesIntoDict(item, sublist_path, data, aux_data,
                                    variables, None, check)
    elif item.__class__ == list:
Severity: Major
Found in tools/gyp/pylib/gyp/input.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/input.py on lines 281..287

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

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

win32.resolve = function() {
  var resolvedDevice = '',
      resolvedTail = '',
      resolvedAbsolute = false;

Severity: Minor
Found in lib/path.js - About 1 hr to fix

    Function onconnection has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      serverHandle.onconnection = function(err, clientHandle) {
        if (err)
          fail(err, 'connect');
    
        var chunk;
    Severity: Minor
    Found in benchmark/net/tcp-raw-s2c.js - About 1 hr to fix

      Function printStatistics has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      TickProcessor.prototype.printStatistics = function() {
        print('Statistical profiling result from ' + this.lastLogFileName_ +
              ', (' + this.ticks_.total +
              ' ticks, ' + this.ticks_.unaccounted + ' unaccounted, ' +
              this.ticks_.excluded + ' excluded).');
      Severity: Minor
      Found in deps/v8/tools/tickprocessor.js - About 1 hr to fix

        Function readString has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function readString() {
            res = "";
            while (true) {
                var c = port.readChar();
                switch (c) {
        Severity: Minor
        Found in deps/v8/benchmarks/earley-boyer.js - About 1 hr to fix

          Function mutate_ has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function mutate_ (er, u) {
              if (!er && user && (!u || u.error)) er = new Error(
                "Couldn't get user data for " + user + ": " + JSON.stringify(u))
          
              if (er) {
          Severity: Minor
          Found in deps/npm/lib/owner.js - About 1 hr to fix

            Function updateIndex has 49 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function updateIndex (staleness, cb) {
              assert(typeof cb === 'function', 'must pass callback to updateIndex')
            
              mapToRegistry('-/all', npm.config, function (er, uri, auth) {
                if (er) return cb(er)
            Severity: Minor
            Found in deps/npm/lib/cache/update-index.js - About 1 hr to fix

              Function splay_ has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              SplayTree.prototype.splay_ = function(key) {
                if (this.isEmpty()) {
                  return;
                }
                // Create a dummy node.  The use of the dummy node is a bit
              Severity: Minor
              Found in deps/v8/benchmarks/splay.js - About 1 hr to fix

                Function splay_ has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                SplayTree.prototype.splay_ = function(key) {
                  if (this.isEmpty()) {
                    return;
                  }
                  // Create a dummy node.  The use of the dummy node is a bit
                Severity: Minor
                Found in deps/v8/benchmarks/spinning-balls/splay-tree.js - About 1 hr to fix

                  Function splay_ has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  SplayTree.prototype.splay_ = function(key) {
                    if (this.isEmpty()) {
                      return;
                    }
                    // Create a dummy node.  The use of the dummy node is a bit
                  Severity: Minor
                  Found in deps/v8/tools/splaytree.js - About 1 hr to fix

                    Function list has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function list(cb) {
                      var json = path.join(npm.localPrefix, "package.json")
                      var cmdList = [ "publish", "install", "uninstall"
                                    , "test", "stop", "start", "restart"
                                    ].reduce(function (l, p) {
                    Severity: Minor
                    Found in deps/npm/lib/run-script.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language