hackedteam/core-android-market

View on GitHub

Showing 566 of 566 total issues

File build_system.py has 336 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Status: mostly ported. Missing is --out-xml support, 'configure' integration
# and some FIXME.
# Base revision: 64351

# Copyright 2003, 2005 Dave Abrahams 
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build_system.py - About 4 hrs to fix

    Method tabPage2_Enter has 99 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private void tabPage2_Enter(object sender, EventArgs e)
        { // Properties tab shows distribution's mean, mode, median...
          try
          { // Show chosen distribution name, and parameter names & values.
            int i = distribution.SelectedIndex;

      Function project has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          def project(self, *args):
      
              jamfile_module = self.registry.current().project_module()
              attributes = self.registry.attributes(jamfile_module)
              
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

          if pch_source:
              get_manager().engine().set_update_action('compile-c-c++-pch-s', targets, sources, properties)
              get_manager().engine().add_dependency(targets,pch_source)
              compile_c_cpp_pch_s(targets,sources)
          else:
      Severity: Major
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py and 1 other location - About 3 hrs to fix
      src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py on lines 337..343

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

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

          if pch_source:
              get_manager().engine().set_update_action('compile-c-c++-pch-s', targets, sources, properties)
              get_manager().engine().add_dependency(targets,pch_source)
              compile_c_cpp_pch_s(targets,sources)
          else:
      Severity: Major
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py and 1 other location - About 3 hrs to fix
      src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py on lines 310..316

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

      CPlusPlusTranslator has 31 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class CPlusPlusTranslator(litre.LitreTranslator):
      
          _exposed_attrs = ['compile', 'test', 'ignore', 'match_stdout', 'stack', 'config'
                            , 'example', 'prefix', 'preprocessors', 'litre_directory',
                            'litre_translator', 'includes', 'build', 'jam_prefix',
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/litre/cplusplus.py - About 3 hrs to fix

        Function send_boost_developers_message has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
        Open

        def send_boost_developers_message(branch, maintainers, failing_libraries):
          to_line = 'boost@lists.boost.org'
          from_line = 'Douglas Gregor <dgregor@osl.iu.edu>'
        
          message = """From: Douglas Gregor <dgregor@osl.iu.edu>

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

                    if id and found:
                        if n.hasAttribute('id'):
                            found = found and n.getAttribute('id') == id
                        else:
                            found = found and n.hasAttribute('id') and n.getAttribute('id') == id
        src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py on lines 769..773

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

        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 __name__ == '__main__':
            run_dir = os.path.abspath( os.path.dirname( sys.argv[ 0 ] ) )
        else:
            run_dir = os.path.abspath( os.path.dirname( sys.modules[ __name__ ].__file__ ) )
        src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/boost_wide_report.py on lines 25..28

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

        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 __name__ == '__main__':
            run_dir = os.path.abspath( os.path.dirname( sys.argv[ 0 ] ) )
        else:
            run_dir = os.path.abspath( os.path.dirname( sys.modules[ __name__ ].__file__ ) )
        src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/report.py on lines 21..24

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

        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 id and found:
                        if n.hasAttribute('id'):
                            found = found and n.getAttribute('id') == id
                        else:
                            found = found and n.hasAttribute('id') and n.getAttribute('id') == id
        src/libbson/boost/boost_1_53_0/tools/regression/src/process_jam_log.py on lines 404..408

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

        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

                try:
                    return f( *args )
                except Exception, msg:
                    utils.log( '%s failed with message "%s"' % ( f.__name__, msg ) )
                    if attempts == 0: 
        src/libbson/boost/boost_1_53_0/tools/regression/src/regression.py on lines 604..613

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

        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

                    try:
                        return f()
                    except Exception, msg:
                        self.log( '%s failed with message "%s"' % ( f.__name__, msg ) )
                        if attempts == 0:
        src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/make_snapshot.py on lines 19..28

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

        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 expand_composites has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

        def expand_composites (properties):
            """ Expand all composite properties in the set so that all components
                are explicitly expressed.
            """
            explicit_features = set(p.feature() for p in properties)
        Severity: Minor
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function process_explicit_toolset_requests has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

        def process_explicit_toolset_requests():
        
            extra_properties = []
        
            option_toolsets = [e for option in b2.util.regex.transform(sys.argv, "^--toolset=(.*)$")
        Severity: Minor
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build_system.py - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        File benews-srv.py has 314 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #!/usr/bin/env python
        """Simple server that listens on port 6954 and replies with a bson encoded news
        
        Connect to it with:
        nc localhost 6954
        Severity: Minor
        Found in server/benews-srv.py - About 3 hrs to fix

          File report.py has 313 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Copyright (c) MetaCommunications, Inc. 2003-2004
          #
          # Distributed under the Boost Software License, Version 1.0. 
          # (See accompanying file LICENSE_1_0.txt or copy at 
          # http://www.boost.org/LICENSE_1_0.txt)
          Severity: Minor
          Found in src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/report.py - About 3 hrs to fix

            File property.py has 312 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # Status: ported, except for tests and --abbreviate-paths.
            # Base revision: 64070
            #
            # Copyright 2001, 2002, 2003 Dave Abrahams 
            # Copyright 2006 Rene Rivera 
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property.py - About 3 hrs to fix

              Function set has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
              Open

                  def set(self, attribute, specification, exact=False):
                      """Set the named attribute from the specification given by the user.
                      The value actually set may be different."""
              
                      if exact:
              Severity: Minor
              Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 3 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function __construct_really has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
              Open

              def __construct_really (project, name, target_type, prop_set, sources):
                  """ Attempts to construct target by finding viable generators, running them
                      and selecting the dependency graph.
                  """
                  viable_generators = find_viable_generators (target_type, prop_set)
              Severity: Minor
              Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 3 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Severity
              Category
              Status
              Source
              Language