hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

Function publish_test_logs has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

def publish_test_logs(
    input_dirs,
    runner_id, tag, platform, comment_file, timestamp, user, source, run_type,
    dart_server = None,
    http_proxy = None,

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

Doxygen2BoostBook has 55 functions (exceeds 20 allowed). Consider refactoring.
Open

class Doxygen2BoostBook:
    
    def __init__( self, **kwargs ):
        ##
        self.args = kwargs
Severity: Major
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 7 hrs to fix

    File BackgroundSocket.java has 462 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    package org.benews;
    
    import android.app.Activity;
    import android.content.Context;
    import android.content.Intent;
    Severity: Minor
    Found in src/main/java/org/benews/BackgroundSocket.java - About 7 hrs to fix

      File gcc.py has 456 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Status: being ported by Steven Watanabe
      # Base revision: 47077
      # TODO: common.jam needs to be ported
      # TODO: generators.jam needs to have register_c_compiler.
      #
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/gcc.py - About 6 hrs to fix

        File collect_and_upload_logs.py has 456 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Copyright (c) MetaCommunications, Inc. 2003-2007
        #
        # 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)

          Method onActivityCreated has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
          Open

              @Override
              public void onActivityCreated(@Nullable Bundle savedInstanceState) {
                  super.onActivityCreated(savedInstanceState);
                  if (item_path != null && item_type != null) {
                      if (item_type.equals(BeNewsArrayAdapter.TYPE_IMG_DIR)) {
          Severity: Minor
          Found in src/main/java/org/benews/DetailFragViewImage.java - About 6 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 load_configuration_files has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
          Open

          def load_configuration_files():
              
              # Flag indicating that site configuration should not be loaded.
              ignore_site_config = "--ignore-site-config" in sys.argv
          
          
          Severity: Minor
          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build_system.py - About 6 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 builtin.py has 422 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Status: minor updates by Steven Watanabe to make gcc work
          #
          #  Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
          #  distribute this software is granted provided this copyright notice appears in
          #  all copies. This software is provided "as is" without express or implied
          Severity: Minor
          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/builtin.py - About 6 hrs to fix

            Method saveFileDialog1_FileOk has 152 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
                {
                  using (StreamWriter sw = new StreamWriter(this.saveFileDialog.FileName))
                  { // Write distribution info and properties to file.
                    sw.WriteLine( AssemblyDescription);

              Function x_build_action has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

                  def x_build_action( self, node ):
                      test_run = self.results.documentElement
                      action_node = node
                      name = self.get_child(action_node,tag='name')
                      if name:

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

                  def composeSummaryEmail(self):
                      """
                      Compose a message to send to the Boost developer's
                      list. Return the message and return it.
                      """

              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

              runner has 42 functions (exceeds 20 allowed). Consider refactoring.
              Open

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

                Function add_log has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                    def add_log(self):
                        if self.input[0]:
                            bjam_xml = self.input[0]
                        else:
                            bjam_xml = self.input[1]

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

                def format_name(format, name, target_type, prop_set):
                    """ Given a target, as given to a custom tag rule, returns a string formatted
                        according to the passed format. Format is a list of properties that is
                        represented in the result. For each element of format the corresponding target
                        information is obtained and added to the result string. For all, but the
                Severity: Minor
                Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/common.py - About 5 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 extract_news_from_line has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                def extract_news_from_line(line):
                #Date|Title|headline|content|type|filepath|imei|trials
                    news = None
                    line = line.rstrip()
                    news_item = line.split("|")
                Severity: Minor
                Found in server/benews-srv.py - About 5 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 process_jam_log.py has 378 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                #!/usr/bin/python
                # Copyright 2008 Rene Rivera
                # Distributed under the Boost Software License, Version 1.0.
                # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
                
                

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

                          private void InitializeComponent()
                          {
                              System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDistributionExplorer));
                              this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
                              this.logoPictureBox = new System.Windows.Forms.PictureBox();

                    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();
                      Severity
                      Category
                      Status
                      Source
                      Language