Showing 2,859 of 2,859 total issues

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

    def __reversed__(self):
        'od.__reversed__() <==> reversed(od)'
        root = self.__root
        curr = root[0]
        while curr is not root:
Severity: Major
Found in tools/gyp/pylib/gyp/ordered_dict.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/ordered_dict.py on lines 90..96

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

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

  [
    Set('style histogram rowstacked'),
    Set('style data histograms'),
    Plot(Item('Heap Size (before GC)', 'total_size_before', x1y2,
              fs = 'solid 0.4 noborder',
Severity: Major
Found in deps/v8/tools/gc-nvp-trace-processor.py and 1 other location - About 2 hrs to fix
deps/v8/tools/gc-nvp-trace-processor.py on lines 271..280

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

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 __iter__(self):
        'od.__iter__() <==> iter(od)'
        root = self.__root
        curr = root[1]
        while curr is not root:
Severity: Major
Found in tools/gyp/pylib/gyp/ordered_dict.py and 1 other location - About 2 hrs to fix
tools/gyp/pylib/gyp/ordered_dict.py on lines 98..104

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

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

  [
    Set('style histogram rowstacked'),
    Set('style data histograms'),
    Plot(Item('Heap Size (after GC)', 'total_size_after', x1y2,
              fs = 'solid 0.4 noborder',
Severity: Major
Found in deps/v8/tools/gc-nvp-trace-processor.py and 1 other location - About 2 hrs to fix
deps/v8/tools/gc-nvp-trace-processor.py on lines 260..269

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

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

TLSSocket.prototype._init = function(socket) {
  assert(this._handle);

  // lib/net.js expect this value to be non-zero if write hasn't been flushed
  // immediately
Severity: Major
Found in lib/_tls_wrap.js - About 2 hrs to fix

    Function readInstalled has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function readInstalled (dir, counter, parent, cb) {
      var pkg, children, realpath
    
      fs.realpath(dir, function (er, rp) {
        realpath = rp
    Severity: Major
    Found in deps/npm/lib/dedupe.js - About 2 hrs to fix

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

      function write (target, targetFolder, context, cb_) {
        var up = npm.config.get("unsafe-perm")
          , user = up ? null : npm.config.get("user")
          , group = up ? null : npm.config.get("group")
          , family = context.family
      Severity: Major
      Found in deps/npm/lib/install.js - About 2 hrs to fix

        Function addNameVersion has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function addNameVersion (name, v, data, cb) {
          var ver = semver.valid(v, true)
          if (!ver) return cb(new Error("Invalid version: "+v))
        
          var response
        Severity: Major
        Found in deps/npm/lib/cache/add-named.js - About 2 hrs to fix

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

          Buffer.prototype.write = function(string, offset, length, encoding) {
            // Buffer#write(string);
            if (util.isUndefined(offset)) {
              encoding = 'utf8';
              length = this.length;
          Severity: Major
          Found in lib/buffer.js - About 2 hrs to fix

            Function read has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            CryptoStream.prototype._read = function read(size) {
              // XXX: EOF?!
              if (!this.pair.ssl) return this.push(null);
            
              // Wait for session to be resumed
            Severity: Major
            Found in lib/_tls_legacy.js - About 2 hrs to fix

              Function SecurePair has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function SecurePair(context, isServer, requestCert, rejectUnauthorized,
                                  options) {
                if (!(this instanceof SecurePair)) {
                  return new SecurePair(context,
                                        isServer,
              Severity: Major
              Found in lib/_tls_legacy.js - About 2 hrs to fix

                Function exports has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var server = module.exports = http.createServer(function (req, res) {
                  if (useDomains) {
                    var dom = domain.create();
                    dom.add(req);
                    dom.add(res);
                Severity: Major
                Found in benchmark/http_simple.js - About 2 hrs to fix

                  Function readDependencies has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function readDependencies (context, where, opts, cb) {
                    var wrap = context ? context.wrap : null
                  
                    var jsonPath = path.resolve(where, 'package.json')
                    log.verbose('readDependencies', 'loading dependencies from', jsonPath)
                  Severity: Major
                  Found in deps/npm/lib/install.js - About 2 hrs to fix

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

                      def _ProcessOptions(self, options):  # pragma: no cover
                        if not options.dry_run and not options.author:
                          print "Specify your chromium.org email with -a"
                          return False
                        options.wait_for_lgtm = False
                    Severity: Major
                    Found in deps/v8/tools/push-to-trunk/auto_tag.py and 1 other location - About 2 hrs to fix
                    deps/v8/tools/push-to-trunk/bump_up_version.py on lines 217..224

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

                    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

                      def _ProcessOptions(self, options):  # pragma: no cover
                        if not options.dry_run and not options.author:
                          print "Specify your chromium.org email with -a"
                          return False
                        options.wait_for_lgtm = False
                    Severity: Major
                    Found in deps/v8/tools/push-to-trunk/bump_up_version.py and 1 other location - About 2 hrs to fix
                    deps/v8/tools/push-to-trunk/auto_tag.py on lines 178..185

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

                    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 Truncate(self, string, length):
                        if length and (len(string) > (length - 3)):
                          return string[:(length - 3)] + "..."
                        else:
                          return string
                    Severity: Major
                    Found in deps/v8/tools/testrunner/local/progress.py and 1 other location - About 2 hrs to fix
                    tools/test.py on lines 309..313

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

                    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 Truncate(self, str, length):
                        if length and (len(str) > (length - 3)):
                          return str[:(length-3)] + "..."
                        else:
                          return str
                    Severity: Major
                    Found in tools/test.py and 1 other location - About 2 hrs to fix
                    deps/v8/tools/testrunner/local/progress.py on lines 186..190

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

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

                    function UIWrapper() {
                      var input_elements = ["range_start",
                                            "range_end",
                                            "distortion",
                                            "start",
                    Severity: Major
                    Found in deps/v8/tools/profviz/profviz.js - About 2 hrs to fix

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

                      SplayTree.prototype.exportKeys = function() {
                        var result = [];
                        if (!this.isEmpty()) {
                          this.root_.traverse_(function(node) { result.push(node.key); });
                        }
                      Severity: Major
                      Found in deps/v8/benchmarks/splay.js and 1 other location - About 2 hrs to fix
                      deps/v8/benchmarks/spinning-balls/splay-tree.js on lines 179..185

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

                      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

                      SplayTree.prototype.exportKeys = function() {
                        var result = [];
                        if (!this.isEmpty()) {
                          this.root_.traverse_(function(node) { result.push(node.key); });
                        }
                      Severity: Major
                      Found in deps/v8/benchmarks/spinning-balls/splay-tree.js and 1 other location - About 2 hrs to fix
                      deps/v8/benchmarks/splay.js on lines 274..280

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

                      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