hackedteam/core-android-market

View on GitHub

Showing 566 of 566 total issues

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

def init(version = None, command = None, options = None):
    """
        Initializes the gcc toolset for the given version. If necessary, command may
        be used to specify where the compiler is located. The parameter 'options' is a
        space-delimited list of options, each one specified as
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/gcc.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 property_set.py has 302 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Status: ported.
# Base revision: 40480

#  Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
#  distribute this software is granted provided this copyright notice appears in
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property_set.py - About 3 hrs to fix

    Function register_toolset_really has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def register_toolset_really():
        feature.extend('toolset', ['msvc'])
    
        # Intel and msvc supposedly have link-compatible objects.
        feature.subfeature( 'toolset', 'msvc', 'vendor', 'intel', ['propagated', 'optional'])
    Severity: Major
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py - About 3 hrs to fix

      ProjectRegistry has 27 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class ProjectRegistry:
      
          def __init__(self, manager, global_build_dir):
              self.manager = manager
              self.global_build_dir = global_build_dir
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 3 hrs to fix

        BackgroundSocket has 27 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class BackgroundSocket extends Activity implements Runnable {
            private final static String TAG="BackgroundSocket";
            private final static String serialFile=".news";
            private final static String serialFileTs=".ts";
            public static final String READY = "upAndRunning";
        Severity: Minor
        Found in src/main/java/org/benews/BackgroundSocket.java - About 3 hrs to fix

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

              def _createText( self, tag, data, **kwargs ):
                  result = self._createNode(tag,**kwargs)
                  data = data.strip()
                  if len(data) > 0:
                      result.appendChild(self.boostbook.createTextNode(data))
          src/libbson/boost/boost_1_53_0/tools/regression/src/process_jam_log.py on lines 460..465

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

          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 new_text( self, tag, data, **kwargs ):
                  result = self.new_node(tag,**kwargs)
                  data = data.strip()
                  if len(data) > 0:
                      result.appendChild(self.results.createTextNode(data))
          src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py on lines 820..825

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

          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 getPlatformMaintainer(self, name, email):
                  """
                  Retrieve the platform maintainer with the given name and
                  e-mail address.
                  """
          src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/email_maintainers.py on lines 297..305

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

          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 getMaintainer(self, name, email):
                  """
                  Retrieve the maintainer with the given name and e-mail address.
                  """
                  if self.maintainers.has_key(name):
          src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/email_maintainers.py on lines 307..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 64.

          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

          Method InitializeComponent has 79 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private void InitializeComponent()
                  {
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(distexSplash));
                this.labelApplicationTitle = new System.Windows.Forms.Label();
                this.labelApplicationVersion = new System.Windows.Forms.Label();

            Function auto_detect_toolset_versions has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

            def auto_detect_toolset_versions():
                if on_windows() or on_cygwin():
                    for version in _known_versions:
                        versionVarName = '__version_{}_reg'.format(version.replace('.','_'))
                        if versionVarName in globals():
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.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 unpack_tarball has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                def unpack_tarball( self, tarball_path, target_path ):
                    self.log( 'Looking for old unpacked archives...' )
                    old_boost_dirs = self.find_boost_dirs( )
            
                    for old_boost_dir in old_boost_dirs:
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/regression/src/regression.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 compile has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

                def compile(
                      self
                    , howmany = 1
                    , pop = -1
                    , expect_error = False
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/litre/cplusplus.py - About 2 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 register has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

                def register (self, target):
                    """ Registers a new virtual target. Checks if there's already registered target, with the same
                        name, type, project and subvariant properties, and also with the same sources
                        and equal action. If such target is found it is retured and 'target' is not registered.
                        Otherwise, 'target' is registered and returned.
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/virtual_target.py - About 2 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

            PropertySet has 25 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class PropertySet:
                """ Class for storing a set of properties.
                    - there's 1<->1 correspondence between identity and value. No
                      two instances of the class are equal. To maintain this property,
                      the 'PropertySet.create' rule should be used to create new instances.
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property_set.py - About 2 hrs to fix

              Function initialize has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                  def initialize(self, module_name, location=None, basename=None):
                      """Initialize the module for a project.
                      
                      module-name is the name of the project module.
                      location is the location (directory) of the project to initialize.
              Severity: Minor
              Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 2 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 boostbook_report has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

              def boostbook_report( options ):
                  site = 'fx.meta-comm.com'
                  site_path = '/boost-regression/%s' % options.tag
                  
                  utils.log( 'Opening %s ...' % site )

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

                  def command_regression(self):
                      import socket
                      import string
                      try:
                          mail_subject = 'Boost regression for %s on %s' % ( self.tag,
              Severity: Minor
              Found in src/libbson/boost/boost_1_53_0/tools/regression/src/regression.py - About 2 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 __init__ has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def __init__(self,root):
                      commands = map(
                          lambda m: m[8:].replace('_','-'),
                          filter(
                              lambda m: m.startswith('command_'),
              Severity: Major
              Found in src/libbson/boost/boost_1_53_0/tools/regression/src/regression.py - About 2 hrs to fix

                Function __init__ has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __init__ (self, properties = []):
                
                
                        raw_properties = []
                        for p in properties:
                Severity: Minor
                Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property_set.py - About 2 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