hackedteam/core-android-market

View on GitHub

Showing 566 of 566 total issues

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

    def generate (self, ps):
        """ Determines final build properties, generates sources,
        and calls 'construct'. This method should not be
        overridden.
        """
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.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 get_sibling has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    def get_sibling( self, sibling, tag = None, id = None, name = None, type = None ):
        n = sibling
        while n:
            found = True
            if type and found:

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

    def command_collect_logs(self):
        self.import_utils()
        comment_path = os.path.join( self.regression_root, self.comment )
        if not os.path.exists( comment_path ):
            self.log( 'Comment file "%s" not found; creating default comment.' % comment_path )
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

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

def compile_cpp(targets,sources=[],properties=None):
    get_rspline(targets,'-TP')
    sources += bjam.call('get-target-variable',targets,'PCH_FILE')
    sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
    compile_c_cpp(targets,sources)
Severity: Major
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py and 1 other location - About 2 hrs to fix
src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py on lines 326..330

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

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 len(raw_properties) > 0 and isinstance(raw_properties[0], property.Property):
        x = raw_properties
    else:        
        x = [property.create_from_string(ps) for ps in raw_properties]
src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py on lines 536..539

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

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 compile_cpp_preprocess(targets,sources=[],properties=None):
    get_rspline(targets,'-TP')
    sources += bjam.call('get-target-variable',targets,'PCH_FILE')
    sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
    preprocess_c_cpp(targets,sources)
Severity: Major
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py and 1 other location - About 2 hrs to fix
src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py on lines 320..324

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

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 len(component_properties_s) > 0 and isinstance(component_properties_s[0], property.Property):
        component_properties = component_properties_s
    else:
        component_properties = [property.create_from_string(p) for p in component_properties_s]
src/libbson/boost/boost_1_53_0/tools/build/v2/build/property_set.py on lines 37..40

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

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

BJamLog2Results has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class BJamLog2Results:

    def __init__(self,args=None):
        opt = optparse.OptionParser(
            usage="%prog [options] input")

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

    def valid (names):
        """ Returns true iff all elements of names are valid features.
        """
        def valid_one (name): return __all_features.has_key (name)
            
    src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py on lines 221..229

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

    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 valid (names):
        """ Returns true iff all elements of names are valid features.
        """
        def valid_one (name): return __all_features.has_key (name)
            
    src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py on lines 306..314

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

    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 viable_source_types (target_type):
        """ Helper rule, caches the result of '__viable_source_types_real'.
        """
        if not __viable_source_types_cache.has_key(target_type):
            __vst_cached_types.append(target_type)
    src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py on lines 791..798

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

    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 viable_source_types_for_generator (generator):
        """ Caches the result of 'viable_source_types_for_generator'.
        """
        if not __viable_source_types_cache.has_key(generator):
            __vstg_cached_generators.append(generator)
    src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py on lines 757..763

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

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

    def register_globals ():
        """ Registers all features and variants declared by this module.
        """
    
        # This feature is used to determine which OS we're on.
    Severity: Major
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/builtin.py - About 2 hrs to fix

      Function load_jamfile has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def load_jamfile(self, dir, jamfile_module):
              """Load a Jamfile at the given directory. Returns nothing.
              Will attempt to load the file as indicated by the JAMFILE patterns.
              Effect of calling this rule twice with the same 'dir' is underfined."""
            
      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 targets_to_stage has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def targets_to_stage(self, source_targets, ps):
              """Given the list of source targets explicitly passed to 'stage', returns the
              list of targets which must be staged."""
      
              result = []
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/stage.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 find_really has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def find_really(self, id):
              """ Find and return the target with the specified id, treated
                  relative to self.
              """
              result = None        
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.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 evaluate_requirements has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def evaluate_requirements(self, requirements, context, what):
              # Apply non-conditional requirements. 
              # It's possible that that further conditional requirement change 
              # a value set by non-conditional requirements. For example:
              #
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.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 make_result_pages has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      def make_result_pages( 
                test_results_file
              , expected_results_file
              , failures_markup_file
              , tag
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/report.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 get_data has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_data( self, node, strip = False, default = None ):
              data = None
              if node:
                  data_node = None
                  if not data_node:

      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

      Method getView has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Override
          public View getView(int position, View convertView, ViewGroup parent) {
      
              ViewHolderItem viewElements;
              if (position % 2 == 0) {
      Severity: Major
      Found in src/main/java/org/benews/BeNewsArrayAdapter.java - About 2 hrs to fix
        Severity
        Category
        Status
        Source
        Language