Showing 2,859 of 2,859 total issues

Function bnModInverse has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function bnModInverse(m) {
  var ac = m.isEven();
  if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
  var u = m.clone(), v = this.clone();
  var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
Severity: Minor
Found in deps/v8/benchmarks/crypto.js - About 1 hr to fix

    Function RunStep has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    BenchmarkSuite.prototype.RunStep = function(runner) {
      this.results = [];
      this.runner = runner;
      var length = this.benchmarks.length;
      var index = 0;
    Severity: Minor
    Found in deps/v8/benchmarks/base.js - About 1 hr to fix

      Function run has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function run (pkg, wd, cmd, args, cb) {
        if (!pkg.scripts) pkg.scripts = {}
      
        var cmds
        if (cmd === "restart" && !pkg.scripts.restart) {
      Severity: Minor
      Found in deps/npm/lib/run-script.js - About 1 hr to fix

        Function outdated has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function outdated (args, silent, cb) {
          if (typeof cb !== "function") cb = silent, silent = false
          var dir = path.resolve(npm.dir, "..")
        
          // default depth for `outdated` is 0 (cf. `ls`)
        Severity: Minor
        Found in deps/npm/lib/outdated.js - About 1 hr to fix

          Function prettify has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function prettify (tree, installed) {
            function red (set, kv) {
              set[kv[0]] = kv[1]
              return set
            }
          Severity: Minor
          Found in deps/npm/lib/install.js - About 1 hr to fix

            Function parseField has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function parseField (f, k) {
              if (typeof f !== "string" && !(f instanceof String))
                return f
            
              // type can be an array or single thing.
            Severity: Minor
            Found in deps/npm/lib/config/core.js - About 1 hr to fix

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

                  add : function(v, w) {
                      return new Flog.RayTracer.Vector(w.x + v.x, w.y + v.y, w.z + v.z);
                  },
              Severity: Major
              Found in deps/v8/benchmarks/raytrace.js and 1 other location - About 1 hr to fix
              deps/v8/benchmarks/raytrace.js on lines 264..266

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

              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 sc_peekChar(port) {
                  if (port === undefined) // we assume the port hasn't been given.
                  port = SC_DEFAULT_IN; // THREAD: shared var...
                  var t = port.peekChar();
                  return t === SC_EOF_OBJECT? t: new sc_Char(t);
              Severity: Major
              Found in deps/v8/benchmarks/earley-boyer.js and 1 other location - About 1 hr to fix
              deps/v8/benchmarks/earley-boyer.js on lines 2541..2546

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

              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

                  multiplyVector : function(v, w) {
                      return new Flog.RayTracer.Vector(v.x * w.x, v.y * w.y, v.z * w.z);
                  },
              Severity: Major
              Found in deps/v8/benchmarks/raytrace.js and 1 other location - About 1 hr to fix
              deps/v8/benchmarks/raytrace.js on lines 255..257

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

              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 sc_readChar(port) {
                  if (port === undefined) // we assume the port hasn't been given.
                  port = SC_DEFAULT_IN; // THREAD: shared var...
                  var t = port.readChar();
                  return t === SC_EOF_OBJECT? t: new sc_Char(t);
              Severity: Major
              Found in deps/v8/benchmarks/earley-boyer.js and 1 other location - About 1 hr to fix
              deps/v8/benchmarks/earley-boyer.js on lines 2548..2553

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

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

                strict_mode_arg_parser = ArgParser(
                    re.compile("^\s*CONVERT_STRICT_MODE_ARG_CHECKED\((\w+), (\d+)\)"),
                    lambda match: Arg("StrictMode", match.group(1), int(match.group(2))))
              Severity: Major
              Found in deps/v8/tools/generate-runtime-tests.py and 5 other locations - About 1 hr to fix
              deps/v8/tools/generate-runtime-tests.py on lines 810..812
              deps/v8/tools/generate-runtime-tests.py on lines 814..816
              deps/v8/tools/generate-runtime-tests.py on lines 818..820
              deps/v8/tools/generate-runtime-tests.py on lines 831..833
              deps/v8/tools/generate-runtime-tests.py on lines 835..837

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

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

                double_arg_parser = ArgParser(
                    re.compile("^\s*CONVERT_DOUBLE_ARG_CHECKED\((\w+), (\d+)\)"),
                    lambda match: Arg("Number", match.group(1), int(match.group(2))))
              Severity: Major
              Found in deps/v8/tools/generate-runtime-tests.py and 5 other locations - About 1 hr to fix
              deps/v8/tools/generate-runtime-tests.py on lines 810..812
              deps/v8/tools/generate-runtime-tests.py on lines 814..816
              deps/v8/tools/generate-runtime-tests.py on lines 827..829
              deps/v8/tools/generate-runtime-tests.py on lines 831..833
              deps/v8/tools/generate-runtime-tests.py on lines 835..837

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

              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

                  if has_unexpected_output:
                    self.failed.append(test)
                    if test.output.HasCrashed():
                      self.crashed += 1
                  else:
              Severity: Major
              Found in deps/v8/tools/testrunner/local/execution.py and 1 other location - About 1 hr to fix
              deps/v8/tools/testrunner/network/network_execution.py on lines 210..215

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

              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

                    if support_xct:
                      support_xct.AppendProperty('buildPhases', ssbp)
                    else:
                      # TODO(mark): this assumes too much knowledge of the internals of
                      # xcodeproj_file; some of these smarts should move into xcodeproj_file
              Severity: Major
              Found in tools/gyp/pylib/gyp/generator/xcode.py and 1 other location - About 1 hr to fix
              tools/gyp/pylib/gyp/generator/xcode.py on lines 1044..1051

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

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

                boolean_arg_parser = ArgParser(
                    re.compile("^\s*CONVERT_BOOLEAN_ARG_CHECKED\((\w+), (\d+)\)"),
                    lambda match: Arg("Boolean", match.group(1), int(match.group(2))))
              Severity: Major
              Found in deps/v8/tools/generate-runtime-tests.py and 5 other locations - About 1 hr to fix
              deps/v8/tools/generate-runtime-tests.py on lines 810..812
              deps/v8/tools/generate-runtime-tests.py on lines 814..816
              deps/v8/tools/generate-runtime-tests.py on lines 818..820
              deps/v8/tools/generate-runtime-tests.py on lines 827..829
              deps/v8/tools/generate-runtime-tests.py on lines 835..837

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

              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

                      if support_xct:
                        support_xct.AppendProperty('buildPhases', ssbp)
                      else:
                        # TODO(mark): this assumes too much knowledge of the internals of
                        # xcodeproj_file; some of these smarts should move into xcodeproj_file
              Severity: Major
              Found in tools/gyp/pylib/gyp/generator/xcode.py and 1 other location - About 1 hr to fix
              tools/gyp/pylib/gyp/generator/xcode.py on lines 763..770

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

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

                number_handle_arg_parser = ArgParser(
                    re.compile("^\s*CONVERT_NUMBER_ARG_HANDLE_CHECKED\((\w+), (\d+)\)"),
                    lambda match: Arg("Number", match.group(1), int(match.group(2))))
              Severity: Major
              Found in deps/v8/tools/generate-runtime-tests.py and 5 other locations - About 1 hr to fix
              deps/v8/tools/generate-runtime-tests.py on lines 814..816
              deps/v8/tools/generate-runtime-tests.py on lines 818..820
              deps/v8/tools/generate-runtime-tests.py on lines 827..829
              deps/v8/tools/generate-runtime-tests.py on lines 831..833
              deps/v8/tools/generate-runtime-tests.py on lines 835..837

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

              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

                            if has_unexpected_output:
                              self.failed.append(test)
                              if test.output.HasCrashed():
                                self.crashed += 1
                            else:
              Severity: Major
              Found in deps/v8/tools/testrunner/network/network_execution.py and 1 other location - About 1 hr to fix
              deps/v8/tools/testrunner/local/execution.py on lines 135..140

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

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

                smi_arg_parser = ArgParser(
                    re.compile("^\s*CONVERT_SMI_ARG_CHECKED\((\w+), (\d+)\)"),
                    lambda match: Arg("Smi", match.group(1), int(match.group(2))))
              Severity: Major
              Found in deps/v8/tools/generate-runtime-tests.py and 5 other locations - About 1 hr to fix
              deps/v8/tools/generate-runtime-tests.py on lines 810..812
              deps/v8/tools/generate-runtime-tests.py on lines 818..820
              deps/v8/tools/generate-runtime-tests.py on lines 827..829
              deps/v8/tools/generate-runtime-tests.py on lines 831..833
              deps/v8/tools/generate-runtime-tests.py on lines 835..837

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

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

                property_details_parser = ArgParser(
                    re.compile("^\s*CONVERT_PROPERTY_DETAILS_CHECKED\((\w+), (\d+)\)"),
                    lambda match: Arg("PropertyDetails", match.group(1), int(match.group(2))))
              Severity: Major
              Found in deps/v8/tools/generate-runtime-tests.py and 5 other locations - About 1 hr to fix
              deps/v8/tools/generate-runtime-tests.py on lines 810..812
              deps/v8/tools/generate-runtime-tests.py on lines 814..816
              deps/v8/tools/generate-runtime-tests.py on lines 818..820
              deps/v8/tools/generate-runtime-tests.py on lines 827..829
              deps/v8/tools/generate-runtime-tests.py on lines 831..833

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

              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