Showing 1,193 of 2,859 total issues

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

        'Link': {
            '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 935..1005

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

File node.js has 559 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 src/node.js - About 1 day to fix

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

      if (n_chunks > 0) {
        res.writeHead(status, { 'Content-Type': 'text/plain',
                                'Transfer-Encoding': 'chunked' });
        // send body in chunks
        var len = body.length;
    Severity: Major
    Found in benchmark/http_simple.js and 1 other location - About 1 day to fix
    benchmark/http_simple_auto.js on lines 75..92

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

    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 (n_chunks > 0) {
        res.writeHead(status, { "Content-Type": "text/plain",
                                "Transfer-Encoding": "chunked" });
        // send body in chunks
        var len = body.length;
    Severity: Major
    Found in benchmark/http_simple_auto.js and 1 other location - About 1 day to fix
    benchmark/http_simple.js on lines 89..106

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

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

    function errorHandler (er) {
      // console.error("errorHandler", er)
      if (!npm.config || !npm.config.loaded) {
        // logging won't work unless we pretend that it's ready
        er = er || new Error("Exit prior to config file resolving.")
    Severity: Major
    Found in deps/npm/lib/utils/error-handler.js - About 1 day to fix

      File util.js has 551 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/util.js - About 1 day to fix

        Function masterInit has 228 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function masterInit() {
          cluster.workers = {};
        
          var intercom = new EventEmitter;
          cluster.settings = {};
        Severity: Major
        Found in lib/cluster.js - About 1 day to fix

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

            def ComputeDeps(self, spec):
              """Compute the dependencies of a gyp spec.
          
              Returns a tuple (deps, link_deps), where each is a list of
              filenames that will need to be put in front of make for either
          Severity: Major
          Found in tools/gyp/pylib/gyp/generator/make.py and 1 other location - About 1 day to fix
          tools/gyp/pylib/gyp/generator/android.py on lines 770..786

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

          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 ComputeDeps(self, spec):
              """Compute the dependencies of a gyp spec.
          
              Returns a tuple (deps, link_deps), where each is a list of
              filenames that will need to be put in front of make for either
          Severity: Major
          Found in tools/gyp/pylib/gyp/generator/android.py and 1 other location - About 1 day to fix
          tools/gyp/pylib/gyp/generator/make.py on lines 1366..1385

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

          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

          XcodeSettings has 62 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class XcodeSettings(object):
            """A class that understands the gyp 'xcode_settings' object."""
          
            # Populated lazily by _SdkPath(). Shared by all XcodeSettings, so cached
            # at class-level for efficiency.
          Severity: Major
          Found in tools/gyp/pylib/gyp/xcode_emulation.py - About 1 day to fix

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

            SplayTree.prototype.remove = function(key) {
              if (this.isEmpty()) {
                throw Error('Key not found: ' + key);
              }
              this.splay_(key);
            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 98..119
            deps/v8/benchmarks/splay.js on lines 193..214

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

            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.remove = function(key) {
              if (this.isEmpty()) {
                throw Error('Key not found: ' + key);
              }
              this.splay_(key);
            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 193..214
            deps/v8/tools/splaytree.js on lines 100..121

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

            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.remove = function(key) {
              if (this.isEmpty()) {
                throw Error('Key not found: ' + key);
              }
              this.splay_(key);
            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 98..119
            deps/v8/tools/splaytree.js on lines 100..121

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

            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 cluster.js has 519 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/cluster.js - About 1 day to fix

              File ecmalintrules.py has 518 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              #!/usr/bin/env python
              #
              # Copyright 2008 The Closure Linter Authors. All Rights Reserved.
              #
              # Licensed under the Apache License, Version 2.0 (the "License");
              Severity: Major
              Found in tools/closure_linter/closure_linter/ecmalintrules.py - About 1 day to fix

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

                        'VCCLCompilerTool': {
                            'AdditionalIncludeDirectories': 'dir1',
                            'AdditionalOptions': '/more',
                            'AdditionalUsingDirectories': 'test',
                            'AssemblerListingLocation': '$(IntDir)\\a',
                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 657..719

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

                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

                        'VCCLCompilerTool': {
                            'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
                            'AdditionalOptions': 'a_string',
                            'AdditionalUsingDirectories': 'folder1;folder2;folder3',
                            'AssemblerListingLocation': 'a_file_name',
                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 1134..1196

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

                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

                ScriptTest has 57 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class ScriptTest(unittest.TestCase):
                  def MakeEmptyTempFile(self):
                    handle, name = tempfile.mkstemp()
                    os.close(handle)
                    self._tmp_files.append(name)
                Severity: Major
                Found in deps/v8/tools/push-to-trunk/test_scripts.py - About 1 day to fix

                  File url.js has 504 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/url.js - About 1 day to fix

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

                            'ClCompile': {
                                'AdditionalIncludeDirectories': 'dir1',
                                'AdditionalOptions': '/more /J',
                                'AdditionalUsingDirectories': 'test',
                                'AssemblerListingLocation': '$(IntDir)a',
                    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 874..934

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

                    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