Showing 3,946 of 7,874 total issues

File mapmatching-08-save_failed.py has 1456 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the

    File mapmatching-07-shortestpathok.py has 1446 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
    # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
    # SUMOPy module
    # Copyright (C) 2012-2017 University of Bologna - DICAM
    # This program and the accompanying materials are made available under the

      File results_mpl.py has 1424 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
      # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
      # SUMOPy module
      # Copyright (C) 2012-2017 University of Bologna - DICAM
      # This program and the accompanying materials are made available under the
      Severity: Major
      Found in tools/contributed/sumopy/plugins/mapmatching/results_mpl.py - About 3 days to fix

        Function main has a Cognitive Complexity of 183 (exceeds 5 allowed). Consider refactoring.
        Open

        def main(options):
            targets = []
            if options.file:
                dirname = os.path.dirname(options.file)
                for line in open(options.file):
        Severity: Minor
        Found in tools/extractTest.py - About 3 days 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 mapmatching-05-ok-preinter.py has 1398 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
        # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
        # SUMOPy module
        # Copyright (C) 2012-2017 University of Bologna - DICAM
        # This program and the accompanying materials are made available under the

          File mapmatching-04-improveok.py has 1393 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
          # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
          # SUMOPy module
          # Copyright (C) 2012-2017 University of Bologna - DICAM
          # This program and the accompanying materials are made available under the

            File networktools.py has 1370 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
            # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
            # SUMOPy module
            # Copyright (C) 2012-2017 University of Bologna - DICAM
            # This program and the accompanying materials are made available under the
            Severity: Major
            Found in tools/contributed/sumopy/coremodules/network/networktools.py - About 3 days to fix

              File _vehicle.py has 1357 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # -*- coding: utf-8 -*-
              # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
              # Copyright (C) 2011-2020 German Aerospace Center (DLR) and others.
              # This program and the accompanying materials are made available under the
              # terms of the Eclipse Public License 2.0 which is available at
              Severity: Major
              Found in tools/traci/_vehicle.py - About 3 days to fix

                File results_mpl-02-iddesaster.py has 1357 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                # SUMOPy module
                # Copyright (C) 2012-2017 University of Bologna - DICAM
                # This program and the accompanying materials are made available under the

                  File prt-13-newstartok.py has 1302 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                  # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                  # SUMOPy module
                  # Copyright (C) 2012-2017 University of Bologna - DICAM
                  # This program and the accompanying materials are made available under the
                  Severity: Major
                  Found in tools/contributed/sumopy/plugins/prt/prt-13-newstartok.py - About 3 days to fix

                    File mapmatching-03-birgil-ok.py has 1280 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                    # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                    # SUMOPy module
                    # Copyright (C) 2012-2017 University of Bologna - DICAM
                    # This program and the accompanying materials are made available under the

                      File mapmatching-02-allprint.py has 1255 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                      # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                      # SUMOPy module
                      # Copyright (C) 2012-2017 University of Bologna - DICAM
                      # This program and the accompanying materials are made available under the

                        VehicleDomain has 164 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class VehicleDomain(Domain):
                            # imported for backwards compatibility
                            STOP_DEFAULT = tc.STOP_DEFAULT
                            STOP_PARKING = tc.STOP_PARKING
                            STOP_TRIGGERED = tc.STOP_TRIGGERED
                        Severity: Major
                        Found in tools/traci/_vehicle.py - About 3 days to fix

                          File prt-12-timingopt.py has 1216 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                          # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                          # SUMOPy module
                          # Copyright (C) 2012-2017 University of Bologna - DICAM
                          # This program and the accompanying materials are made available under the
                          Severity: Major
                          Found in tools/contributed/sumopy/plugins/prt/prt-12-timingopt.py - About 3 days to fix

                            File test_glcanvas.py has 1215 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                            # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                            # SUMOPy module
                            # Copyright (C) 2012-2017 University of Bologna - DICAM
                            # This program and the accompanying materials are made available under the
                            Severity: Major
                            Found in tools/contributed/sumopy/agilepy/lib_wx/test_glcanvas.py - About 3 days to fix

                              File Traci.java has 1198 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /****************************************************************************/
                              // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                              // Copyright (C) 2017-2020 German Aerospace Center (DLR) and others.
                              // TraaS module
                              // Copyright (C) 2016-2017 Dresden University of Technology
                              Severity: Major
                              Found in tools/contributed/traas/src/main/java/de/tudresden/ws/Traci.java - About 3 days to fix

                                File prt-12-berthoptok.py has 1176 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                                # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                                # SUMOPy module
                                # Copyright (C) 2012-2017 University of Bologna - DICAM
                                # This program and the accompanying materials are made available under the
                                Severity: Major
                                Found in tools/contributed/sumopy/plugins/prt/prt-12-berthoptok.py - About 3 days to fix

                                  File results_mpl-01-mono.py has 1174 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                                  # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                                  # SUMOPy module
                                  # Copyright (C) 2012-2017 University of Bologna - DICAM
                                  # This program and the accompanying materials are made available under the
                                  Severity: Major
                                  Found in tools/contributed/sumopy/plugins/mapmatching/results_mpl-01-mono.py - About 3 days to fix

                                    File prt-11-preboardingopt.py has 1146 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
                                    # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
                                    # SUMOPy module
                                    # Copyright (C) 2012-2017 University of Bologna - DICAM
                                    # This program and the accompanying materials are made available under the
                                    Severity: Major
                                    Found in tools/contributed/sumopy/plugins/prt/prt-11-preboardingopt.py - About 2 days to fix

                                      Function process_step has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def process_step(self, process):
                                              simtime = process.simtime
                                              # print 79*'_'
                                              # print 'PrtStops.process_step at',simtime
                                              net = self.get_scenario().net
                                      Severity: Minor
                                      Found in tools/contributed/sumopy/plugins/prt/prt-25-oldmergenode.py - About 2 days 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