Showing 1,193 of 2,859 total issues

File repl.js has 671 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
Severity: Major
Found in lib/repl.js - About 1 day to fix

    File raytrace.js has 670 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // The ray tracer code in this file is written by Adam Burmister. It
    // is available in its original form from:
    //
    //   http://labs.flog.nz.co/raytracer/
    //
    Severity: Major
    Found in deps/v8/benchmarks/raytrace.js - About 1 day to fix

      File _tls_wrap.js has 650 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // Copyright Joyent, Inc. and other Node contributors.
      //
      // // Emit `beforeExit` if the loop became alive either after emitting
      // event, or after running some callbacks.
      //
      Severity: Major
      Found in lib/_tls_wrap.js - About 1 day to fix

        Function FluidField has 285 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function FluidField(canvas) {
            function addFields(x, s, dt)
            {
                for (var i=0; i<size ; i++ ) x[i] += dt*s[i];
            }
        Severity: Major
        Found in deps/v8/benchmarks/navier-stokes.js - About 1 day to fix

          File _tls_legacy.js has 625 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Copyright Joyent, Inc. and other Node contributors.
          //
          // Permission is hereby granted, free of charge, to any person obtaining a
          // copy of this software and associated documentation files (the
          // "Software"), to deal in the Software without restriction, including
          Severity: Major
          Found in lib/_tls_legacy.js - About 1 day to fix

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

            def Execute(cmdline):
              (fd_out, outname) = tempfile.mkstemp()
              (fd_err, errname) = tempfile.mkstemp()
              process = subprocess.Popen(
                args=cmdline,
            Severity: Major
            Found in deps/v8/tools/android-run.py and 1 other location - About 1 day to fix
            deps/v8/tools/nacl-run.py on lines 44..62

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

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

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

            def Execute(cmdline):
              (fd_out, outname) = tempfile.mkstemp()
              (fd_err, errname) = tempfile.mkstemp()
              process = subprocess.Popen(
                args=cmdline,
            Severity: Major
            Found in deps/v8/tools/nacl-run.py and 1 other location - About 1 day to fix
            deps/v8/tools/android-run.py on lines 49..67

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

            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

                    'VCLinkerTool': {
                        'AdditionalDependencies': 'zx',
                        'AdditionalLibraryDirectories': 'asd',
                        'AdditionalManifestDependencies': 's2',
                        'AdditionalOptions': '/mor2',
            Severity: Major
            Found in tools/gyp/pylib/gyp/MSVSSettings_test.py and 1 other location - About 1 day to fix
            tools/gyp/pylib/gyp/MSVSSettings_test.py on lines 110..187

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

            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

                     'VCLinkerTool': {
                         'AdditionalDependencies': 'file1;file2',
                         'AdditionalLibraryDirectories': 'folder1;folder2',
                         'AdditionalManifestDependencies': 'file1;file2',
                         'AdditionalOptions': 'a string1',
            Severity: Major
            Found in tools/gyp/pylib/gyp/MSVSSettings_test.py and 1 other location - About 1 day to fix
            tools/gyp/pylib/gyp/MSVSSettings_test.py on lines 1197..1275

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

            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 _stream_readable.js has 608 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // Copyright Joyent, Inc. and other Node contributors.
            //
            // Permission is hereby granted, free of charge, to any person obtaining a
            // copy of this software and associated documentation files (the
            // "Software"), to deal in the Software without restriction, including
            Severity: Major
            Found in lib/_stream_readable.js - About 1 day to fix

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

                  while end < len(lines) and height > 0:
                    # We don't count commas at higher nesting levels.
                    if lines[end] == ',' and height == 1:
                      add_arg(lines[last_match:end])
                      last_match = end + 1
              Severity: Major
              Found in deps/v8/tools/js2c.py and 1 other location - About 1 day to fix
              tools/js2c.py on lines 138..147

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

              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

                    while end < len(lines) and height > 0:
                      # We don't count commas at higher nesting levels.
                      if lines[end] == ',' and height == 1:
                        add_arg(lines[last_match:end])
                        last_match = end + 1
              Severity: Major
              Found in tools/js2c.py and 1 other location - About 1 day to fix
              deps/v8/tools/js2c.py on lines 107..116

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

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

              SplayTree.prototype.insert = function(key, value) {
                if (this.isEmpty()) {
                  this.root_ = new SplayTree.Node(key, value);
                  return;
                }
              Severity: Major
              Found in deps/v8/benchmarks/splay.js and 2 other locations - About 1 day to fix
              deps/v8/benchmarks/spinning-balls/splay-tree.js on lines 65..87
              deps/v8/tools/splaytree.js on lines 67..89

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

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

              SplayTree.prototype.insert = function(key, value) {
                if (this.isEmpty()) {
                  this.root_ = new SplayTree.Node(key, value);
                  return;
                }
              Severity: Major
              Found in deps/v8/tools/splaytree.js and 2 other locations - About 1 day to fix
              deps/v8/benchmarks/spinning-balls/splay-tree.js on lines 65..87
              deps/v8/benchmarks/splay.js on lines 160..182

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

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

              SplayTree.prototype.insert = function(key, value) {
                if (this.isEmpty()) {
                  this.root_ = new SplayTree.Node(key, value);
                  return;
                }
              Severity: Major
              Found in deps/v8/benchmarks/spinning-balls/splay-tree.js and 2 other locations - About 1 day to fix
              deps/v8/benchmarks/splay.js on lines 160..182
              deps/v8/tools/splaytree.js on lines 67..89

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

              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 heap.reader.arch == MD_CPU_ARCHITECTURE_X86:
                  if code.startswith("e8"):
                    words = code.split()
                    if len(words) > 6 and words[5] == "call":
                      offset = int(words[4] + words[3] + words[2] + words[1], 16)
              Severity: Major
              Found in deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
              deps/v8/tools/grokdump.py on lines 2514..2520

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

              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 self.heap.reader.arch == MD_CPU_ARCHITECTURE_X86:
                    if code.startswith("e8"):
                      words = code.split()
                      if len(words) > 6 and words[5] == "call":
                        offset = int(words[4] + words[3] + words[2] + words[1], 16)
              Severity: Major
              Found in deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
              deps/v8/tools/grokdump.py on lines 909..915

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

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

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

              def GuessOS():
                id = platform.system()
                if id == 'Linux':
                  return 'linux'
                elif id == 'Darwin':
              Severity: Major
              Found in tools/utils.py and 1 other location - About 1 day to fix
              deps/v8/tools/testrunner/local/utils.py on lines 58..79

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

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

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

              def GuessOS():
                system = platform.system()
                if system == 'Linux':
                  return 'linux'
                elif system == 'Darwin':
              Severity: Major
              Found in deps/v8/tools/testrunner/local/utils.py and 1 other location - About 1 day to fix
              tools/utils.py on lines 46..67

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

              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

                      'Link': {
                          'AdditionalDependencies': 'file1;file2;file3',
                          'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
                          'AdditionalManifestDependencies': 'file1;file2;file3',
                          'AdditionalOptions': 'a_string',
              Severity: Major
              Found in tools/gyp/pylib/gyp/MSVSSettings_test.py and 1 other location - About 1 day to fix
              tools/gyp/pylib/gyp/MSVSSettings_test.py on lines 1367..1437

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

              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