Showing 2,859 of 2,859 total issues

Function connect has 84 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Socket.prototype.connect = function(options, cb) {
  if (this.write !== Socket.prototype.write)
    this.write = Socket.prototype.write;

  if (!util.isObject(options)) {
Severity: Major
Found in lib/net.js - About 3 hrs to fix

    Function searchFiles has 84 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function searchFiles (args, files, cb) {
      var results = []
      Object.keys(files).forEach(function (file) {
        var data = files[file]
    
    
    Severity: Major
    Found in deps/npm/lib/help-search.js - About 3 hrs to fix

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

        switch (conf.type) {
          case 'buf':
            chunk = new Buffer(len);
            chunk.fill('x');
            break;
      Severity: Major
      Found in benchmark/http/end-vs-write-end.js and 1 other location - About 3 hrs to fix
      benchmark/http/client-request-body.js on lines 19..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 102.

      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

        switch (conf.type) {
          case 'buf':
            chunk = new Buffer(len);
            chunk.fill('x');
            break;
      Severity: Major
      Found in benchmark/http/client-request-body.js and 1 other location - About 3 hrs to fix
      benchmark/http/end-vs-write-end.js on lines 24..36

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

      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

      MinidumpReader has 28 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class MinidumpReader(object):
        """Minidump (.dmp) reader."""
      
        _HEADER_MAGIC = 0x504d444d
      
      
      Severity: Minor
      Found in deps/v8/tools/grokdump.py - About 3 hrs to fix

        Step has 28 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Step(GitRecipesMixin):
          def __init__(self, text, requires, number, config, state, options, handler):
            self._text = text
            self._requires = requires
            self._number = number
        Severity: Minor
        Found in deps/v8/tools/push-to-trunk/common_includes.py - About 3 hrs to fix

          InspectionWebFormatter has 28 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class InspectionWebFormatter(object):
            CONTEXT_FULL = 0
            CONTEXT_SHORT = 1
          
            def __init__(self, switches, minidump_name, http_server):
          Severity: Minor
          Found in deps/v8/tools/grokdump.py - About 3 hrs to fix

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

                  if self.toolset == 'host' and self.flavor == 'android':
                    self.WriteDoCmd([self.output_binary], link_deps, 'link_host',
                                    part_of_all, postbuilds=postbuilds)
                  else:
                    self.WriteDoCmd([self.output_binary], link_deps, 'link', part_of_all,
            Severity: Major
            Found in tools/gyp/pylib/gyp/generator/make.py and 1 other location - About 3 hrs to fix
            tools/gyp/pylib/gyp/generator/make.py on lines 1566..1571

            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

            class TextMacro:
              def __init__(self, args, body):
                self.args = args
                self.body = body
              def expand(self, mapping):
            Severity: Major
            Found in tools/js2c.py and 1 other location - About 3 hrs to fix
            deps/v8/tools/js2c.py on lines 134..142

            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

            class TextMacro:
              def __init__(self, args, body):
                self.args = args
                self.body = body
              def expand(self, mapping):
            Severity: Major
            Found in deps/v8/tools/js2c.py and 1 other location - About 3 hrs to fix
            tools/js2c.py on lines 157..165

            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

                  if self.toolset == 'host' and self.flavor == 'android':
                    self.WriteDoCmd([self.output_binary], link_deps, 'solink_module_host',
                                    part_of_all, postbuilds=postbuilds)
                  else:
                    self.WriteDoCmd(
            Severity: Major
            Found in tools/gyp/pylib/gyp/generator/make.py and 1 other location - About 3 hrs to fix
            tools/gyp/pylib/gyp/generator/make.py on lines 1538..1542

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

            Interface.prototype.trySpawn = function(cb) {
              var self = this,
                  breakpoints = this.breakpoints || [],
                  port = exports.port,
                  host = 'localhost',
            Severity: Major
            Found in lib/_debugger.js - About 3 hrs to fix

              File common.py has 305 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # Copyright (c) 2012 Google Inc. All rights reserved.
              # Use of this source code is governed by a BSD-style license that can be
              # found in the LICENSE file.
              
              from __future__ import with_statement
              Severity: Minor
              Found in tools/gyp/pylib/gyp/common.py - About 3 hrs to fix

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

                posix.basename = function(path, ext) {
                  var f = posixSplitPath(path)[2];
                  // TODO: make this comparison case-insensitive on windows?
                  if (ext && f.substr(-1 * ext.length) === ext) {
                    f = f.substr(0, f.length - ext.length);
                Severity: Major
                Found in lib/path.js and 1 other location - About 3 hrs to fix
                lib/path.js on lines 351..358

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

                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

                win32.basename = function(path, ext) {
                  var f = win32SplitPath(path)[2];
                  // TODO: make this comparison case-insensitive on windows?
                  if (ext && f.substr(-1 * ext.length) === ext) {
                    f = f.substr(0, f.length - ext.length);
                Severity: Major
                Found in lib/path.js and 1 other location - About 3 hrs to fix
                lib/path.js on lines 557..564

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

                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 gen-postmortem-metadata.py has 304 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                #!/usr/bin/env python
                
                #
                # Copyright 2012 the V8 project authors. All rights reserved.
                # Redistribution and use in source and binary forms, with or without
                Severity: Minor
                Found in deps/v8/tools/gen-postmortem-metadata.py - About 3 hrs to fix

                  Function realpath has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  fs.realpath = function realpath(p, cache, cb) {
                    if (!util.isFunction(cb)) {
                      cb = maybeCallback(cache);
                      cache = null;
                    }
                  Severity: Major
                  Found in lib/fs.js - About 3 hrs to fix

                    Function Server has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function Server(/* [options], listener */) {
                      var options, listener;
                      if (util.isObject(arguments[0])) {
                        options = arguments[0];
                        listener = arguments[1];
                    Severity: Major
                    Found in lib/_tls_wrap.js - About 3 hrs to fix

                      Function runBlock6 has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function runBlock6() {
                          for (var i = 0; i < 11; i++) {
                            s83[i].replace(/##yv0##/gi, '');
                            s83[i].replace(re57, '');
                            s84[i].replace(re58, '');
                      Severity: Major
                      Found in deps/v8/benchmarks/regexp.js - About 3 hrs to fix

                        Function shouldUpdate has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function shouldUpdate (args, dir, dep, has, req, depth, cb, type) {
                          // look up the most recent version.
                          // if that's what we already have, or if it's not on the args list,
                          // then dive into it.  Otherwise, cb() with the data.
                        
                        
                        Severity: Major
                        Found in deps/npm/lib/outdated.js - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language