Showing 2,859 of 2,859 total issues

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

        toString : function () {
            return 'SolidMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
        }
Severity: Minor
Found in deps/v8/benchmarks/raytrace.js and 1 other location - About 40 mins to fix
deps/v8/benchmarks/raytrace.js on lines 407..409

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

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 (Strength.weaker(this.v1.walkStrength, this.v2.walkStrength)) {
    this.direction = Strength.stronger(this.strength, this.v1.walkStrength)
      ? Direction.BACKWARD
      : Direction.NONE;
  } else {
Severity: Minor
Found in deps/v8/benchmarks/deltablue.js and 1 other location - About 40 mins to fix
deps/v8/benchmarks/deltablue.js on lines 371..375

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

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

  this.printEntries(flatViewNodes, totalTicks, nonLibraryTicks,
      function(name) { return self.isCppCode(name); },
      function(rec) { cppTicks += rec.selfTime; });
Severity: Minor
Found in deps/v8/tools/tickprocessor.js and 1 other location - About 40 mins to fix
deps/v8/tools/tickprocessor.js on lines 468..470

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

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 (arguments.length === 1)
    return -x;
    else {
    var res = x;
    for (var i = 1; i < arguments.length; i++)
Severity: Minor
Found in deps/v8/benchmarks/earley-boyer.js and 1 other location - About 40 mins to fix
deps/v8/benchmarks/earley-boyer.js on lines 353..360

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

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

        toString : function () {
            return 'ChessMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
        }
Severity: Minor
Found in deps/v8/benchmarks/raytrace.js and 1 other location - About 40 mins to fix
deps/v8/benchmarks/raytrace.js on lines 371..373

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

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 (util.isBoolean(options.rejectUnauthorized)) {
    this.rejectUnauthorized = options.rejectUnauthorized;
  } else {
    this.rejectUnauthorized = false;
  }
Severity: Minor
Found in lib/_tls_wrap.js and 1 other location - About 40 mins to fix
lib/_tls_wrap.js on lines 708..712

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

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

  this.printEntries(flatViewNodes, totalTicks, nonLibraryTicks,
      function(name) { return self.isJsCode(name); },
      function(rec) { jsTicks += rec.selfTime; });
Severity: Minor
Found in deps/v8/tools/tickprocessor.js and 1 other location - About 40 mins to fix
deps/v8/tools/tickprocessor.js on lines 474..476

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

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

function utf16DetectIncompleteChar(buffer) {
  this.charReceived = buffer.length % 2;
  this.charLength = this.charReceived ? 2 : 0;
}
Severity: Minor
Found in lib/string_decoder.js and 1 other location - About 40 mins to fix
lib/string_decoder.js on lines 209..212

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

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

Consider simplifying this complex logical expression.
Open

  } else if (util.isRegExp(actual) && util.isRegExp(expected)) {
    return actual.source === expected.source &&
           actual.global === expected.global &&
           actual.multiline === expected.multiline &&
           actual.lastIndex === expected.lastIndex &&
Severity: Major
Found in lib/assert.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

      if ((shouldThrow && actual && expected &&
          !expectedException(actual, expected)) || (!shouldThrow && actual)) {
        throw actual;
      }
    Severity: Major
    Found in lib/assert.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

        if (ctx.customInspect &&
            value &&
            isFunction(value.inspect) &&
            // Filter out the util module, it's inspect function is special
            value.inspect !== exports.inspect &&
      Severity: Major
      Found in lib/util.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        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 - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                if (!curr || dFromUrl && cFromUrl && d._from !== curr.from
                    || d.version !== curr.version
                    || d.version !== l.version) {
                  if (parsed.type === 'local') return updateLocalDeps(l.version)
          
          
          Severity: Major
          Found in deps/npm/lib/outdated.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                  if (!er &&
                      data &&
                      !context.explicit &&
                      context.family[data.name] === data.version &&
                      !npm.config.get("force") &&
            Severity: Major
            Found in deps/npm/lib/install.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                    if (token.previous and token.previous.type == Type.WHITESPACE and
                        not token.previous.IsFirstInLine() and
                        not (last_non_space_token and last_non_space_token.line_number ==
                                 token.line_number and
                             last_non_space_token.type == Type.SEMICOLON)):
              Severity: Major
              Found in tools/closure_linter/closure_linter/ecmalintrules.py - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                      if (not first_in_line and token.previous.type == Type.WHITESPACE and
                          last_non_space_token and
                          last_non_space_token.type in Type.EXPRESSION_ENDER_TYPES):
                        self._HandleError(errors.EXTRA_SPACE, 'Extra space before "["',
                            token.previous, Position.All(token.previous.string))
                Severity: Major
                Found in tools/closure_linter/closure_linter/ecmalintrules.py - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                        if state.GetFunction().is_interface:
                          if token.previous and token.previous.type == Type.PARAMETERS:
                            self._HandleError(errors.INTERFACE_CONSTRUCTOR_CANNOT_HAVE_PARAMS,
                                'Interface constructor cannot have parameters',
                                token.previous)
                  Severity: Major
                  Found in tools/closure_linter/closure_linter/ecmalintrules.py - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if (flag.flag_type not in ('suppress', 'enum') and
                                (flag.type == None or flag.type == '' or flag.type.isspace())):
                              self._HandleError(errors.MISSING_JSDOC_TAG_TYPE,
                                                'Missing type in %s tag' % token.string, token)
                    
                    
                    Severity: Major
                    Found in tools/closure_linter/closure_linter/javascriptlintrules.py - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if (function.has_this and function.doc and
                                  not function.doc.HasFlag('this') and
                                  not function.is_constructor and
                                  not function.is_interface and
                                  '.prototype.' not in function.name):
                      Severity: Major
                      Found in tools/closure_linter/closure_linter/javascriptlintrules.py - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                              if (FLAGS.strict and not self._is_html and state.InTopLevel() and
                                  not state.InBlock()):
                        
                                # Check if we're in a fileoverview or constructor JsDoc.
                                doc_comment = state.GetDocComment()
                        Severity: Major
                        Found in tools/closure_linter/closure_linter/javascriptlintrules.py - About 40 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language