capocchi/DEVSimPy

View on GitHub
DEVSKernel/PyPDEVS/old/tracers.py

Summary

Maintainability
F
3 wks
Test Coverage

File tracers.py has 447 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: Latin-1 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# tracers.py --- trace output
#                     --------------------------------
#                            Copyright (c) 2012
Severity: Minor
Found in DEVSKernel/PyPDEVS/old/tracers.py - About 6 hrs to fix

    Tracers has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Tracers(object):
        """
        The main tracer object that does all tracing
        """
        def __init__(self):
    Severity: Minor
    Found in DEVSKernel/PyPDEVS/old/tracers.py - About 3 hrs to fix

      Function vcdInit has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

          def vcdInit(self, aDEVS):
              """
              The trace functionality for VCD output at initialisation
              Args:
                  aDEVS - the model that is initialized
      Severity: Minor
      Found in DEVSKernel/PyPDEVS/old/tracers.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 saveVCD has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

          def saveVCD(self, modelName, time, portName, vcdState):
              """
              Trace a VCD entry
              Args:
                  modelName - the name of the model
      Severity: Minor
      Found in DEVSKernel/PyPDEVS/old/tracers.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 vcdConfluent has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          def vcdConfluent(self, aDEVS):
              """
              The trace functionality for VCD output at a confluent transition
              Args:
                  aDEVS - the model that transitioned
      Severity: Minor
      Found in DEVSKernel/PyPDEVS/old/tracers.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 vcdInternal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def vcdInternal(self, aDEVS):
              """
              The trace functionality for VCD output at an internal transition
              Args:
                  aDEVS - the model that transitioned
      Severity: Minor
      Found in DEVSKernel/PyPDEVS/old/tracers.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 xmlConfluent has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          def xmlConfluent(self, aDEVS):
              """
              The trace functionality for XML output at a confluent transition
              Args:
                  aDEVS - the model that transitioned
      Severity: Minor
      Found in DEVSKernel/PyPDEVS/old/tracers.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 saveXML has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def saveXML(self, modelName, timeStamp, eventKind, portInfo, xmlState, strState):
      Severity: Minor
      Found in DEVSKernel/PyPDEVS/old/tracers.py - About 45 mins to fix

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

            def xmlInternal(self, aDEVS):
                """
                The trace functionality for XML output at an internal transition
                Args:
                    aDEVS - the model that transitioned
        Severity: Minor
        Found in DEVSKernel/PyPDEVS/old/tracers.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 verboseInternal has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            def verboseInternal(self, aDEVS):
                """
                The trace functionality for verbose output at an internal transition
                Args:
                    aDEVS - the model that transitioned
        Severity: Minor
        Found in DEVSKernel/PyPDEVS/old/tracers.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 verboseConfluent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            def verboseConfluent(self, aDEVS):
                """
                The trace functionality for verbose output at a confluent transition
                Args:
                    aDEVS - the model that transitioned
        Severity: Minor
        Found in DEVSKernel/PyPDEVS/old/tracers.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 vcdExternal has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            def vcdExternal(self, aDEVS):
                """
                The trace functionality for VCD output at an external transition
                Args:
                    aDEVS - the model that transitioned
        Severity: Minor
        Found in DEVSKernel/PyPDEVS/old/tracers.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

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

                for module in modelList:
                    self.vcd_file.write(("$scope " + str(module) + " " + str(module) + " $end\n").encode())
                    for var in range(len(self.vcd_varList)):
                        if self.vcd_varList[var].modelName == module:
                            self.vcd_file.write("$var wire ".encode())
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 2 days to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 92..102

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for i in range(len(vcdState)):
                    if (i == 0):
                        if vcdState[i] == 'b':
                            continue
                        else:
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 1 day to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 127..137

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for var in range(len(self.vcd_varList)):
                    self.vcd_file.write(("b").encode())
                    if self.vcd_varList[var].bitSize is None:
                        # The wire is a constant error signal, so the wire is never used
                        # Assume 1 bit long
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 1 day to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 105..114

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for I in range(len(aDEVS.OPorts)):
                    if aDEVS.OPorts[I] in aDEVS.myOutput and aDEVS.myOutput[aDEVS.OPorts[I]] is not None:
                        portInfo += "<port name=\""+ aDEVS.OPorts[I].getPortName()+"\" category=\"O\">\n"
                        for j in aDEVS.myOutput[aDEVS.OPorts[I]]:
                            portInfo += "<message>" + str(j) + "</message>\n</port>\n"
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 1 day to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerXML.py on lines 71..75

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

        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 traceVerbose(self, time, text):
                """
                Perform the actual outputting of the trace
                Args:
                    time - time at which the transition happened
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 7 hrs to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 43..58

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for I in range(0, len(aDEVS.OPorts) ):
                    if aDEVS.OPorts[I] in aDEVS.myOutput:
                        portName = aDEVS.OPorts[I].getPortName()
                        signalBag = aDEVS.myOutput[aDEVS.OPorts[I]]
                        if signalBag is not None:
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 7 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 445..451

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for I in range(len(aDEVS.OPorts) ):
                    if aDEVS.OPorts[I] in aDEVS.myOutput:
                        portName = aDEVS.OPorts[I].getPortName()
                        signalBag = aDEVS.myOutput[aDEVS.OPorts[I]]
                        if signalBag is not None:
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 7 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 459..465

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for I in range(len(aDEVS.OPorts)):
                    if aDEVS.OPorts[I] in aDEVS.myOutput:
                        portInfo += "<port name=\""+ aDEVS.OPorts[I].getPortName()+"\" category=\"O\">\n"
                        for j in aDEVS.myOutput[aDEVS.OPorts[I]]:
                            portInfo += "<message>" + str(j) + "</message>\n</port>\n"
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 7 hrs to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerXML.py on lines 104..108

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for I in range(len(aDEVS.IPorts)):
                    portName = aDEVS.IPorts[I].getPortName()
                    signalBag = aDEVS.peek(aDEVS.IPorts[I])
                    if signalBag is not None:
                        for portSignal in signalBag:
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 6 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 439..444

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for I in range(len(aDEVS.IPorts)):
                    portName = aDEVS.IPorts[I].getPortName()
                    signalBag = aDEVS.peek(aDEVS.IPorts[I])
                    if signalBag is not None:
                        for portSignal in signalBag:
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 6 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 473..478

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

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

                for I in range(len(aDEVS.OPorts)):
                    text += "\t    port <" + str(aDEVS.OPorts[I].getPortName()) + ">:\n"
                    for msg in aDEVS.myOutput.get(aDEVS.OPorts[I], []):
                        text += "\t       " + str(msg) + "\n"
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 6 other locations - About 5 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 226..229
        DEVSKernel/PyPDEVS/old/tracers.py on lines 249..252
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 70..73
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 87..90
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 93..96
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 110..113

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

                for I in range(len(aDEVS.IPorts)):
                    text += "\t    port <" + str(aDEVS.IPorts[I].getPortName()) + ">: \n"
                    for msg in aDEVS.myInput.get(aDEVS.IPorts[I], []):
                        text += "\t       " + str(msg) + "\n"
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 6 other locations - About 5 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 232..235
        DEVSKernel/PyPDEVS/old/tracers.py on lines 249..252
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 70..73
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 87..90
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 93..96
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 110..113

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

                for I in range(len(aDEVS.IPorts)):
                    text += "\t    port <" + str(aDEVS.IPorts[I].getPortName()) + ">:\n"
                    for msg in aDEVS.myInput.get(aDEVS.IPorts[I], []):
                        text += "\t       " + str(msg) + "\n"
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 6 other locations - About 5 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 226..229
        DEVSKernel/PyPDEVS/old/tracers.py on lines 232..235
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 70..73
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 87..90
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 93..96
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVerbose.py on lines 110..113

        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

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

                for I in range(len(aDEVS.IPorts)):
                    portInfo += "<port name=\""+ aDEVS.IPorts[I].getPortName()+"\" category=\"I\">\n"
                    for j in aDEVS.peek(aDEVS.IPorts[I]):
                        portInfo += "<message>" + str(j) + "</message>\n</port>\n"
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 5 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 315..318

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for I in range(len(aDEVS.IPorts)):
                    portInfo += "<port name=\""+ aDEVS.IPorts[I].getPortName()+"\" category=\"I\">\n"
                    for j in aDEVS.peek(aDEVS.IPorts[I]):
                        portInfo += "<message>" + str(j) + "</message>\n</port>\n"
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 5 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 328..331

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

        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

                self.vcd_file.write(("\t" + date.today().isoformat() + "\n" +
                                    "$end\n" +
                                    "$version\n" +
                                    "\tPyDEVS VCD export\n" +
                                    "$end\n" +
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 4 hrs to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 72..79

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

        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

                    if self.vcd_varList[i].bitSize is None:
                        self.vcd_varList[i].bitSize = len(vcdState)-1
                    elif self.vcd_varList[i].bitSize != len(vcdState) - 1:
                        raise DEVSException("Wire has changing bitsize!\nYou are probably not using bit encoding on the wires!")
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 4 hrs to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 144..147

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

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

                    vcdTime = int(str(int(floor(t))) + str(int(t - floor(t)) * (len(str(t)) - 2)))
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 2 other locations - About 3 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 423..423
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 156..156

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

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

                    vcdTime = int(str(int(floor(t))) + str(int(t - floor(t)) * (len(str(t)) - 2)))
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 2 other locations - About 3 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 368..368
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 156..156

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

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

            def tracesInternal(self, aDEVS):
                """
                Perform all necessary tracing for an internal transition of the specified model
                Args:
                    aDEVS - the model that transitioned
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 74..85
        DEVSKernel/PyPDEVS/old/tracers.py on lines 87..98
        DEVSKernel/PyPDEVS/old/tracers.py on lines 100..111

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

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

            def tracesConfluent(self, aDEVS):
                """
                Perform all necessary tracing for a confluent transition of the specified model
                Args:
                    aDEVS - the model that transitioned
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 61..72
        DEVSKernel/PyPDEVS/old/tracers.py on lines 74..85
        DEVSKernel/PyPDEVS/old/tracers.py on lines 87..98

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

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

            def tracesExternal(self, aDEVS):
                """
                Perform all necessary tracing for an external transition of the specified model
                Args:
                    aDEVS - the model that transitioned
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 61..72
        DEVSKernel/PyPDEVS/old/tracers.py on lines 74..85
        DEVSKernel/PyPDEVS/old/tracers.py on lines 100..111

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for i in range(len(self.vcd_varList)):
                    if self.vcd_varList[i].modelName not in modelList:
                        modelList.append(self.vcd_varList[i].modelName)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 2 hrs to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 89..91

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

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

            def tracesInit(self, aDEVS):
                """
                Perform all necessary tracing for an initialisation transition of the specified model
                Args:
                    aDEVS - the model that was initialized
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 61..72
        DEVSKernel/PyPDEVS/old/tracers.py on lines 87..98
        DEVSKernel/PyPDEVS/old/tracers.py on lines 100..111

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

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

                execute(aDEVS, easyCommand("self.tracers.saveXML", [toStr(aDEVS.getModelFullName()), aDEVS.timeLast, "'IN'", toStr(portInfo), toStr(aDEVS.state.toXML()), toStr(aDEVS.state)]), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 319..319
        DEVSKernel/PyPDEVS/old/tracers.py on lines 332..332
        DEVSKernel/PyPDEVS/old/tracers.py on lines 339..339

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

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

                execute(aDEVS, easyCommand("self.tracers.saveXML", [toStr(aDEVS.getModelFullName()), aDEVS.timeLast, "'EX'", toStr(portInfo), toStr(aDEVS.state.toXML()), toStr(aDEVS.state)]), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 306..306
        DEVSKernel/PyPDEVS/old/tracers.py on lines 332..332
        DEVSKernel/PyPDEVS/old/tracers.py on lines 339..339

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

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

                execute(aDEVS, easyCommand("self.tracers.saveXML", [toStr(aDEVS.getModelFullName()), aDEVS.timeLast, "'EX'", toStr(portInfo), toStr(aDEVS.state.toXML()), toStr(aDEVS.state)]), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 306..306
        DEVSKernel/PyPDEVS/old/tracers.py on lines 319..319
        DEVSKernel/PyPDEVS/old/tracers.py on lines 339..339

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

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

                execute(aDEVS, easyCommand("self.tracers.saveXML", [toStr(aDEVS.getModelFullName()), aDEVS.timeLast, "'IN'", toStr(portInfo), toStr(aDEVS.state.toXML()), toStr(aDEVS.state)]), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 306..306
        DEVSKernel/PyPDEVS/old/tracers.py on lines 319..319
        DEVSKernel/PyPDEVS/old/tracers.py on lines 332..332

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

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

                    if (self.vcd_prevtime != vcdTime):
                        # The time has passed, so add a new VCD header
                        self.vcd_file.write(("#" + str(vcdTime) + "\n").encode())
                        self.vcd_prevtime = vcdTime
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 2 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 370..373
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 158..161

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

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

                    if (self.vcd_prevtime != vcdTime):
                        # The time has passed, so add a new VCD header
                        self.vcd_file.write(("#" + str(vcdTime) + "\n").encode())
                        self.vcd_prevtime = vcdTime
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 2 other locations - About 2 hrs to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 425..428
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 158..161

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

        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

        class VCDRecord(object):
            """
            A data class to keep information about VCD variables
            """
        
        
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 1 hr to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 4..22

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

        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

                    if self.vcd_varList[i].modelName == modelName and self.vcd_varList[i].portName == portName:
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 1 hr to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 140..140

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                for i in variables:
                    model, port = i
                    self.vcd_varList.append(VCDRecord(counter, model, port))
                    counter += 1
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 1 hr to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 83..86

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

        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

                self.vcd_file.write((vcdState + " " + identifier + "\n").encode())
        Severity: Minor
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 35 mins to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerVCD.py on lines 163..163

        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

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

                execute(aDEVS, easyCommand("self.tracers.traceVerbose", [aDEVS.timeLast, '"' + text + '"']), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 35 mins to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 215..215
        DEVSKernel/PyPDEVS/old/tracers.py on lines 238..238
        DEVSKernel/PyPDEVS/old/tracers.py on lines 256..256

        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

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

                execute(aDEVS, easyCommand("self.tracers.traceVerbose", [aDEVS.timeLast, '"' + text + '"']), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 35 mins to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 194..194
        DEVSKernel/PyPDEVS/old/tracers.py on lines 215..215
        DEVSKernel/PyPDEVS/old/tracers.py on lines 238..238

        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

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

                execute(aDEVS, easyCommand("self.tracers.traceVerbose", [aDEVS.timeLast, '"' + text + '"']), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 35 mins to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 194..194
        DEVSKernel/PyPDEVS/old/tracers.py on lines 238..238
        DEVSKernel/PyPDEVS/old/tracers.py on lines 256..256

        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

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

                execute(aDEVS, easyCommand("self.tracers.traceVerbose", [aDEVS.timeLast, '"' + text + '"']), self.immediate)
        Severity: Major
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 3 other locations - About 35 mins to fix
        DEVSKernel/PyPDEVS/old/tracers.py on lines 194..194
        DEVSKernel/PyPDEVS/old/tracers.py on lines 215..215
        DEVSKernel/PyPDEVS/old/tracers.py on lines 256..256

        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

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

                execute(aDEVS, easyCommand("self.tracers.saveXML", [toStr(aDEVS.getModelFullName()), aDEVS.timeLast, "'EX'", "''", toStr(aDEVS.state.toXML()), toStr(aDEVS.state)]), self.immediate)
        Severity: Minor
        Found in DEVSKernel/PyPDEVS/old/tracers.py and 1 other location - About 35 mins to fix
        DEVSKernel/PyPDEVS/pypdevs221/src/tracerXML.py on lines 117..117

        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