Showing 2,859 of 2,859 total issues

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

    for (var i = 0; i < nbApplyArgs; i++) {
        applyArgs[i] = arguments[i + 1].car;
        arguments[i + 1] = arguments[i + 1].cdr;
    }
Severity: Major
Found in deps/v8/benchmarks/earley-boyer.js and 3 other locations - About 1 hr to fix
deps/v8/benchmarks/earley-boyer.js on lines 1509..1512
deps/v8/benchmarks/earley-boyer.js on lines 1528..1531
deps/v8/benchmarks/earley-boyer.js on lines 1616..1619

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

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

    for (var i = 0; i < nbApplyArgs; i++) {
        applyArgs[i] = arguments[i + 1].car;
        arguments[i + 1] = arguments[i + 1].cdr;
    }
Severity: Major
Found in deps/v8/benchmarks/earley-boyer.js and 3 other locations - About 1 hr to fix
deps/v8/benchmarks/earley-boyer.js on lines 1528..1531
deps/v8/benchmarks/earley-boyer.js on lines 1545..1548
deps/v8/benchmarks/earley-boyer.js on lines 1616..1619

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

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

    for (var i = 0; i < nbApplyArgs; i++) {
        applyArgs[i] = arguments[i + 1].car;
        arguments[i + 1] = arguments[i + 1].cdr;
    }
Severity: Major
Found in deps/v8/benchmarks/earley-boyer.js and 3 other locations - About 1 hr to fix
deps/v8/benchmarks/earley-boyer.js on lines 1509..1512
deps/v8/benchmarks/earley-boyer.js on lines 1528..1531
deps/v8/benchmarks/earley-boyer.js on lines 1545..1548

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

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

  function parseLine(line) {
    // Strip trailing whitespace
    line = line.replace(/\s*$/, '');

    // Detect block separator
Severity: Minor
Found in tools/license2rtf.js - About 1 hr to fix

    Function listOnTimeout has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function listOnTimeout() {
      var msecs = this.msecs;
      var list = this;
    
      debug('timeout callback %d', msecs);
    Severity: Minor
    Found in lib/timers.js - About 1 hr to fix

      Function parserOnIncoming has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function parserOnIncoming(req, shouldKeepAlive) {
          incoming.push(req);
      
          // If the writable end isn't consuming, then stop reading
          // so that we don't become overwhelmed by a flood of
      Severity: Minor
      Found in lib/_http_server.js - About 1 hr to fix

        Function _writeGeneric has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Socket.prototype._writeGeneric = function(writev, data, encoding, cb) {
          // If we are still connecting, then buffer this for later.
          // The Writable logic will buffer up any more writes while
          // waiting for this one to be done.
          if (this._connecting) {
        Severity: Minor
        Found in lib/net.js - About 1 hr to fix

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

          QueryString.parse = QueryString.decode = function(qs, sep, eq, options) {
            sep = sep || '&';
            eq = eq || '=';
            var obj = {};
          
          
          Severity: Minor
          Found in lib/querystring.js - About 1 hr to fix

            Method call has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def call(env)
                path = env['PATH_INFO'] || env['REQUEST_URI']
                commands = path.split('/')
            
                @count += 1
            Severity: Minor
            Found in benchmark/http_simple.rb - About 1 hr to fix

              Function __init__ has 15 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def __init__(self, arch, mode, shell_dir, mode_flags, verbose, timeout,
              Severity: Major
              Found in deps/v8/tools/testrunner/objects/context.py - About 1 hr to fix

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

                function dhGenerateKeys(encoding) {
                  var keys = this._handle.generateKeys();
                  encoding = encoding || exports.DEFAULT_ENCODING;
                  if (encoding && encoding !== 'buffer')
                    keys = keys.toString(encoding);
                Severity: Major
                Found in lib/crypto.js and 4 other locations - About 1 hr to fix
                lib/crypto.js on lines 463..469
                lib/crypto.js on lines 476..482
                lib/crypto.js on lines 489..495
                lib/crypto.js on lines 502..508

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

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

                function dhGetPrime(encoding) {
                  var prime = this._handle.getPrime();
                  encoding = encoding || exports.DEFAULT_ENCODING;
                  if (encoding && encoding !== 'buffer')
                    prime = prime.toString(encoding);
                Severity: Major
                Found in lib/crypto.js and 4 other locations - About 1 hr to fix
                lib/crypto.js on lines 436..442
                lib/crypto.js on lines 476..482
                lib/crypto.js on lines 489..495
                lib/crypto.js on lines 502..508

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

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

                function dhGetGenerator(encoding) {
                  var generator = this._handle.getGenerator();
                  encoding = encoding || exports.DEFAULT_ENCODING;
                  if (encoding && encoding !== 'buffer')
                    generator = generator.toString(encoding);
                Severity: Major
                Found in lib/crypto.js and 4 other locations - About 1 hr to fix
                lib/crypto.js on lines 436..442
                lib/crypto.js on lines 463..469
                lib/crypto.js on lines 489..495
                lib/crypto.js on lines 502..508

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

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

                function dhGetPublicKey(encoding) {
                  var key = this._handle.getPublicKey();
                  encoding = encoding || exports.DEFAULT_ENCODING;
                  if (encoding && encoding !== 'buffer')
                    key = key.toString(encoding);
                Severity: Major
                Found in lib/crypto.js and 4 other locations - About 1 hr to fix
                lib/crypto.js on lines 436..442
                lib/crypto.js on lines 463..469
                lib/crypto.js on lines 476..482
                lib/crypto.js on lines 502..508

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

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

                function dhGetPrivateKey(encoding) {
                  var key = this._handle.getPrivateKey();
                  encoding = encoding || exports.DEFAULT_ENCODING;
                  if (encoding && encoding !== 'buffer')
                    key = key.toString(encoding);
                Severity: Major
                Found in lib/crypto.js and 4 other locations - About 1 hr to fix
                lib/crypto.js on lines 436..442
                lib/crypto.js on lines 463..469
                lib/crypto.js on lines 476..482
                lib/crypto.js on lines 489..495

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

                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 (command == 'bytes') {
                    var n = ~~arg;
                    if (n <= 0)
                      throw new Error('bytes called with n <= 0')
                    if (storedBytes[n] === undefined) {
                Severity: Major
                Found in benchmark/http_simple.js and 1 other location - About 1 hr to fix
                benchmark/http_simple.js on lines 60..85

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

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

                Interface.prototype.list = function(delta) {
                  if (!this.requireConnection()) return;
                
                  delta || (delta = 5);
                
                
                Severity: Minor
                Found in lib/_debugger.js - About 1 hr to fix

                  Function fromList has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function fromList(n, state) {
                    var list = state.buffer;
                    var length = state.length;
                    var stringMode = !!state.decoder;
                    var objectMode = !!state.objectMode;
                  Severity: Minor
                  Found in lib/_stream_readable.js - About 1 hr to fix

                    Function _createServerHandle has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function(address, port, addressType, fd) {
                      var err = 0;
                      // assign handle in listen, and clean up if bind or listen fails
                      var handle;
                    
                    
                    Severity: Minor
                    Found in lib/net.js - About 1 hr to fix

                      Function breakCommandToJSONRequest_ has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      DebugRequest.prototype.breakCommandToJSONRequest_ = function(args) {
                        // Build a evaluate request from the text command.
                        // Process arguments if any.
                        if (args && args.length > 0) {
                          var target = args;
                      Severity: Minor
                      Found in deps/v8/src/d8.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language