tools/sumolib/scenario/pop2.py

Summary

Maintainability
F
6 mos
Test Coverage

File pop2.py has 3007 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-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
# https://www.eclipse.org/legal/epl-2.0/
Severity: Major
Found in tools/sumolib/scenario/pop2.py - About 1 wk to fix

    Function iterateScenarios has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            desc = {"name": "TurnIteration"}
            for r in range(self.getInt("rightFrom"), self.getInt("rightTo"), self.getInt("rightStep")):
                for l in range(self.getInt("leftFrom"), self.getInt("leftTo"), self.getInt("leftStep")):
                    print("Computing for %s<->%s" % (r, l))
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 iterateScenarios has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            desc = {"name": "iterateFlowsNA"}
            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                for f2begin in range(self.getInt("f2beginFrom"), self.getInt("f2beginTo"), self.getInt("f2beginStep")):
                    for f2end in range(self.getInt("f2endFrom"), self.getInt("f2endTo"), self.getInt("f2endStep")):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 iterateScenarios has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            desc = {"name": "NetFlowsDistancesA"}
            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                for f2 in range(self.getInt("f2from"), self.getInt("f2to"), self.getInt("f2step")):
                    for o in self.offsets:
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 getScenarioSet has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def getScenarioSet(name, params):
        if name == "iterateFlowsNA":
            return ScenarioSet_IterateFlowsNA(params)
        if name == "iterateFlowsA":
            return ScenarioSet_IterateFlowsA(params)
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS2 has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS2(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
            fdo.write("<additional>\n")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS2 has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS2(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS2 has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS2(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS2 has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS2(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 iterateScenarios has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            desc = {"name": "CorrFlowsDistancesA"}
            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                for f2 in range(self.getInt("f2from"), self.getInt("f2to"), self.getInt("f2step")):
                    for d1 in range(self.getInt("d1from"), self.getInt("d1to"), self.getInt("d1step")):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 iterateScenarios has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            """
            Yields returning a built scenario and its description as key/value pairs
            """
            desc = {"name": "TurnIteration"}
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
            fdo.write("<additional>\n")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
            fdo.write("<additional>\n")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 runSingle has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def runSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 runSingle has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def runSingle(self, RWScurves, p1, p2, uID=None):
            cWE = RWScurves[0]
            cNS = RWScurves[1]
            cEW = RWScurves[2]
            cSN = RWScurves[1]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
            fdo.write("<additional>\n")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
            fdo.write("<additional>\n")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 adapt2TLS has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(
                scenario.sandboxPath("tls_adapted_%s" % sID))
            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.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 getSingle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 adaptOutputs has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def adaptOutputs(self, sID, scenario, options, tls_algorithm):
            args = []
            files = {}
            # those set on the command line
            tripinfoFile = scenario.fullPath('tripinfos_%s.xml' % sID)
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getSingle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getSingle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getSingle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getSingle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getSingle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 runSingle has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def runSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 runSingle has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def runSingle(self, RWScurves, g1, g2, uID=None):
            cWE = RWScurves[0]
            cNS = RWScurves[1]
            cEW = RWScurves[2]
            cSN = RWScurves[1]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 runSingle has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def runSingle(self, RWScurves, f1, f2, uID=None):
            cWE = RWScurves[0]
            cNS = RWScurves[1]
            cEW = RWScurves[2]
            cSN = RWScurves[1]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getSingle has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            cWE = RWScurves[iWE]
            cNS = RWScurves[iNS]
            cEW = RWScurves[iEW]
            cSN = RWScurves[iSN]
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 adapt2TLS2 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS2(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
            fdo.write("<additional>\n")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 adapt2TLS has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
            # adapt tls to current settings
            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
            fdo.write("<additional>\n")
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            desc = {"name": "iterateFlowsA"}
            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                for f2 in range(self.getInt("f2from"), self.getInt("f2to"), self.getInt("f2step")):
                    if f1 == 0 and f2 == 0:
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "RiLSA1LoadCurvesBothTLS24"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "RiLSA1LoadCurvesOutTLS"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            desc = {"name": "BasicOutflow"}
            for f1 in range(self.getInt("g1from"), self.getInt("g1to"), self.getInt("g1step")):
                for f2 in range(self.getInt("g2from"), self.getInt("g2to"), self.getInt("g2step")):
                    if f1 == 0 and f2 == 0:
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "RiLSA1LoadCurves"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "RiLSA1LoadCurvesBothTLS"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            desc = {"name": "iterateFlowsNA"}
            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                for f2 in range(self.getInt("f2from"), self.getInt("f2to"), self.getInt("f2step")):
                    if f1 == 0 and f2 == 0:
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            """
            Yields returning a built scenario and its description as key/value pairs
            """
            # desc = {"name": "RiLSA1LoadCurvesSampled"}
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "RiLSA1LoadCurvesOutTLS24"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "BasicRiLSANet"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "BasicRiLSANet2x2"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 getRunsMatrix has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def getRunsMatrix(self):
            ret = []
            ranges = [[], []]
            RWScurves = getRWScurves()
            i = 0
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 iterateScenarios has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def iterateScenarios(self):
            # desc = {"name": "BasicRiLSACorridor3"}
            RWScurves = getRWScurves()
            for iWE, cWE in enumerate(RWScurves):
                for iNS, cNS in enumerate(RWScurves):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 1 hr 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 genDemand has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def genDemand(self, scenario, simSteps, amplitude, frequency):
            # fd = tempfile.NamedTemporaryFile(mode="w", delete=False)
            fd = open(scenario.demandName, "w")
            # ---routes---
            print("""<routes>
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 55 mins 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 getSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
    Severity: Minor
    Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

      Function runSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def runSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
      Severity: Minor
      Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

        Function getSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
        Severity: Minor
        Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

          Function getSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
          Severity: Minor
          Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

            Function getSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
            Severity: Minor
            Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

              Function getSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
              Severity: Minor
              Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                Function runSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def runSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
                Severity: Minor
                Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                  Function getSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
                  Severity: Minor
                  Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                    Function getSingle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
                    Severity: Minor
                    Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if p[1] == 40:
                                                  i1 = i
                                              elif p[1] == 12:
                                                  i2 = i
                                          tls._programs[prog]._type = tls_algorithm
                      Severity: Major
                      Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if p[1] == 40:
                                                    i1 = i
                                                elif p[1] == 12:
                                                    i2 = i
                                            tls._programs[prog]._type = tls_algorithm
                        Severity: Major
                        Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if p[1] == 40:
                                                      i1 = i
                                                  elif p[1] == 12:
                                                      i2 = i
                                              tls._programs[prog]._type = tls_algorithm
                          Severity: Major
                          Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if f1 == 0 and f2begin == 0 and f2end == 0:
                                                        continue
                                                    print("Computing for %s<->%s->%s@%s" %
                            Severity: Major
                            Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      for i in range(1, 6):
                                                          # why isn't it possible to get a network and return
                                                          # all possible routes or whatever - to ease the
                                                          # process
                                                          s.demand.addStream(demandGenerator.Stream(
                              Severity: Major
                              Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if True:
                                                            hd = f2duration / 2
                                                            s.demand = demandGenerator.Demand()
                                                            # why isn't it possible to get a network and return
                                                            # all possible routes or whatever - to ease the
                                Severity: Major
                                Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if p[1] == 40:
                                                              i1 = i
                                                          elif p[1] == 12:
                                                              i2 = i
                                                      tls._programs[prog]._type = tls_algorithm
                                  Severity: Major
                                  Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            for i in range(1, 6):
                                                                # why isn't it possible to get a network and return
                                                                # all possible routes or whatever - to ease the
                                                                # process
                                                                s.demand.addStream(demandGenerator.Stream(
                                    Severity: Major
                                    Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if p[1] == 40:
                                                                  i1 = i
                                                              elif p[1] == 12:
                                                                  i2 = i
                                                          tls._programs[prog]._type = tls_algorithm
                                      Severity: Major
                                      Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if p[1] == 40:
                                                                    i1 = i
                                                                elif p[1] == 12:
                                                                    i2 = i
                                                            tls._programs[prog]._type = tls_algorithm
                                        Severity: Major
                                        Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                  for i in range(1, 6):
                                                                      # why isn't it possible to get a network and return
                                                                      # all possible routes or whatever - to ease the
                                                                      # process
                                                                      s.demand.addStream(demandGenerator.Stream(
                                          Severity: Major
                                          Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    if p[1] == 40:
                                                                        i1 = i
                                                                    elif p[1] == 12:
                                                                        i2 = i
                                                                tls._programs[prog]._type = tls_algorithm
                                            Severity: Major
                                            Found in tools/sumolib/scenario/pop2.py - About 45 mins to fix

                                              Function genDemand has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  def genDemand(self, scenario, simSteps, offset, frequency):
                                                      # fd = tempfile.NamedTemporaryFile(mode="w", delete=False)
                                                      fd = open(scenario.demandName, "w")
                                                      # ---routes---
                                                      print("""<routes>
                                              Severity: Minor
                                              Found in tools/sumolib/scenario/pop2.py - About 35 mins 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 adapt2TLS2 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  def adapt2TLS2(self, sID, scenario, options, tls_algorithm):
                                                      # adapt tls to current settings
                                                      scenario.addAdditionalFile(
                                                          scenario.sandboxPath("tls_adapted_%s" % sID))
                                                      fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
                                              Severity: Minor
                                              Found in tools/sumolib/scenario/pop2.py - About 35 mins 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 adapt2TLS2 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  def adapt2TLS2(self, sID, scenario, options, tls_algorithm):
                                                      # adapt tls to current settings
                                                      scenario.addAdditionalFile(
                                                          scenario.sandboxPath("tls_adapted_%s" % sID))
                                                      fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
                                              Severity: Minor
                                              Found in tools/sumolib/scenario/pop2.py - About 35 mins 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

                                              Avoid too many return statements within this function.
                                              Open

                                                      return ScenarioSet_RiLSA1Outflow(params)
                                              Severity: Major
                                              Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                        return ScenarioSet_NetFlowsDistancesA(params)
                                                Severity: Major
                                                Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                          return ScenarioSet_CorrFlowsDistancesA(params)
                                                  Severity: Major
                                                  Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                            return ScenarioSet_BasicRiLSANet(params)
                                                    Severity: Major
                                                    Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                              return ScenarioSet_RiLSA1LoadCurvesBothTLS24(params)
                                                      Severity: Major
                                                      Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                                return ScenarioSet_BasicRiLSACorridor3(params)
                                                        Severity: Major
                                                        Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  return ScenarioSet_RiLSA1LoadCurvesBothTLS(params)
                                                          Severity: Major
                                                          Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                    return ScenarioSet_SinSinDemand(params)
                                                            Severity: Major
                                                            Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                      return ScenarioSet_RiLSA1PedFlow(params)
                                                              Severity: Major
                                                              Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                        return ScenarioSet_RiLSA1PTIteration(params)
                                                                Severity: Major
                                                                Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                          return ScenarioSet_DemandStep(params)
                                                                  Severity: Major
                                                                  Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                            return ScenarioSet_TurnIteration(params)
                                                                    Severity: Major
                                                                    Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                              return ScenarioSet_RiLSA1LoadCurvesOutTLS24(params)
                                                                      Severity: Major
                                                                      Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                                return ScenarioSet_BasicRiLSANet2x2(params)
                                                                        Severity: Major
                                                                        Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                  return ScenarioSet_OneSinDemand(params)
                                                                          Severity: Major
                                                                          Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                    return ScenarioSet_BasicRiLSANet2x2(params)
                                                                            Severity: Major
                                                                            Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                      return ScenarioSet_RiLSA1LoadCurvesOutTLS(params)
                                                                              Severity: Major
                                                                              Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                        return ScenarioSet_BasicRiLSACorridor3(params)
                                                                                Severity: Major
                                                                                Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                          return ScenarioSet_RealWorld(params)
                                                                                  Severity: Major
                                                                                  Found in tools/sumolib/scenario/pop2.py - About 30 mins to fix

                                                                                    Function iterateScenarios has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def iterateScenarios(self):
                                                                                            desc = {"name": "OneSinDemand"}
                                                                                            for amplitude in self.amplitudes:
                                                                                                for freq in self.frequencies:
                                                                                                    print("Computing for %s<->%s" % (amplitude, freq))
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py - About 25 mins 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 getRunsMatrix has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            getRWScurves()
                                                                                            i = 0
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py - About 25 mins 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 getRunsMatrix has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for o in self.offsets:
                                                                                                for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py - About 25 mins 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 iterateScenarios has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def iterateScenarios(self):
                                                                                            desc = {"name": "SinSinDemand"}
                                                                                            for offset in self.offsets:
                                                                                                for freq in self.frequencies:
                                                                                                    print("Computing for %s<->%s" % (offset, freq))
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py - About 25 mins 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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                    class ScenarioSet_RiLSA1LoadCurvesOutTLS24(ScenarioSet):
                                                                                    
                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "RiLSA1LoadCurvesOutTLS24", merge(
                                                                                                {},
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 2 wks to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2288..2461
                                                                                    tools/sumolib/scenario/pop2.py on lines 2646..2820

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                    class ScenarioSet_RiLSA1LoadCurvesBothTLS(ScenarioSet):
                                                                                    
                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "RiLSA1LoadCurvesBothTLS", merge(
                                                                                                {},
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 2 wks to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2288..2461
                                                                                    tools/sumolib/scenario/pop2.py on lines 2466..2641

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                    class ScenarioSet_RiLSA1LoadCurvesOutTLS(ScenarioSet):
                                                                                    
                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "RiLSA1LoadCurvesOutTLS", merge(
                                                                                                {},
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 2 wks to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2466..2641
                                                                                    tools/sumolib/scenario/pop2.py on lines 2646..2820

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

                                                                                    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 adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(
                                                                                                scenario.sandboxPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 3437..3476

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

                                                                                    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 adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(
                                                                                                scenario.sandboxPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.sandboxPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 3259..3298

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

                                                                                    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 adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 516..546

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

                                                                                    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 adapt2TLS2(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 652..682

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

                                                                                    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 getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
                                                                                            cWE = RWScurves[iWE]
                                                                                            cNS = RWScurves[iNS]
                                                                                            cEW = RWScurves[iEW]
                                                                                            cSN = RWScurves[iSN]
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 3374..3413

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

                                                                                    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 getSingle(self, RWScurves, iWE, iNS, iEW, iSN, uID=None):
                                                                                            cWE = RWScurves[iWE]
                                                                                            cNS = RWScurves[iNS]
                                                                                            cEW = RWScurves[iEW]
                                                                                            cSN = RWScurves[iSN]
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 3197..3235

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 3 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 772..798
                                                                                    tools/sumolib/scenario/pop2.py on lines 1619..1645
                                                                                    tools/sumolib/scenario/pop2.py on lines 1777..1803
                                                                                    tools/sumolib/scenario/pop2.py on lines 1917..1943

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 3 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 354..380
                                                                                    tools/sumolib/scenario/pop2.py on lines 772..798
                                                                                    tools/sumolib/scenario/pop2.py on lines 1619..1645
                                                                                    tools/sumolib/scenario/pop2.py on lines 1777..1803

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 3 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 354..380
                                                                                    tools/sumolib/scenario/pop2.py on lines 1619..1645
                                                                                    tools/sumolib/scenario/pop2.py on lines 1777..1803
                                                                                    tools/sumolib/scenario/pop2.py on lines 1917..1943

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 3 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 354..380
                                                                                    tools/sumolib/scenario/pop2.py on lines 772..798
                                                                                    tools/sumolib/scenario/pop2.py on lines 1777..1803
                                                                                    tools/sumolib/scenario/pop2.py on lines 1917..1943

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 3 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 354..380
                                                                                    tools/sumolib/scenario/pop2.py on lines 772..798
                                                                                    tools/sumolib/scenario/pop2.py on lines 1619..1645
                                                                                    tools/sumolib/scenario/pop2.py on lines 1917..1943

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

                                                                                    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 iterateScenarios(self):
                                                                                            desc = {"name": "iterateFlowsA"}
                                                                                            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                                                                                                for f2 in range(self.getInt("f2from"), self.getInt("f2to"), self.getInt("f2step")):
                                                                                                    if f1 == 0 and f2 == 0:
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 3 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 721..755

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

                                                                                    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 iterateScenarios(self):
                                                                                            desc = {"name": "BasicOutflow"}
                                                                                            for f1 in range(self.getInt("g1from"), self.getInt("g1to"), self.getInt("g1step")):
                                                                                                for f2 in range(self.getInt("g2from"), self.getInt("g2to"), self.getInt("g2step")):
                                                                                                    if f1 == 0 and f2 == 0:
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 3 days to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 303..337

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

                                                                                    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 getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            RWScurves = getRWScurves()
                                                                                            i = 0
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 630..647

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

                                                                                    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 getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            RWScurves = getRWScurves()
                                                                                            i = 0
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 459..476

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

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(
                                                                                                scenario.fullPath("tls_adapted_%s_%s" % (sID, tls_algorithm)))
                                                                                            fdo = open(
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 3 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2053..2072
                                                                                    tools/sumolib/scenario/pop2.py on lines 2178..2197
                                                                                    tools/sumolib/scenario/pop2.py on lines 2253..2272

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

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(
                                                                                                scenario.fullPath("tls_adapted_%s_%s" % (sID, tls_algorithm)))
                                                                                            fdo = open(
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 3 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 252..271
                                                                                    tools/sumolib/scenario/pop2.py on lines 2053..2072
                                                                                    tools/sumolib/scenario/pop2.py on lines 2253..2272

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

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(
                                                                                                scenario.fullPath("tls_adapted_%s_%s" % (sID, tls_algorithm)))
                                                                                            fdo = open(
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 3 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 252..271
                                                                                    tools/sumolib/scenario/pop2.py on lines 2053..2072
                                                                                    tools/sumolib/scenario/pop2.py on lines 2178..2197

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

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                        def adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(
                                                                                                scenario.fullPath("tls_adapted_%s_%s" % (sID, tls_algorithm)))
                                                                                            fdo = open(
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 3 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 252..271
                                                                                    tools/sumolib/scenario/pop2.py on lines 2178..2197
                                                                                    tools/sumolib/scenario/pop2.py on lines 2253..2272

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

                                                                                    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 adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1345..1362

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

                                                                                    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 adapt2TLS(self, sID, scenario, options, tls_algorithm):
                                                                                            # adapt tls to current settings
                                                                                            scenario.addAdditionalFile(scenario.fullPath("tls_adapted_%s" % sID))
                                                                                            fdo = open(scenario.fullPath("tls_adapted_%s.add.xml" % sID), "w")
                                                                                            fdo.write("<additional>\n")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1469..1486

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

                                                                                    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 __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "OneSinDemand", merge(
                                                                                                {"amplFrom": "0", "amplTo": "1201", "amplStep": "200",
                                                                                                    "freqFrom": "0", "freqTo": "11", "freqStep": "1"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1245..1259

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

                                                                                    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 __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "SinSinDemand", merge(
                                                                                                {"offsetFrom": "0", "offsetTo": "6.28", "offsetStep": ".628",
                                                                                                    "freqFrom": "0", "freqTo": "21", "freqStep": "2"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1376..1390

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for r in range(self.getInt("rightFrom"), self.getInt("rightTo"), self.getInt("rightStep")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 237..247
                                                                                    tools/sumolib/scenario/pop2.py on lines 339..349
                                                                                    tools/sumolib/scenario/pop2.py on lines 757..767
                                                                                    tools/sumolib/scenario/pop2.py on lines 2038..2048

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 339..349
                                                                                    tools/sumolib/scenario/pop2.py on lines 757..767
                                                                                    tools/sumolib/scenario/pop2.py on lines 2038..2048
                                                                                    tools/sumolib/scenario/pop2.py on lines 2163..2173

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 237..247
                                                                                    tools/sumolib/scenario/pop2.py on lines 757..767
                                                                                    tools/sumolib/scenario/pop2.py on lines 2038..2048
                                                                                    tools/sumolib/scenario/pop2.py on lines 2163..2173

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for p1 in range(self.getInt("p1from"), self.getInt("p1to"), self.getInt("p1step")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 884..894
                                                                                    tools/sumolib/scenario/pop2.py on lines 1031..1041

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for g1 in range(self.getInt("g1from"), self.getInt("g1to"), self.getInt("g1step")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 237..247
                                                                                    tools/sumolib/scenario/pop2.py on lines 339..349
                                                                                    tools/sumolib/scenario/pop2.py on lines 2038..2048
                                                                                    tools/sumolib/scenario/pop2.py on lines 2163..2173

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for g1 in range(self.getInt("g1from"), self.getInt("g1to"), self.getInt("g1step")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1031..1041
                                                                                    tools/sumolib/scenario/pop2.py on lines 1170..1180

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

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for r in range(self.getInt("rightFrom"), self.getInt("rightTo"), self.getInt("rightStep")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 4 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 237..247
                                                                                    tools/sumolib/scenario/pop2.py on lines 339..349
                                                                                    tools/sumolib/scenario/pop2.py on lines 757..767
                                                                                    tools/sumolib/scenario/pop2.py on lines 2163..2173

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 884..894
                                                                                    tools/sumolib/scenario/pop2.py on lines 1170..1180

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

                                                                                    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 iterateScenarios(self):
                                                                                            desc = {"name": "OneSinDemand"}
                                                                                            for amplitude in self.amplitudes:
                                                                                                for freq in self.frequencies:
                                                                                                    print("Computing for %s<->%s" % (amplitude, freq))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1316..1328

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

                                                                                    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 iterateScenarios(self):
                                                                                            desc = {"name": "SinSinDemand"}
                                                                                            for offset in self.offsets:
                                                                                                for freq in self.frequencies:
                                                                                                    print("Computing for %s<->%s" % (offset, freq))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 day to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1440..1452

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

                                                                                    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 getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for offset in self.offsets:
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 7 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1454..1464

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

                                                                                    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 getRunsMatrix(self):
                                                                                            ret = []
                                                                                            ranges = [[], []]
                                                                                            for amplitude in self.amplitudes:
                                                                                                ret.append([])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 7 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1330..1340

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                            for i in range(1, 6):
                                                                                                                # why isn't it possible to get a network and return
                                                                                                                # all possible routes or whatever - to ease the
                                                                                                                # process
                                                                                                                s.demand.addStream(demandGenerator.Stream(
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 6 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1871..1881
                                                                                    tools/sumolib/scenario/pop2.py on lines 1882..1892

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                            for i in range(1, 6):
                                                                                                                # why isn't it possible to get a network and return
                                                                                                                # all possible routes or whatever - to ease the
                                                                                                                # process
                                                                                                                s.demand.addStream(demandGenerator.Stream(
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 6 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1737..1747
                                                                                    tools/sumolib/scenario/pop2.py on lines 1871..1881

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                            for i in range(1, 6):
                                                                                                                # why isn't it possible to get a network and return
                                                                                                                # all possible routes or whatever - to ease the
                                                                                                                # process
                                                                                                                s.demand.addStream(demandGenerator.Stream(
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 6 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1737..1747
                                                                                    tools/sumolib/scenario/pop2.py on lines 1882..1892

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            f1num = 1 + \
                                                                                                (self.getInt("rightFrom") - self.getInt("rightTo")) / \
                                                                                                self.getInt("rightStep")
                                                                                            f2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 191..198
                                                                                    tools/sumolib/scenario/pop2.py on lines 290..297
                                                                                    tools/sumolib/scenario/pop2.py on lines 712..719
                                                                                    tools/sumolib/scenario/pop2.py on lines 826..833
                                                                                    tools/sumolib/scenario/pop2.py on lines 967..974
                                                                                    tools/sumolib/scenario/pop2.py on lines 1101..1108
                                                                                    tools/sumolib/scenario/pop2.py on lines 1981..1988

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            f1num = 1 + \
                                                                                                (self.getInt("f1to") - self.getInt("f1from")) / \
                                                                                                self.getInt("f1step")
                                                                                            f2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 191..198
                                                                                    tools/sumolib/scenario/pop2.py on lines 712..719
                                                                                    tools/sumolib/scenario/pop2.py on lines 826..833
                                                                                    tools/sumolib/scenario/pop2.py on lines 967..974
                                                                                    tools/sumolib/scenario/pop2.py on lines 1101..1108
                                                                                    tools/sumolib/scenario/pop2.py on lines 1981..1988
                                                                                    tools/sumolib/scenario/pop2.py on lines 2092..2099

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            f1num = 1 + \
                                                                                                (self.getInt("f1to") - self.getInt("f1from")) / \
                                                                                                self.getInt("f1step")
                                                                                            f2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 290..297
                                                                                    tools/sumolib/scenario/pop2.py on lines 712..719
                                                                                    tools/sumolib/scenario/pop2.py on lines 826..833
                                                                                    tools/sumolib/scenario/pop2.py on lines 967..974
                                                                                    tools/sumolib/scenario/pop2.py on lines 1101..1108
                                                                                    tools/sumolib/scenario/pop2.py on lines 1981..1988
                                                                                    tools/sumolib/scenario/pop2.py on lines 2092..2099

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            g1num = 1 + \
                                                                                                (self.getInt("g1to") - self.getInt("g1from")) / \
                                                                                                self.getInt("g1step")
                                                                                            g2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 191..198
                                                                                    tools/sumolib/scenario/pop2.py on lines 290..297
                                                                                    tools/sumolib/scenario/pop2.py on lines 826..833
                                                                                    tools/sumolib/scenario/pop2.py on lines 967..974
                                                                                    tools/sumolib/scenario/pop2.py on lines 1101..1108
                                                                                    tools/sumolib/scenario/pop2.py on lines 1981..1988
                                                                                    tools/sumolib/scenario/pop2.py on lines 2092..2099

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            p1num = 1 + \
                                                                                                (self.getInt("p1to") - self.getInt("p1from")) / \
                                                                                                self.getInt("p1step")
                                                                                            p2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 191..198
                                                                                    tools/sumolib/scenario/pop2.py on lines 290..297
                                                                                    tools/sumolib/scenario/pop2.py on lines 712..719
                                                                                    tools/sumolib/scenario/pop2.py on lines 826..833
                                                                                    tools/sumolib/scenario/pop2.py on lines 967..974
                                                                                    tools/sumolib/scenario/pop2.py on lines 1981..1988
                                                                                    tools/sumolib/scenario/pop2.py on lines 2092..2099

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            f1num = 1 + \
                                                                                                (self.getInt("f1to") - self.getInt("f1from")) / \
                                                                                                self.getInt("f1step")
                                                                                            f2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 191..198
                                                                                    tools/sumolib/scenario/pop2.py on lines 290..297
                                                                                    tools/sumolib/scenario/pop2.py on lines 712..719
                                                                                    tools/sumolib/scenario/pop2.py on lines 826..833
                                                                                    tools/sumolib/scenario/pop2.py on lines 1101..1108
                                                                                    tools/sumolib/scenario/pop2.py on lines 1981..1988
                                                                                    tools/sumolib/scenario/pop2.py on lines 2092..2099

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            f1num = 1 + \
                                                                                                (self.getInt("rightFrom") - self.getInt("rightTo")) / \
                                                                                                self.getInt("rightStep")
                                                                                            f2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 191..198
                                                                                    tools/sumolib/scenario/pop2.py on lines 290..297
                                                                                    tools/sumolib/scenario/pop2.py on lines 712..719
                                                                                    tools/sumolib/scenario/pop2.py on lines 826..833
                                                                                    tools/sumolib/scenario/pop2.py on lines 967..974
                                                                                    tools/sumolib/scenario/pop2.py on lines 1101..1108
                                                                                    tools/sumolib/scenario/pop2.py on lines 2092..2099

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def getNumRuns(self):
                                                                                            f1num = 1 + \
                                                                                                (self.getInt("g1to") - self.getInt("g1from")) / \
                                                                                                self.getInt("g1step")
                                                                                            f2num = 1 + \
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 191..198
                                                                                    tools/sumolib/scenario/pop2.py on lines 290..297
                                                                                    tools/sumolib/scenario/pop2.py on lines 712..719
                                                                                    tools/sumolib/scenario/pop2.py on lines 967..974
                                                                                    tools/sumolib/scenario/pop2.py on lines 1101..1108
                                                                                    tools/sumolib/scenario/pop2.py on lines 1981..1988
                                                                                    tools/sumolib/scenario/pop2.py on lines 2092..2099

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                        def iterateScenarios(self):
                                                                                            # desc = {"name": "RiLSA1PedFlow"}
                                                                                            RWScurves = getRWScurves()
                                                                                            for f1 in range(self.getInt("f1from"), self.getInt("f1to"), self.getInt("f1step")):
                                                                                                for f2 in range(self.getInt("f2from"), self.getInt("f2to"), self.getInt("f2step")):
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 838..843
                                                                                    tools/sumolib/scenario/pop2.py on lines 1113..1118

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                        def iterateScenarios(self):
                                                                                            # desc = {"name": "RiLSA1PedFlow"}
                                                                                            RWScurves = getRWScurves()
                                                                                            for p1 in range(self.getInt("p1from"), self.getInt("p1to"), self.getInt("p1step")):
                                                                                                for p2 in range(self.getInt("p2from"), self.getInt("p2to"), self.getInt("p2step")):
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 838..843
                                                                                    tools/sumolib/scenario/pop2.py on lines 979..984

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                        def iterateScenarios(self):
                                                                                            # desc = {"name": "RiLSA1Outflow"}
                                                                                            RWScurves = getRWScurves()
                                                                                            for g1 in range(self.getInt("g1from"), self.getInt("g1to"), self.getInt("g1step")):
                                                                                                for g2 in range(self.getInt("g2from"), self.getInt("g2to"), self.getInt("g2step")):
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 5 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 979..984
                                                                                    tools/sumolib/scenario/pop2.py on lines 1113..1118

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

                                                                                    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

                                                                                                for i in range(p1 / 2, 3600, p1):
                                                                                                    vehicles.append(
                                                                                                        demandGenerator.Vehicle("bus+p1#" + str(i), int(i), "emp", "mw", "bus"))
                                                                                                    vehicles.append(
                                                                                                        demandGenerator.Vehicle("bus-p1#" + str(i), int(i), "wmp", "me", "bus"))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1155..1159

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

                                                                                    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

                                                                                                for i in range(p1 / 2, 3600, p1):
                                                                                                    vehicles.append(
                                                                                                        demandGenerator.Vehicle("bus+p2#" + str(i), int(i), "nmp", "ms", "bus"))
                                                                                                    vehicles.append(
                                                                                                        demandGenerator.Vehicle("bus-p2#" + str(i), int(i), "smp", "mw", "bus"))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 4 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1150..1154

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                if random.uniform(0, 1) < pv1:
                                                                                                    pv1 = pv1 - 1.
                                                                                                    print('    <vehicle id="%i" type="passenger" route="WE" depart="%i" departSpeed="13.89" />' % (
                                                                                                        vehNr, i), file=fd)
                                                                                                    vehNr += 1
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 4 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1283..1290
                                                                                    tools/sumolib/scenario/pop2.py on lines 1294..1301

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                if random.uniform(0, 1) < pv2:
                                                                                                    pv2 = pv2 - 1.
                                                                                                    print('    <vehicle id="%i" type="passenger" route="NS" depart="%i" departSpeed="13.89" />' % (
                                                                                                        vehNr, i), file=fd)
                                                                                                    vehNr += 1
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 4 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1283..1290
                                                                                    tools/sumolib/scenario/pop2.py on lines 1412..1419

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                if random.uniform(0, 1) < pv1:
                                                                                                    pv1 = pv1 - 1.
                                                                                                    print('    <vehicle id="%i" type="passenger" route="WE" depart="%i" departSpeed="13.89" />' % (
                                                                                                        vehNr, i), file=fd)
                                                                                                    vehNr += 1
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 4 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1294..1301
                                                                                    tools/sumolib/scenario/pop2.py on lines 1412..1419

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if (1. - aR - aL) != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * (1. - aR - aL), "2/1_to_1/1", "1/1_to_0/1",
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 3 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2127..2132
                                                                                    tools/sumolib/scenario/pop2.py on lines 2144..2149

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if (1. - aR - aL) != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * (1. - aR - aL), "0/1_to_1/1", "1/1_to_2/1",
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 3 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2015..2020
                                                                                    tools/sumolib/scenario/pop2.py on lines 2127..2132

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if (1. - aR - aL) != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * (1. - aR - aL), "2/1_to_1/1", "1/1_to_0/1",
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 3 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2015..2020
                                                                                    tools/sumolib/scenario/pop2.py on lines 2144..2149

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

                                                                                    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 getAdditionalDivider(self):
                                                                                            ret = []
                                                                                            for i in range(1, 10):
                                                                                                ret.append([i * 4 - .5, -0.5, i * 4 - .5, 3.5])
                                                                                            return ret
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 3 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1823..1827

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

                                                                                    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 getAdditionalDivider(self):
                                                                                            ret = []
                                                                                            for i in range(1, 7):
                                                                                                ret.append([i * 6 - .5, -0.5, i * 6 - .5, 5.5])
                                                                                            return ret
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 3 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1963..1967

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

                                                                                    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

                                                                                                                    s.demand.addStream(demandGenerator.Stream(
                                                                                                                        None, 3600 - hd + t, 3600 - hd + t + 300, fat, "1/0_to_1/1", "1/1_to_1/2",
                                                                                                                        {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 2 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1568..1570

                                                                                    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

                                                                                                                    s.demand.addStream(demandGenerator.Stream(
                                                                                                                        None, 3600 - hd + t, 3600 - hd + t + 300, fat, "1/2_to_1/1", "1/1_to_1/0",
                                                                                                                        {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 2 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1574..1576

                                                                                    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

                                                                                                        tls._programs[prog]._phases[2][
                                                                                                            1] = 92 - 4 - int(scenario.params["g1"])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 2 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 936..937

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

                                                                                    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

                                                                                                        tls._programs[prog]._phases[0][
                                                                                                            1] = 92 - 4 - int(scenario.params["g2"])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 2 hrs to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 931..932

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

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if aR != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * aR, "2/1_to_1/1", "1/1_to_1/2", {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 5 other locations - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2010..2014
                                                                                    tools/sumolib/scenario/pop2.py on lines 2117..2121
                                                                                    tools/sumolib/scenario/pop2.py on lines 2122..2126
                                                                                    tools/sumolib/scenario/pop2.py on lines 2134..2138
                                                                                    tools/sumolib/scenario/pop2.py on lines 2139..2143

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

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if aL != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * aL, "0/1_to_1/1", "1/1_to_1/2", {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 5 other locations - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2005..2009
                                                                                    tools/sumolib/scenario/pop2.py on lines 2010..2014
                                                                                    tools/sumolib/scenario/pop2.py on lines 2117..2121
                                                                                    tools/sumolib/scenario/pop2.py on lines 2122..2126
                                                                                    tools/sumolib/scenario/pop2.py on lines 2134..2138

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

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if aL != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * aL, "2/1_to_1/1", "1/1_to_1/0", {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 5 other locations - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2005..2009
                                                                                    tools/sumolib/scenario/pop2.py on lines 2117..2121
                                                                                    tools/sumolib/scenario/pop2.py on lines 2122..2126
                                                                                    tools/sumolib/scenario/pop2.py on lines 2134..2138
                                                                                    tools/sumolib/scenario/pop2.py on lines 2139..2143

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

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if aL != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * aL, "2/1_to_1/1", "1/1_to_1/0", {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 5 other locations - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2005..2009
                                                                                    tools/sumolib/scenario/pop2.py on lines 2010..2014
                                                                                    tools/sumolib/scenario/pop2.py on lines 2117..2121
                                                                                    tools/sumolib/scenario/pop2.py on lines 2134..2138
                                                                                    tools/sumolib/scenario/pop2.py on lines 2139..2143

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

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if aR != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * aR, "0/1_to_1/1", "1/1_to_1/0", {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 5 other locations - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2005..2009
                                                                                    tools/sumolib/scenario/pop2.py on lines 2010..2014
                                                                                    tools/sumolib/scenario/pop2.py on lines 2117..2121
                                                                                    tools/sumolib/scenario/pop2.py on lines 2122..2126
                                                                                    tools/sumolib/scenario/pop2.py on lines 2139..2143

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

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                                        if aR != 0:
                                                                                                            # why isn't it possible to get a network and return all
                                                                                                            # possible routes or whatever - to ease the process
                                                                                                            s.demand.addStream(demandGenerator.Stream(
                                                                                                                None, 0, 3600, self.MAIN_FLOW * aR, "2/1_to_1/1", "1/1_to_1/2", {"passenger": 1}))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 5 other locations - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 2005..2009
                                                                                    tools/sumolib/scenario/pop2.py on lines 2010..2014
                                                                                    tools/sumolib/scenario/pop2.py on lines 2122..2126
                                                                                    tools/sumolib/scenario/pop2.py on lines 2134..2138
                                                                                    tools/sumolib/scenario/pop2.py on lines 2139..2143

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

                                                                                    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 random.uniform(0, 1) < pSN:
                                                                                                    print('    <vehicle id="%i" type="passenger" route="SN" depart="%i" departSpeed="13.89" />' % (
                                                                                                        vehNr, i), file=fd)
                                                                                                    vehNr += 1
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1424..1427

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

                                                                                    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 random.uniform(0, 1) < pNS:
                                                                                                    print('    <vehicle id="%i" type="passenger" route="NS" depart="%i" departSpeed="13.89" />' % (
                                                                                                        vehNr, i), file=fd)
                                                                                                    vehNr += 1
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1428..1431

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

                                                                                    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

                                                                                                        tls._programs[prog]._phases[1][
                                                                                                            1] = int(scenario.params["g2"])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 929..930

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

                                                                                    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

                                                                                                        tls._programs[prog]._phases[0][
                                                                                                            1] = int(scenario.params["g1"])
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 1 hr to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 934..935

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "TurnIteration", merge(
                                                                                                {"rightFrom": "0", "rightTo": "51", "rightStep": "10",
                                                                                                    "leftFrom": "0", "leftTo": "51", "leftStep": "10"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 185..189
                                                                                    tools/sumolib/scenario/pop2.py on lines 284..288
                                                                                    tools/sumolib/scenario/pop2.py on lines 706..710
                                                                                    tools/sumolib/scenario/pop2.py on lines 820..824
                                                                                    tools/sumolib/scenario/pop2.py on lines 961..965
                                                                                    tools/sumolib/scenario/pop2.py on lines 1095..1099
                                                                                    tools/sumolib/scenario/pop2.py on lines 1975..1979

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "RiLSA1Outflow", merge(
                                                                                                {"g1from": "8", "g1to": "81", "g1step": "8",
                                                                                                    "g2from": "8", "g2to": "81", "g2step": "8"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 185..189
                                                                                    tools/sumolib/scenario/pop2.py on lines 284..288
                                                                                    tools/sumolib/scenario/pop2.py on lines 706..710
                                                                                    tools/sumolib/scenario/pop2.py on lines 961..965
                                                                                    tools/sumolib/scenario/pop2.py on lines 1095..1099
                                                                                    tools/sumolib/scenario/pop2.py on lines 1975..1979
                                                                                    tools/sumolib/scenario/pop2.py on lines 2086..2090

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "iterateFlowsA", merge(
                                                                                                {"f1from": "0", "f1to": "2400", "f1step": "400",
                                                                                                    "f2from": "0", "f2to": "2400", "f2step": "400"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 185..189
                                                                                    tools/sumolib/scenario/pop2.py on lines 706..710
                                                                                    tools/sumolib/scenario/pop2.py on lines 820..824
                                                                                    tools/sumolib/scenario/pop2.py on lines 961..965
                                                                                    tools/sumolib/scenario/pop2.py on lines 1095..1099
                                                                                    tools/sumolib/scenario/pop2.py on lines 1975..1979
                                                                                    tools/sumolib/scenario/pop2.py on lines 2086..2090

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "iterateFlowsNA", merge(
                                                                                                {"f1from": "0", "f1to": "2400", "f1step": "400",
                                                                                                    "f2from": "0", "f2to": "2400", "f2step": "400"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 284..288
                                                                                    tools/sumolib/scenario/pop2.py on lines 706..710
                                                                                    tools/sumolib/scenario/pop2.py on lines 820..824
                                                                                    tools/sumolib/scenario/pop2.py on lines 961..965
                                                                                    tools/sumolib/scenario/pop2.py on lines 1095..1099
                                                                                    tools/sumolib/scenario/pop2.py on lines 1975..1979
                                                                                    tools/sumolib/scenario/pop2.py on lines 2086..2090

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "BasicOutflow", merge(
                                                                                                {"g1from": "4", "g1to": "64", "g1step": "5",
                                                                                                    "g2from": "4", "g2to": "64", "g2step": "5"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 185..189
                                                                                    tools/sumolib/scenario/pop2.py on lines 284..288
                                                                                    tools/sumolib/scenario/pop2.py on lines 820..824
                                                                                    tools/sumolib/scenario/pop2.py on lines 961..965
                                                                                    tools/sumolib/scenario/pop2.py on lines 1095..1099
                                                                                    tools/sumolib/scenario/pop2.py on lines 1975..1979
                                                                                    tools/sumolib/scenario/pop2.py on lines 2086..2090

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "RiLSA1PTIteration", merge(
                                                                                                {"p1from": "120", "p1to": "1201", "p1step": "120",
                                                                                                    "p2from": "120", "p2to": "1201", "p2step": "120"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 185..189
                                                                                    tools/sumolib/scenario/pop2.py on lines 284..288
                                                                                    tools/sumolib/scenario/pop2.py on lines 706..710
                                                                                    tools/sumolib/scenario/pop2.py on lines 820..824
                                                                                    tools/sumolib/scenario/pop2.py on lines 961..965
                                                                                    tools/sumolib/scenario/pop2.py on lines 1975..1979
                                                                                    tools/sumolib/scenario/pop2.py on lines 2086..2090

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "TurnIteration", merge(
                                                                                                {"rightFrom": "0", "rightTo": "51", "rightStep": "10",
                                                                                                    "leftFrom": "0", "leftTo": "51", "leftStep": "10"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 185..189
                                                                                    tools/sumolib/scenario/pop2.py on lines 284..288
                                                                                    tools/sumolib/scenario/pop2.py on lines 706..710
                                                                                    tools/sumolib/scenario/pop2.py on lines 820..824
                                                                                    tools/sumolib/scenario/pop2.py on lines 961..965
                                                                                    tools/sumolib/scenario/pop2.py on lines 1095..1099
                                                                                    tools/sumolib/scenario/pop2.py on lines 2086..2090

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

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                        def __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "RiLSA1PedFlow", merge(
                                                                                                {"f1from": "0", "f1to": "501", "f1step": "50",
                                                                                                    "f2from": "0", "f2to": "501", "f2step": "50"},
                                                                                                params))
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 7 other locations - About 55 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 185..189
                                                                                    tools/sumolib/scenario/pop2.py on lines 284..288
                                                                                    tools/sumolib/scenario/pop2.py on lines 706..710
                                                                                    tools/sumolib/scenario/pop2.py on lines 820..824
                                                                                    tools/sumolib/scenario/pop2.py on lines 1095..1099
                                                                                    tools/sumolib/scenario/pop2.py on lines 1975..1979
                                                                                    tools/sumolib/scenario/pop2.py on lines 2086..2090

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

                                                                                    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

                                                                                            ScenarioSet.__init__(self, "NetFlowsDistancesA", merge(
                                                                                                {"f1from": "0", "f1to": "2401", "f1step": "800",
                                                                                                 "f2from": "0", "f2to": "2401", "f2step": "800",
                                                                                                 "oFrom": "0", "oTo": "3.14", "oStep": ".315"},
                                                                                                params))
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 50 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1697..1702

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

                                                                                    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 __init__(self, params):
                                                                                            ScenarioSet.__init__(self, "CorrFlowsDistancesA", merge(
                                                                                                {"f1from": "0", "f1to": "2400", "f1step": "400",
                                                                                                 "f2from": "0", "f2to": "2400", "f2step": "400",
                                                                                                 "d1from": "300", "d1to": "1000", "d1step": "100"},
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 50 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1838..1842

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                            f2endNum = (
                                                                                                self.getInt("f2endTo") - self.getInt("f2endFrom")) / self.getInt("f2endStep")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 45 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1654..1655
                                                                                    tools/sumolib/scenario/pop2.py on lines 1656..1657

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                            f1num = (self.getInt("f1to") - self.getInt("f1from")) / \
                                                                                                self.getInt("f1step")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 45 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1656..1657
                                                                                    tools/sumolib/scenario/pop2.py on lines 1658..1659

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

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                            f2beginNum = (self.getInt("f2beginTo") -
                                                                                                          self.getInt("f2beginFrom")) / self.getInt("f2beginStep")
                                                                                    Severity: Major
                                                                                    Found in tools/sumolib/scenario/pop2.py and 2 other locations - About 45 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1654..1655
                                                                                    tools/sumolib/scenario/pop2.py on lines 1658..1659

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

                                                                                    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 getAdditionalDivider(self):
                                                                                            return [
                                                                                                [2.5, -0.5, 2.5, 8.5],
                                                                                                [5.5, -0.5, 5.5, 8.5],
                                                                                                [-0.5, 2.5, 8.5, 2.5],
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 40 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 693..698

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

                                                                                    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 getAdditionalDivider(self):
                                                                                            return [
                                                                                                [2.5, -0.5, 2.5, 8.5],
                                                                                                [5.5, -0.5, 5.5, 8.5],
                                                                                                [-0.5, 2.5, 8.5, 2.5],
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 40 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 557..562

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

                                                                                    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

                                                                                                                s.demand.addStream(demandGenerator.Stream(
                                                                                                                    None, 3600 + hd, 7200, f2end, "1/2_to_1/1", "1/1_to_1/0", {"passenger": 1}))
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 35 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1586..1587

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

                                                                                    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

                                                                                                                s.demand.addStream(demandGenerator.Stream(
                                                                                                                    None, 0, 3600 - hd, f2begin, "1/0_to_1/1", "1/1_to_1/2", {"passenger": 1}))
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 35 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1554..1555

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

                                                                                    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

                                                                                                                s.demand.addStream(demandGenerator.Stream(
                                                                                                                    None, 3600 + hd, 7200, f2end, "1/0_to_1/1", "1/1_to_1/2", {"passenger": 1}))
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 35 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1581..1582

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

                                                                                    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

                                                                                                                s.demand.addStream(demandGenerator.Stream(
                                                                                                                    None, 0, 3600 - hd, f2begin, "1/2_to_1/1", "1/1_to_1/0", {"passenger": 1}))
                                                                                    Severity: Minor
                                                                                    Found in tools/sumolib/scenario/pop2.py and 1 other location - About 35 mins to fix
                                                                                    tools/sumolib/scenario/pop2.py on lines 1559..1560

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

                                                                                    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

                                                                                    There are no issues that match your filters.

                                                                                    Category
                                                                                    Status