hackedteam/core-android-market

View on GitHub

Showing 566 of 566 total issues

Function check_init_parameters has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

def check_init_parameters(toolset, requirement, *args):
    """ The rule for checking toolset parameters. Trailing parameters should all be
        parameter name/value pairs. The rule will check that each parameter either has
        a value in each invocation or has no value in each invocation. Also, the rule
        will check that the combination of all parameter values is unique in all
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/common.py - About 4 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 _translate_doxygenindex has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

    def _translate_doxygenindex( self, node ):
        #~ print '_translate_doxygenindex:', node.nodeName
        if self.args['index']:
            entries = []
            classes = []
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 4 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

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

        private void InitializeComponent()
        {
          this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
          this.logoPictureBox = new System.Windows.Forms.PictureBox();
          this.labelProductName = new System.Windows.Forms.Label();

    Function echo has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    def echo(socket, address):
    
        printl('New connection from %s:%s' % address)
        (ip, port) = address
        data = None
    Severity: Minor
    Found in server/benews-srv.py - About 4 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

    Method onPostExecute has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

            @Override
            protected void onPostExecute(ByteBuffer result) {
    
                synchronized (this) {
                    if(result != null && result.capacity() > 0) {
    Severity: Minor
    Found in src/main/java/org/benews/BackgroundSocket.java - About 4 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 __viable_source_types_real has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

    def __viable_source_types_real (target_type):
        """ Returns a list of source type which can possibly be converted
            to 'target_type' by some chain of generator invocation.
            
            More formally, takes all generators for 'target_type' and
    Severity: Minor
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 4 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 toolset_tag has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

    def toolset_tag(name, target_type, prop_set):
        tag = ''
    
        properties = prop_set.raw()
        tools = prop_set.get('<toolset>')
    Severity: Minor
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/common.py - About 4 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_file has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

    def process_file(file, outfile,key,encrypter):
        # Open file as file object and read to string
        ifile = open(file, 'r')
        if os.path.exists(outfile):
            os.remove(outfile)
    Severity: Minor
    Found in utils/encript.py - About 4 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_c(targets, sources = [], properties = None):
        get_manager().engine().set_target_variable( targets[1], 'C++FLAGS', '' )
        get_rspline(targets, '-TC')
        sources += bjam.call('get-target-variable',targets,'PCH_FILE')
        sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
    Severity: Major
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py and 1 other location - About 4 hrs to fix
    src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py on lines 297..302

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

    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_c_preprocess(targets, sources = [], properties = None):
        get_manager().engine().set_target_variable( target[1], 'C++FLAGS', '' )
        get_rspline(targets, '-TC')
        sources += bjam.call('get-target-variable',targets,'PCH_FILE')
        sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
    Severity: Major
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py and 1 other location - About 4 hrs to fix
    src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py on lines 290..295

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

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

    def send_individualized_message (branch, person, maintainers):
      # There are several states we could be in:
      #   0 Initial state. Eat everything up to the "NNN failures in MMM
      #     libraries" line
      #   1 Suppress output within this library

    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 upload( source, destination, user ):
        if sys.platform == 'win32':
            source = os.popen( 'cygpath "%s"' % source ).read().splitlines()[0]
            
        utils.checked_system( [ 
    src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/utils/sourceforge.py on lines 8..14

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

    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 download( source, destination, user ):
        if sys.platform == 'win32':
            destination = os.popen( 'cygpath "%s"' % destination ).read().splitlines()[0]
    
        utils.checked_system( [ 
    src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/utils/sourceforge.py on lines 18..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 78.

    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

            for platform in sorted_keys( self.platforms ):
                if self.platforms[platform].isBroken():
                    message += ('  ' + platform + ' ('
                                + str(len(self.platforms[platform].failures))
                                + ' failures)\n')
    src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/email_maintainers.py on lines 521..525

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

    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

                for platform in sorted_keys( self.platforms ):
                    if self.platforms[platform].isBroken():
                        message += ('  ' + platform + ' ('
                                    + str(len(self.platforms[platform].failures))
                                    + ' failures)\n')
    src/libbson/boost/boost_1_53_0/tools/regression/xsl_reports/email_maintainers.py on lines 619..623

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

    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 create_typed_metatarget(name, type, sources, requirements, default_build, usage_requirements):
        
        from b2.manager import get_manager
        t = get_manager().targets()
        
    src/libbson/boost/boost_1_53_0/tools/build/v2/tools/cast.py on lines 52..66

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

    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

    @bjam_signature((["name", "type"], ["sources", "*"], ["requirements", "*"],
                     ["default_build", "*"], ["usage_requirements", "*"]))
    def cast(name, type, sources, requirements, default_build, usage_requirements):
       
        from b2.manager import get_manager
    Severity: Major
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/cast.py and 1 other location - About 4 hrs to fix
    src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py on lines 1356..1368

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

    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

        @bjam_signature((["name"], ["sources", "*"], ["requirements", "*"],
                         ["default_build", "*"], ["usage_requirements", "*"]))
        def create_metatarget(name, sources, requirements = [], default_build = None, usage_requirements = []):
    
            from b2.manager import get_manager
    src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py on lines 1371..1382

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

    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 create_metatarget(klass, name, sources, requirements=[], default_build=[], usage_requirements=[]):
        from b2.manager import get_manager
        t = get_manager().targets()
        
        project = get_manager().projects().current()
    src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py on lines 1386..1400

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

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

        def composeEmail(self, report):
            """
            Composes an e-mail to this maintainer with information about
            the failures in his or her libraries, omitting those that come
            from "broken" platforms. Returns the e-mail text if a message

    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