EventGhost/EventGhost

View on GitHub
plugins/RadioSure/__init__.py

Summary

Maintainability
F
5 mos
Test Coverage

File __init__.py has 5422 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-

version="0.2.22"

# plugins/RadioSure/__init__.py
Severity: Major
Found in plugins/RadioSure/__init__.py - About 2 wks to fix

    Function NextRun has a Cognitive Complexity of 378 (exceeds 5 allowed). Consider refactoring.
    Open

        def NextRun(self, type, data):
    
            def FindRunDateTime(runList, cond):
                runList.sort()
                runDateTime = ""
    Severity: Minor
    Found in plugins/RadioSure/__init__.py - About 1 wk 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 __init__ has a Cognitive Complexity of 363 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, text, plugin):
            wx.Dialog.__init__(
                self,
                None,
                -1,
    Severity: Minor
    Found in plugins/RadioSure/__init__.py - About 1 wk 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 __init__ has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, text, plugin):
            wx.Dialog.__init__(
                self,
                None,
                -1,
    Severity: Minor
    Found in plugins/RadioSure/__init__.py - About 3 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Cyclomatic complexity is too high in method NextRun. (107)
    Open

    
        def NextRun(self, type, data):
    
            def FindRunDateTime(runList, cond):
                runList.sort()
    Severity: Minor
    Found in plugins/RadioSure/__init__.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function onBtn has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
    Open

        def onBtn(self, evt):
    
            def UpdateXml():
                closeFlag = self.UpdateRadioSureXml()
                rs = u'%s\\RadioSure.exe' % self.plugin.RadioSurePath
    Severity: Minor
    Found in plugins/RadioSure/__init__.py - About 1 day 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 Configure has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
    Open

        def Configure(
            self,
            path = "",
            xmlpath = "",
            logfile = None,
    Severity: Minor
    Found in plugins/RadioSure/__init__.py - About 1 day 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 __init__ has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(
            self,
            parent,
            message,
            caption = eg.APP_NAME,
    Severity: Minor
    Found in plugins/RadioSure/__init__.py - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function Configure has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
    Open

        def Configure(
            self,
            fore = (75, 75, 75),
            back = (180, 180, 180),
            fontInfo = TAHOMA_INFO,
    Severity: Minor
    Found in plugins/RadioSure/__init__.py - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function __init__ has 144 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def __init__(self, text, plugin):
            wx.Dialog.__init__(
                self,
                None,
                -1,
    Severity: Major
    Found in plugins/RadioSure/__init__.py - About 5 hrs to fix

      Function __init__ has 140 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def __init__(self, text, plugin):
              wx.Dialog.__init__(
                  self,
                  None,
                  -1,
      Severity: Major
      Found in plugins/RadioSure/__init__.py - About 5 hrs to fix

        Function Configure has 111 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def Configure(
                self,
                fore = (75, 75, 75),
                back = (180, 180, 180),
                fontInfo = TAHOMA_INFO,
        Severity: Major
        Found in plugins/RadioSure/__init__.py - About 4 hrs to fix

          Function __call__ has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
          Open

              def __call__(self, step = None):
                  if step is None:
                      if self.value == 0:
                          step = 50
                      else:
          Severity: Minor
          Found in plugins/RadioSure/__init__.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 ShowMenuEventsDialog has 92 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def ShowMenuEventsDialog(self, title, labels):
                  self.panel.Enable(False)
                  self.panel.dialog.buttonRow.cancelButton.Enable(False)
                  self.panel.EnableButtons(False)
                  self.SetTitle(title)
          Severity: Major
          Found in plugins/RadioSure/__init__.py - About 3 hrs to fix

            Function ImportSR has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
            Open

                def ImportSR(self, filePath):
                    xmldoc = miniDom.parse(filePath)
                    document = xmldoc.getElementsByTagName('Screamer')
                    if len(document) > 0:
                        res = []
            Severity: Minor
            Found in plugins/RadioSure/__init__.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 onBtnsInOut has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

                def onBtnsInOut(self, evt):
                    id = evt.GetId()
                    if id == wx.ID_SAVEAS or id == wx.ID_SAVE:
                        dlg = wx.FileDialog(
                            self,
            Severity: Minor
            Found in plugins/RadioSure/__init__.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 __call__ has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

                def __call__(self, play = False, fav = 1):
            
                    def Play(hwnds):
                            self.plugin.RefreshVariables()
                            if fav <= len(self.plugin.Favorites):
            Severity: Minor
            Found in plugins/RadioSure/__init__.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 __call__ has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                def __call__(self, schedule=""):
                    schedule = eg.ParseString(schedule)
                    data = self.plugin.data
                    tmpLst = [item[1] for item in data]
                    if schedule in tmpLst:
            Severity: Minor
            Found in plugins/RadioSure/__init__.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

            RadioSure has 26 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class RadioSure(eg.PluginBase):
            
                text=Text
                menuDlg = None
                RadioSurePath = u''
            Severity: Minor
            Found in plugins/RadioSure/__init__.py - About 3 hrs to fix

              Function Execute has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
              Open

                  def Execute(self, params, immed = False):
                      next = self.NextRun(params[2], params[3])
                      modes = params[7]
                      playRec = modes & 6
                      args = []
              Severity: Minor
              Found in plugins/RadioSure/__init__.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 ShowHolidaysFrame has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def ShowHolidaysFrame(self):
                      text = self.plugin.text
                      self.SetTitle(self.plugin.text.holidButton)
                      self.fixWin = CalendarPopup(self, False, self.plugin.first_day)
                      self.varWin = CalendarPopup(self, True, self.plugin.first_day)
              Severity: Major
              Found in plugins/RadioSure/__init__.py - About 2 hrs to fix

                Function Configure has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def Configure(
                        self,
                        path = "",
                        xmlpath = "",
                        logfile = None,
                Severity: Major
                Found in plugins/RadioSure/__init__.py - About 2 hrs to fix

                  Function __init__ has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def __init__(
                          self,
                          fore,
                          back,
                          foreSel,
                  Severity: Major
                  Found in plugins/RadioSure/__init__.py - About 2 hrs to fix

                    Function getStations has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def getStations(nodelist):
                        tmp = []
                        for item in nodelist.childNodes:
                            if item.nodeName[:5] == "Item-":
                                title = item.getElementsByTagName('Title')[0].firstChild
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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 xmlToData has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def xmlToData(self):
                            data = []
                            xmlfile = u'%s\\Scheduler.xml' % self.xmlpath
                            if not exists(xmlfile):
                                return data
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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 RefreshVariables has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def RefreshVariables(self):
                            xmltoparse = u'%s\\RadioSure.xml' % self.xmlpath
                            xmltoparse = xmltoparse.encode(FSE) if isinstance(xmltoparse, unicode) else xmltoparse
                            if not exists(xmltoparse):
                                return
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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

                    Cyclomatic complexity is too high in method onBtn. (24)
                    Open

                    
                        def onBtn(self, evt):
                    
                            def UpdateXml():
                                closeFlag = self.UpdateRadioSureXml()
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.py by radon

                    Cyclomatic Complexity

                    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

                    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

                    Construct Effect on CC Reasoning
                    if +1 An if statement is a single decision.
                    elif +1 The elif statement adds another decision.
                    else +0 The else statement does not cause a new decision. The decision is at the if.
                    for +1 There is a decision at the start of the loop.
                    while +1 There is a decision at the while statement.
                    except +1 Each except branch adds a new conditional path of execution.
                    finally +0 The finally block is unconditionally executed.
                    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
                    assert +1 The assert statement internally roughly equals a conditional statement.
                    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
                    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

                    Source: http://radon.readthedocs.org/en/latest/intro.html

                    Function UpdateEGscheduler has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def UpdateEGscheduler(self):
                            data = self.data
                            tmpList = []
                            sched_list = eg.scheduler.__dict__['heap']
                            for sched in sched_list:
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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

                    Cyclomatic complexity is too high in class MessageBoxDialog. (21)
                    Open

                    
                    class MessageBoxDialog(wx.Dialog):
                    
                        def __init__(
                            self,
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.py by radon

                    Cyclomatic Complexity

                    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

                    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

                    Construct Effect on CC Reasoning
                    if +1 An if statement is a single decision.
                    elif +1 The elif statement adds another decision.
                    else +0 The else statement does not cause a new decision. The decision is at the if.
                    for +1 There is a decision at the start of the loop.
                    while +1 There is a decision at the while statement.
                    except +1 Each except branch adds a new conditional path of execution.
                    finally +0 The finally block is unconditionally executed.
                    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
                    assert +1 The assert statement internally roughly equals a conditional statement.
                    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
                    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

                    Source: http://radon.readthedocs.org/en/latest/intro.html

                    Cyclomatic complexity is too high in method __init__. (21)
                    Open

                    
                        def __init__(
                            self,
                            parent,
                            message,
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.py by radon

                    Cyclomatic Complexity

                    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

                    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

                    Construct Effect on CC Reasoning
                    if +1 An if statement is a single decision.
                    elif +1 The elif statement adds another decision.
                    else +0 The else statement does not cause a new decision. The decision is at the if.
                    for +1 There is a decision at the start of the loop.
                    while +1 There is a decision at the while statement.
                    except +1 Each except branch adds a new conditional path of execution.
                    finally +0 The finally block is unconditionally executed.
                    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
                    assert +1 The assert statement internally roughly equals a conditional statement.
                    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
                    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

                    Source: http://radon.readthedocs.org/en/latest/intro.html

                    Function onFrameCharHook has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def onFrameCharHook(self, event):
                            keyCode = event.GetKeyCode()
                            if keyCode == wx.WXK_F4:
                                if event.AltDown():
                                    self.destroyMenu()
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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 GetLastPlayed has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def GetLastPlayed(self):
                            xmltoparse = u'%s\\RadioSure.xml' % self.xmlpath
                            xmltoparse = xmltoparse.encode(FSE) if isinstance(xmltoparse, unicode) else xmltoparse
                            xmldoc = miniDom.parse(xmltoparse)
                            lastPlayed = xmldoc.getElementsByTagName('LastPlayed')
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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 GetStatusRS has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def GetStatusRS(self, hwnds = None):
                            hwnds = hwnds or HandleRS()
                            maxFav = None
                            recording = None
                            if hwnds:
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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 GetNewHwnd has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def GetNewHwnd(self, oldHwnds = [], src = None, hid = False, mut = False):
                            hwnds = HandleRS()
                            if len(hwnds) > 0 and self.GetOneInstance():
                                wx.CallAfter(
                                    MessageBox,
                    Severity: Minor
                    Found in plugins/RadioSure/__init__.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 __init__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __init__(
                    Severity: Major
                    Found in plugins/RadioSure/__init__.py - About 1 hr to fix

                      Function __init__ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __init__(
                              self,
                              fore,
                              back,
                              foreSel,
                      Severity: Minor
                      Found in plugins/RadioSure/__init__.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 OnChangeMonth has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def OnChangeMonth(self, evt = None):
                              date = self.cal.GetDate()
                              cur_month = date.GetMonth() + 1   # convert wx.DateTime 0-11 => 1-12
                              if self.yearChange:
                                  cur_year = date.GetYear()
                      Severity: Minor
                      Found in plugins/RadioSure/__init__.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 RS_ObservationThread has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def RS_ObservationThread(self):
                              hwnd = HandleRS()
                              if hwnd:
                                  if self.evtName:
                                      data = GetWindowText(hwnd[0]).decode(eg.systemEncoding)
                      Severity: Minor
                      Found in plugins/RadioSure/__init__.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 CreateFavorites has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def CreateFavorites(self, dom, node, itmList = None, save = False):
                              max = self.plugin.maxFav
                              mssgs = []
                              if save:
                                  #Duplications check
                      Severity: Minor
                      Found in plugins/RadioSure/__init__.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 __stop__ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __stop__(self):
                              if self.dataToXml():
                                  self.updateLogFile("File Scheduler.xml saved")
                              if self.observThread:
                                  ot = self.observThread
                      Severity: Minor
                      Found in plugins/RadioSure/__init__.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 __init__ has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def __init__(
                              self,
                              parent,
                              message,
                              caption = eg.APP_NAME,
                      Severity: Minor
                      Found in plugins/RadioSure/__init__.py - About 1 hr to fix

                        Function __call__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def __call__(
                        Severity: Major
                        Found in plugins/RadioSure/__init__.py - About 1 hr to fix

                          Function Configure has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def Configure(
                          Severity: Major
                          Found in plugins/RadioSure/__init__.py - About 1 hr to fix

                            Function GetLabel has 10 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def GetLabel(
                            Severity: Major
                            Found in plugins/RadioSure/__init__.py - About 1 hr to fix

                              Function dataToXml has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def dataToXml(self):
                                      impl = miniDom.getDOMImplementation()
                                      dom = impl.createDocument(None, u'Document', None)
                                      root = dom.documentElement
                                      commentNode = dom.createComment(self.text.xmlComment % str(dt.now())[:19])
                              Severity: Minor
                              Found in plugins/RadioSure/__init__.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 DrawMenu has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def DrawMenu(self, ix):
                                      self.Show(False)
                                      self.menuGridCtrl.SetGridCursor(ix, 1)
                                      self.menuGridCtrl.SelectRow(ix)
                                      monDim = GetMonitorDimensions()
                              Severity: Minor
                              Found in plugins/RadioSure/__init__.py - About 1 hr to fix

                                Function OnData has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def OnData(self, dummyX, dummyY, dragResult):
                                        if self.GetData() and self.customData.GetDataSize() > 0:
                                            txt = self.customData.GetData()
                                            ix, evtList = self.object.GetEvtList()
                                            flag = True
                                Severity: Minor
                                Found in plugins/RadioSure/__init__.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 HandleRS has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def HandleRS():
                                
                                    FindRS = eg.WindowMatcher(
                                                u'RadioSure.exe',
                                                None,
                                Severity: Minor
                                Found in plugins/RadioSure/__init__.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 DrawMenu has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def DrawMenu(self, ix):
                                        self.Show(False)
                                        self.menuGridCtrl.SetGridCursor(ix, 1)
                                        self.menuGridCtrl.SelectRow(ix)
                                        monDim = GetMonitorDimensions()
                                Severity: Minor
                                Found in plugins/RadioSure/__init__.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 Reset has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def Reset(self, list):
                                        tmpList = []
                                        for item in list:
                                            day = item[-1]
                                            day = "  %i" % day if day < 10 else "%i" % day
                                Severity: Minor
                                Found in plugins/RadioSure/__init__.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 SetMaxFavs has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def SetMaxFavs(self):
                                        maxFav = 30
                                        hwnds = HandleRS()
                                        if hwnds:
                                            maxFav, rec = self.GetStatusRS(hwnds)
                                Severity: Minor
                                Found in plugins/RadioSure/__init__.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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def __init__(
                                Severity: Major
                                Found in plugins/RadioSure/__init__.py - About 50 mins to fix

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

                                      def GetLabel(
                                  Severity: Minor
                                  Found in plugins/RadioSure/__init__.py - About 45 mins to fix

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

                                        def Configure(
                                    Severity: Minor
                                    Found in plugins/RadioSure/__init__.py - About 45 mins to fix

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

                                      def MessageBox(parent, message, caption='', flags=0, time = 0, plugin = None):
                                      Severity: Minor
                                      Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                        Function EnableAll has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            def EnableAll(self, flag):
                                                if isinstance(flag, wx.CommandEvent):
                                                    schedule = self.tmpData[self.lastRow][1]
                                                    flag = 1
                                                for ix in range(len(self.tmpData)):
                                        Severity: Minor
                                        Found in plugins/RadioSure/__init__.py - About 45 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 __start__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            def __start__(
                                        Severity: Minor
                                        Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                  if rec:
                                                                      PostMessage(hwnd, WM_COMMAND, 1051, 0) # Stop Rec
                                                                      i=0
                                                                      while rec and i < 100:
                                                                          i+=1
                                          Severity: Major
                                          Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    for weekday in range(7):
                                                                        if 2 ** weekday & data[3]:
                                                                            day = FindMonthDay(currYear, currMonth, weekday, ix)
                                                                            if day:
                                                                                runDateTime = dt.combine(dt(currYear, currMonth, day).date(), runTime)
                                            Severity: Major
                                            Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                      for day in days:
                                                                          if day > monthrange(nextYear, month)[1]:
                                                                              break
                                                                          runDateTime = dt.combine(dt(nextYear, month, day).date(), runTime)
                                                                          runList.append(runDateTime)
                                              Severity: Major
                                              Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                Function __call__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    def __call__(self, schedule=""):
                                                        schedule = eg.ParseString(schedule)
                                                        xmlfile = u'%s\\Scheduler.xml' % self.plugin.xmlpath
                                                        if not exists(xmlfile):
                                                            return
                                                Severity: Minor
                                                Found in plugins/RadioSure/__init__.py - About 45 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 deeply nested control flow statements.
                                                Open

                                                                        for day in days:
                                                                            if day > monthrange(nextYear, month)[1]:
                                                                                break
                                                                            runDateTime = dt.combine(dt(nextYear, month, day).date(), runTime)
                                                                            runList.append(runDateTime)
                                                Severity: Major
                                                Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                              while hwnd in hwnds and i < 100:
                                                                                  hwnds = HandleRS()
                                                                                  i += 1
                                                                              if i == 100:
                                                  Severity: Major
                                                  Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                if i == 100:
                                                                                    self.PrintError(self.text.message6)
                                                                                    rec = 1
                                                                                else:
                                                                                    hwnds = self.plugin.GetNewHwnd(hwnds, src=src)
                                                    Severity: Major
                                                    Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                              if sch[2][0] == sched[1]:
                                                                                  eg.scheduler.CancelTask(sch)
                                                                                  self.plugin.updateLogFile(self.plugin.text.canc % sch[2][0])
                                                                                  break
                                                                      next, cmdline = self.plugin.Execute(sched, True)
                                                      Severity: Major
                                                      Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                if 2 ** ix & data[2]:
                                                                                    for weekday in range(7):
                                                                                        if 2 ** weekday & data[3]:
                                                                                            day = FindMonthDay(year, month, weekday, ix)
                                                                                            if day:
                                                        Severity: Major
                                                        Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                  if tmpRunDT.weekday() > 4: # weekend
                                                                                      found = True
                                                                                      break
                                                                                  else: # workday
                                                                                      if (tmpRunDT.month, tmpRunDT.day) in self.holidays[0]:
                                                          Severity: Major
                                                          Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                    if (tmpRunDT.month, tmpRunDT.day) in self.holidays[0]:
                                                                                        found = True
                                                                                        break
                                                                                    elif (tmpRunDT.year, tmpRunDT.month, tmpRunDT.day) in self.holidays[1]:
                                                                                        found = True
                                                            Severity: Major
                                                            Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                      if tmpRunDT.weekday() > 4: # weekend
                                                                                          found = True
                                                                                          break
                                                                                      else: # workday
                                                                                          if (tmpRunDT.month, tmpRunDT.day) in self.holidays[0]:
                                                              Severity: Major
                                                              Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                        if src in srcIx:
                                                                                            i = srcIx.index(src)
                                                                                            break
                                                                                    if i > -1:
                                                                Severity: Major
                                                                Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                          if 2 ** ix & data[2]:
                                                                                              for weekday in range(7):
                                                                                                  if 2 ** weekday & data[3]:
                                                                                                      day=FindMonthDay(year, month, weekday, ix)
                                                                                                      if day:
                                                                  Severity: Major
                                                                  Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                                    Function __call__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                        def __call__(self,fav = 1, mode = 0, number = '{eg.event.payload}'):
                                                                            hwnd = HandleRS()
                                                                            if hwnd:
                                                                                if mode == 2:
                                                                                    indx = fav
                                                                    Severity: Minor
                                                                    Found in plugins/RadioSure/__init__.py - About 45 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 deeply nested control flow statements.
                                                                    Open

                                                                                            if not succ:
                                                                                                MessageBox(
                                                                                                    self,
                                                                                                    self.text.message6, #failed to close
                                                                                                    self.text.messBoxTit6,
                                                                    Severity: Major
                                                                    Found in plugins/RadioSure/__init__.py - About 45 mins to fix

                                                                      Consider simplifying this complex logical expression.
                                                                      Open

                                                                              if keyCode == wx.WXK_F4:
                                                                                  if event.AltDown():
                                                                                      self.destroyMenu()
                                                                              elif keyCode == wx.WXK_RETURN or keyCode == wx.WXK_NUMPAD_ENTER:
                                                                                  self.DefaultAction()
                                                                      Severity: Major
                                                                      Found in plugins/RadioSure/__init__.py - About 40 mins to fix

                                                                        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                            def __init__(self, parent, id, evtList, ix, plugin):
                                                                        Severity: Minor
                                                                        Found in plugins/RadioSure/__init__.py - About 35 mins to fix

                                                                          Function GetNewHwnd has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                              def GetNewHwnd(self, oldHwnds = [], src = None, hid = False, mut = False):
                                                                          Severity: Minor
                                                                          Found in plugins/RadioSure/__init__.py - About 35 mins to fix

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

                                                                                def ShowMenuEventsDialog(self, title, labels):
                                                                                    self.panel.Enable(False)
                                                                                    self.panel.dialog.buttonRow.cancelButton.Enable(False)
                                                                                    self.panel.EnableButtons(False)
                                                                                    self.SetTitle(title)
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 Set has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def Set(self, choices):
                                                                                    oldLen = self.GetNumberRows()
                                                                                    newLen = len(choices)
                                                                                    h = self.GetDefaultRowSize()
                                                                                    if oldLen > newLen:
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 AddSchedule has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def AddSchedule(self, schedule):
                                                                                    tmpList = [item[1] for item in self.tmpData]
                                                                                    if schedule[1] in tmpList:
                                                                                        ix = tmpList.index(schedule[1])
                                                                                        self.tmpData[ix] = schedule
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 GetLanguageXml has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def GetLanguageXml(self):
                                                                                    xmltoparse = u'%s\\RadioSure.xml' % self.xmlpath
                                                                                    xmltoparse = xmltoparse.encode(FSE) if isinstance(xmltoparse, unicode) else xmltoparse
                                                                                    xmldoc = miniDom.parse(xmltoparse)
                                                                                    general = xmldoc.getElementsByTagName('General')
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 EnableSchedule has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def EnableSchedule(self, schedule, flag):
                                                                                    tmpList = [item[1] for item in self.tmpData]
                                                                                    if schedule in tmpList:
                                                                                        ix = tmpList.index(schedule)
                                                                                        self.tmpData[ix][0] = flag
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 __call__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def __call__(self):
                                                                                    hwnd = HandleRS()
                                                                                    if hwnd:
                                                                                        self.plugin.RefreshVariables()
                                                                                        ix = self.plugin.GetMenuItem(hwnd[0], 7)[0]
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 __call__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def __call__(
                                                                                    self,
                                                                                    period = 1.0,
                                                                                    evtName ="titlebar",
                                                                                    evtName2 ="station",
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 Configure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def Configure(self, step = None):
                                                                                    if step is None:
                                                                                        if self.value == 0:
                                                                                            step = 50
                                                                                        else:
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 __call__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def __call__(self, expr = ""):
                                                                                    schedule = eg.ParseString(expr)
                                                                                    schedule = eval(schedule)
                                                                                    if len(schedule) == 8 and isinstance(schedule[1], unicode):
                                                                                        data = self.plugin.data
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 Configure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def Configure(self, fav = 1, mode = 0, number = '{eg.event.payload}'):
                                                                                    self.number = number
                                                                                    panel = eg.ConfigPanel(self)
                                                                                    radioBoxMode = wx.RadioBox(
                                                                                        panel,
                                                                            Severity: Minor
                                                                            Found in plugins/RadioSure/__init__.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 str(tmpRunDT)
                                                                            Severity: Major
                                                                            Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                              return str(runDateTime)
                                                                              Severity: Major
                                                                              Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                                return ""
                                                                                Severity: Major
                                                                                Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                                  return ""
                                                                                  Severity: Major
                                                                                  Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                                return str(tmpRunDT)
                                                                                    Severity: Major
                                                                                    Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                                      return ""
                                                                                      Severity: Major
                                                                                      Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                                            return str(tmpRunDT)
                                                                                        Severity: Major
                                                                                        Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                                                  return str(dt.combine(now.date(), runTime))
                                                                                          Severity: Major
                                                                                          Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                                            return str(runDateTime)
                                                                                            Severity: Major
                                                                                            Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                                          return str(runDateTime)
                                                                                              Severity: Major
                                                                                              Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                                return str(runDateTime + delta)
                                                                                                Severity: Major
                                                                                                Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                                      return str(runDateTime + td(days = delta))
                                                                                                  Severity: Major
                                                                                                  Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                                    return str(runDateTime + td(days = delta))
                                                                                                    Severity: Major
                                                                                                    Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

                                                                                                                      return ""
                                                                                                      Severity: Major
                                                                                                      Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                        return str(runDateTime)
                                                                                                        Severity: Major
                                                                                                        Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                          return str(tmpRunDT if found else runDateTime + td(days = Delta))
                                                                                                          Severity: Major
                                                                                                          Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                            return str(min(runList))
                                                                                                            Severity: Major
                                                                                                            Found in plugins/RadioSure/__init__.py - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                              return str(runDateTime + delta)
                                                                                                              Severity: Major
                                                                                                              Found in plugins/RadioSure/__init__.py - About 30 mins to fix

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

                                                                                                                    def destroyMenu(self, event = None):
                                                                                                                        for evt in self.evtList[0]:
                                                                                                                            eg.Unbind(evt, self.onUp)
                                                                                                                        for evt in self.evtList[1]:
                                                                                                                            eg.Unbind(evt, self.onDown)
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.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 GetRS_Menu has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    def GetRS_Menu(self, hwnd):
                                                                                                                
                                                                                                                        WM_CONTEXTMENU   = 0x007B
                                                                                                                        OBJID_CLIENT     = 0xFFFFFFFC
                                                                                                                
                                                                                                                
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.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 GetItemList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    def GetItemList(self, hWnd, hMenu):
                                                                                                                        WM_INITMENUPOPUP = 0x0117
                                                                                                                        MF_BYPOSITION    = 1024
                                                                                                                        MF_GRAYED        = 1
                                                                                                                        MF_DISABLED      = 2
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.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 GetSubmenuStrings has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    def GetSubmenuStrings(self):
                                                                                                                        choices = [self.text.root]
                                                                                                                        language = self.GetLanguageXml()
                                                                                                                        if language:
                                                                                                                            mainWindow = language.getElementsByTagName('MainWindow')
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.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 __start__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    def __start__(
                                                                                                                        self,
                                                                                                                        path = None,
                                                                                                                        xmlpath = None,
                                                                                                                        logfile = None,
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.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 __call__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    def __call__(self):
                                                                                                                        hwnd = HandleRS()
                                                                                                                        if hwnd:
                                                                                                                            self.plugin.RefreshVariables()
                                                                                                                            #ix = self.plugin.FavIx
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.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 2 locations. Consider refactoring.
                                                                                                                Open

                                                                                                                class MenuEventsDialog(wx.MiniFrame):
                                                                                                                
                                                                                                                    def __init__(self, parent, plugin):
                                                                                                                        wx.MiniFrame.__init__(
                                                                                                                            self,
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 wks to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 851..1019

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

                                                                                                                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

                                                                                                                        elif type == 4: #monthly/day
                                                                                                                            if (data[2] + data[3] + data[4] + data[5]) == 0 or (data[6] + data[7]) == 0:
                                                                                                                                return ""
                                                                                                                            runList = []
                                                                                                                            currMonth = now.month
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 6 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2181..2232

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

                                                                                                                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

                                                                                                                class MenuGrid(gridlib.Grid):
                                                                                                                
                                                                                                                    def __init__(self, parent, lngth):
                                                                                                                        gridlib.Grid.__init__(self, parent)
                                                                                                                        self.SetRowLabelSize(0)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 6 days to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 385..458

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

                                                                                                                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 CalendarPopup(wx.PopupWindow):
                                                                                                                    yearChange = True
                                                                                                                
                                                                                                                    def __init__(self, parent, yearChange, first_day):
                                                                                                                        self.yearChange = yearChange
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 6 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 531..610

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

                                                                                                                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 DrawMenu(self, ix):
                                                                                                                        self.Show(False)
                                                                                                                        self.menuGridCtrl.SetGridCursor(ix, 1)
                                                                                                                        self.menuGridCtrl.SelectRow(ix)
                                                                                                                        monDim = GetMonitorDimensions()
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 5 days to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 1038..1079

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

                                                                                                                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 item[2] == 4:
                                                                                                                                q_1_Node = dom.createElement(u'Q_1')
                                                                                                                                q_1_Text = dom.createTextNode(unicode(item[3][2]))
                                                                                                                                q_1_Node.appendChild(q_1_Text)
                                                                                                                                dateTimeNode.appendChild(q_1_Node)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 2 other locations - About 3 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2479..2503
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2504..2528

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

                                                                                                                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 type == 0:
                                                                                                                                if flag:
                                                                                                                                    self.ctrls.append(wx.NewId())
                                                                                                                                    dp = wx.DatePickerCtrl(self, self.ctrls[2], size = (86, -1),
                                                                                                                                            style = wx.DP_DROPDOWN | wx.DP_SHOWCENTURY)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 3 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 721..745

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

                                                                                                                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 item[2] == 3:
                                                                                                                                orderNode = dom.createElement(u'Order')
                                                                                                                                orderText = dom.createTextNode(unicode(item[3][2]))
                                                                                                                                orderNode.appendChild(orderText)
                                                                                                                                dateTimeNode.appendChild(orderNode)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2458..2478

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

                                                                                                                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 AddSchedule(self, schedule):
                                                                                                                        tmpList = [item[1] for item in self.tmpData]
                                                                                                                        if schedule[1] in tmpList:
                                                                                                                            ix = tmpList.index(schedule[1])
                                                                                                                            self.tmpData[ix] = schedule
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1648..1668

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

                                                                                                                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

                                                                                                                class HolidaysBox(wx.ListBox):
                                                                                                                
                                                                                                                    def __init__ (self, parent, id, size, style):
                                                                                                                        wx.ListBox.__init__(
                                                                                                                            self,
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 495..528

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

                                                                                                                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

                                                                                                                            elif type == 5:
                                                                                                                                if flag:
                                                                                                                                    self.ctrls.append(wx.NewId())
                                                                                                                                    dp = wx.DatePickerCtrl(self, self.ctrls[2], size = (86, -1),
                                                                                                                                            style = wx.DP_DROPDOWN | wx.DP_SHOWCENTURY)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 days to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1009..1028

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

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

                                                                                                                                if flag:
                                                                                                                                    bottomSizer = wx.StaticBoxSizer(
                                                                                                                                        wx.StaticBox(self, -1, self.text.choosePeriod),
                                                                                                                                        wx.HORIZONTAL
                                                                                                                                    )
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1099..1129

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

                                                                                                                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 OpenManager:
                                                                                                                        dialogTitle = "Radio?Sure! Favorites manager %s  (plugin for EventGhost)"
                                                                                                                        toolTipDelete = "Delete item(s)"
                                                                                                                        toolTipUp = "Move item(s) up"
                                                                                                                        toolTipDown = "Move item(s) down"
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/IrfanView/__init__.py on lines 882..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 227.

                                                                                                                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 schedType == 4:
                                                                                                                                q_1 = int(dateTime.getElementsByTagName('Q_1')[0].firstChild.data)
                                                                                                                                params.append(q_1)
                                                                                                                                q_2 = int(dateTime.getElementsByTagName('Q_2')[0].firstChild.data)
                                                                                                                                params.append(q_2)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2599..2611

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

                                                                                                                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

                                                                                                                        def OnColourBtn(evt):
                                                                                                                            id = evt.GetId()
                                                                                                                            value = evt.GetValue()
                                                                                                                            if id == foreColourButton.GetId():
                                                                                                                                listBoxCtrl.SetForegroundColour(value)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 2 other locations - About 1 day to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 2230..2251
                                                                                                                plugins/OOo_Impress/__init__.py on lines 1244..1265

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

                                                                                                                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

                                                                                                                            elif data[4] in (2, 3): #unit = day or week
                                                                                                                                period = data[3] if data[4] == 2 else 7 * data[3]
                                                                                                                                delta = (now - runDateTime).days
                                                                                                                                share = delta / period
                                                                                                                                if not delta % period:
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2252..2282

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

                                                                                                                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 FindNewTitle(title):
                                                                                                                            tmpLst = []
                                                                                                                            for item in self.tmpData:
                                                                                                                                if item[1].startswith(title + " ("):
                                                                                                                                    tmpLst.append(item[1][2 + len(title):])
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1279..1296

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

                                                                                                                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 item[2] == 5:
                                                                                                                                dateNode = dom.createElement(u'Date')
                                                                                                                                dateText = dom.createTextNode(unicode(item[3][2]))
                                                                                                                                dateNode.appendChild(dateText)
                                                                                                                                dateTimeNode.appendChild(dateNode)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 2 other locations - About 1 day to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 4515..4527
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2529..2541

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

                                                                                                                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 item[2] == 2:
                                                                                                                                weekdayNode = dom.createElement(u'Weekday')
                                                                                                                                weekdayText = dom.createTextNode(unicode(item[3][2]))
                                                                                                                                weekdayNode.appendChild(weekdayText)
                                                                                                                                dateTimeNode.appendChild(weekdayNode)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 2 other locations - About 1 day to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 4574..4586
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2529..2541

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

                                                                                                                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

                                                                                                                class MyTextDropTarget(EventDropTarget):
                                                                                                                
                                                                                                                    def __init__(self, object):
                                                                                                                        EventDropTarget.__init__(self, object)
                                                                                                                        self.object = object
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 2 other locations - About 1 day to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 461..488
                                                                                                                plugins/OOo_Impress/__init__.py on lines 374..401

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

                                                                                                                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 Configure(self, schedule=""):
                                                                                                                        panel = eg.ConfigPanel()
                                                                                                                        xmlfile = u'%s\\Scheduler.xml' % self.plugin.xmlpath
                                                                                                                        if not exists(xmlfile):
                                                                                                                            return
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5672..5684

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

                                                                                                                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 Configure(self, schedule=""):
                                                                                                                        panel = eg.ConfigPanel()
                                                                                                                        xmlfile = u'%s\\Scheduler.xml' % self.plugin.xmlpath
                                                                                                                        if not exists(xmlfile):
                                                                                                                            return
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5620..5632

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

                                                                                                                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 time:
                                                                                                                            self.cnt = time
                                                                                                                            txt = plugin.text.autoClose % self.cnt
                                                                                                                            info = wx.StaticText(self, -1, txt)
                                                                                                                            info.Enable(False)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/RemoteEventMapper/__init__.py on lines 1278..1296

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

                                                                                                                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 SelRow(self, row):
                                                                                                                        if row != self.selRow:
                                                                                                                            if self.selRow in range(self.GetItemCount()):
                                                                                                                                item = self.GetItem(self.selRow)
                                                                                                                                item.SetTextColour(self.fore)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 652..665

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

                                                                                                                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 OnFontBtn(evt):
                                                                                                                            value = evt.GetValue()
                                                                                                                            self.fontInfo = value
                                                                                                                            font = wx.FontFromNativeInfoString(value)
                                                                                                                            for n in range(10,20):
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 2211..2227

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

                                                                                                                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 OnInverted(evt):
                                                                                                                            flag = evt.IsChecked()
                                                                                                                            foreSelLbl.Enable(not flag)
                                                                                                                            foreSelColourButton.Enable(not flag)
                                                                                                                            backSelLbl.Enable(not flag)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 2181..2196

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

                                                                                                                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 onPeriodNumber(evt):
                                                                                                                            if len(self.ctrls) == 5 and evt.GetId() == self.ctrls[3]:
                                                                                                                                self.tmpData[self.lastRow][3][3] = int(evt.GetString())
                                                                                                                                next = self.plugin.NextRun(
                                                                                                                                    self.tmpData[self.lastRow][2],
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1472..1482

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

                                                                                                                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 row in range(rows):
                                                                                                                                    grid.InsertStringItem(row, "")
                                                                                                                                    if self.tmpData[row][0]:
                                                                                                                                        grid.CheckItem(row)
                                                                                                                                    grid.SetStringItem(row, 1, self.tmpData[row][1])
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 day to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1590..1597

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

                                                                                                                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 onPeriodUnit(evt):
                                                                                                                            if len(self.ctrls) == 5 and evt.GetId() == self.ctrls[4]:
                                                                                                                                self.tmpData[self.lastRow][3][4] = evt.GetSelection()
                                                                                                                                next = self.plugin.NextRun(
                                                                                                                                    self.tmpData[self.lastRow][2],
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 7 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1191..1201

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

                                                                                                                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 EnableSchedule(self, schedule, flag):
                                                                                                                        tmpList = [item[1] for item in self.tmpData]
                                                                                                                        if schedule in tmpList:
                                                                                                                            ix = tmpList.index(schedule)
                                                                                                                            self.tmpData[ix][0] = flag
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 7 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1626..1635

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

                                                                                                                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 Configure(self, expr=""):
                                                                                                                        panel = eg.ConfigPanel(resizable=True)
                                                                                                                        textControl = wx.TextCtrl(panel, -1, expr, size = (300,-1), style = wx.TE_MULTILINE )
                                                                                                                        panel.sizer.Add(wx.StaticText(panel,-1,self.text.python_expr), 0,wx.LEFT|wx.TOP, 10)
                                                                                                                        panel.sizer.Add(textControl, 1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 10)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 7 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2934..2940

                                                                                                                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

                                                                                                                                for month in larger:
                                                                                                                                    runList = []
                                                                                                                                    for ix in range(6):
                                                                                                                                        if 2 ** ix & data[2]:
                                                                                                                                            for weekday in range(7):
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 7 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 4247..4258

                                                                                                                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

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

                                                                                                                                for month in lower:
                                                                                                                                    runList = []
                                                                                                                                    for ix in range(6):
                                                                                                                                        if 2 ** ix & data[2]:
                                                                                                                                            for weekday in range(7):
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 7 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 4231..4242

                                                                                                                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

                                                                                                                    def onClose(self, evt):
                                                                                                                        hwnd = self.GetHandle()
                                                                                                                        wp = GetWindowPlacement(hwnd)[4]
                                                                                                                        #Note: GetPosition() return (-32000, -32000), if window is minimized !!!
                                                                                                                        cdr = wx.GetClientDisplayRect()
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 7 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1677..1687

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

                                                                                                                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

                                                                                                                    def Configure(self, schedule = ""):
                                                                                                                        panel = eg.ConfigPanel()
                                                                                                                        data = self.plugin.data
                                                                                                                        choices = [item[1] for item in data]
                                                                                                                        textControl = wx.ComboBox(panel, -1, schedule, size = (300, -1), choices = choices)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 2 other locations - About 7 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2734..2751
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2787..2795

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

                                                                                                                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 type == 0: # once or yearly
                                                                                                                            runDate = dt.strptime(data[2], '%Y-%m-%d')
                                                                                                                            runDateTime = dt.combine(runDate, runTime)
                                                                                                                            if now < runDateTime:
                                                                                                                                return str(runDateTime)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 6 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1991..2002

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

                                                                                                                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 item[2] == 0:
                                                                                                                                dateNode = dom.createElement(u'Date')
                                                                                                                                dateText = dom.createTextNode(unicode(item[3][2]))
                                                                                                                                dateNode.appendChild(dateText)
                                                                                                                                dateTimeNode.appendChild(dateNode)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 6 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2449..2457

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

                                                                                                                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 onDatePicker(evt):
                                                                                                                            val = str(dt.fromtimestamp(evt.GetDate().GetTicks()))[:10]
                                                                                                                            self.tmpData[self.lastRow][3][2] = val
                                                                                                                            next = self.plugin.NextRun(
                                                                                                                                self.tmpData[self.lastRow][2],
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 6 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1204..1212

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

                                                                                                                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 day in weekdaysLarger:
                                                                                                                                        delta = day + shift - nowDay
                                                                                                                                        tmpRunDT = runDateTime + td(days = delta)
                                                                                                                                        if tmpRunDT.weekday() > 4: # weekend
                                                                                                                                            found = True
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 5 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 4163..4176

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

                                                                                                                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 day in weekdaysLower:
                                                                                                                                        delta = day + shift - nowDay
                                                                                                                                        tmpRunDT = runDateTime + td(days = delta)
                                                                                                                                        if tmpRunDT.weekday() > 4: # weekend
                                                                                                                                            found = True
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 5 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 4146..4159

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

                                                                                                                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 FindMonthDay(year, month, weekday, index):
                                                                                                                    """weekday = what day of the week looking for (numbered 0-6, 0 = monday)
                                                                                                                    index = how many occurrence of looking for (numbered 0-4 and 5 for the last day)
                                                                                                                    Returns the day of the month (date) or 0 (if no such date exists)"""
                                                                                                                    first_wd, length = monthrange(year, month)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 5 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 288..301

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

                                                                                                                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 ix in range(6):
                                                                                                                                    if 2 ** ix & data[2]:
                                                                                                                                        for weekday in range(7):
                                                                                                                                            if 2 ** weekday & data[3]:
                                                                                                                                                day = FindMonthDay(currYear, currMonth, weekday, ix)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 5 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2127..2135

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

                                                                                                                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 DeleteSchedule(self, schedule):
                                                                                                                        tmpList = [item[1] for item in self.tmpData]
                                                                                                                        if schedule in tmpList:
                                                                                                                            ix = tmpList.index(schedule)
                                                                                                                            if self.grid.GetItem(ix, 1).GetText() == self.tmpData[ix][1]:
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 5 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1638..1645

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

                                                                                                                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 flag:
                                                                                                                                    dateSizer = wx.BoxSizer(wx.HORIZONTAL)
                                                                                                                                    topSizer.Add(dateSizer, 0, wx.EXPAND)
                                                                                                                                    dynamicSizer.Add(topSizer, 0, wx.EXPAND | wx.TOP, 2)
                                                                                                                                    self.ctrls.append(wx.NewId())
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 2 other locations - About 5 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 835..910
                                                                                                                plugins/SchedulGhost/__init__.py on lines 936..990

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

                                                                                                                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 ix in range(len(self.tmpData)):
                                                                                                                            self.tmpData[ix][0] = flag
                                                                                                                            if self.grid.GetItem(ix, 1).GetText() == self.tmpData[ix][1]:
                                                                                                                                if flag:
                                                                                                                                    self.grid.CheckItem(ix)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 4 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1616..1623

                                                                                                                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

                                                                                                                            if schedType == 5:
                                                                                                                                date = dateTime.getElementsByTagName('Date')[0].firstChild.data
                                                                                                                                params.append(date)
                                                                                                                                number = int(dateTime.getElementsByTagName('Number')[0].firstChild.data)
                                                                                                                                params.append(number)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 4 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2612..2618

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

                                                                                                                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 OnPathChange(event):
                                                                                                                            path = rsPathCtrl.GetValue()
                                                                                                                            if not exists("%s\\RadioSure.exe" % path):
                                                                                                                                MessageBox(
                                                                                                                                    panel,
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 4 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5029..5043

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

                                                                                                                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 OnPath2Change(event):
                                                                                                                            path2 = xmlPathCtrl.GetValue()
                                                                                                                            if not exists("%s\\RadioSure.xml" % path2):
                                                                                                                                MessageBox(
                                                                                                                                    panel,
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 4 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5011..5025

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

                                                                                                                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 flag:
                                                                                                                                    dateSizer = wx.BoxSizer(wx.HORIZONTAL)
                                                                                                                                    dateSizer.Add(
                                                                                                                                        wx.StaticText(
                                                                                                                                            self,
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 3 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 747..804

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

                                                                                                                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 not data[4] and not data[3]: # without holiday check
                                                                                                                                if len(weekdaysLarger) > 0:
                                                                                                                                    delta = weekdaysLarger[0] - nowDay
                                                                                                                                    return str(runDateTime + td(days = delta))
                                                                                                                                delta = 7 + weekdaysLower[0] - nowDay
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 3 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2022..2027

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

                                                                                                                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 OpenManager(eg.ActionBase):
                                                                                                                
                                                                                                                    def __call__(self):
                                                                                                                        if not self.plugin.manager:
                                                                                                                            wx.CallAfter(ManagerDialog, self.text, self.plugin)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 3 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5575..5583

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

                                                                                                                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 OpenScheduler(eg.ActionBase):
                                                                                                                
                                                                                                                    def __call__(self):
                                                                                                                        if not self.plugin.dialog:
                                                                                                                            wx.CallAfter(SchedulerDialog, self.text, self.plugin)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 3 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5550..5558

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

                                                                                                                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 updateLogFile(self, line, blank = False):
                                                                                                                        if not self.logfile:
                                                                                                                            return
                                                                                                                        f = openFile(self.logfile, encoding='utf-8', mode='a')
                                                                                                                        if blank:
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 3 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2286..2293

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

                                                                                                                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 weekday in range(7):
                                                                                                                                if 2**weekday & data[2]:
                                                                                                                                    if weekday < nowDay or (weekday == nowDay and now.time() > runTime):
                                                                                                                                        weekdaysLower.append(weekday)
                                                                                                                                    else:
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2016..2021

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

                                                                                                                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 box.IsChecked(sel):
                                                                                                                                self.tmpData[self.lastRow][3][ix] |= 2 ** exp
                                                                                                                            else:
                                                                                                                                self.tmpData[self.lastRow][3][ix] &= 255 - 2 ** exp
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1159..1162

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

                                                                                                                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

                                                                                                                class MyTimer():
                                                                                                                    def __init__(self, t, plugin):
                                                                                                                        self.timer = Timer(t, self.Run)
                                                                                                                        self.plugin = plugin
                                                                                                                        self.timer.start()
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 3 other locations - About 2 hrs to fix
                                                                                                                plugins/MediaPlayerClassic/__init__.py on lines 1299..1316
                                                                                                                plugins/OOo_Impress/__init__.py on lines 132..148
                                                                                                                plugins/OSE/__init__.py on lines 1373..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 87.

                                                                                                                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 len(self.tmpData) > 0:
                                                                                                                                if self.lastRow == len(self.tmpData):
                                                                                                                                    self.lastRow -= 1
                                                                                                                                OpenSchedule()
                                                                                                                                grid.SelRow(self.lastRow)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1361..1370

                                                                                                                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

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

                                                                                                                        if not img or not img.IsOk():
                                                                                                                            from cStringIO import StringIO
                                                                                                                            from base64 import b64decode
                                                                                                                            stream = StringIO(b64decode(CUR_STRING))
                                                                                                                            img = wx.ImageFromStream(stream)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 962..969

                                                                                                                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

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

                                                                                                                                if period < 86400 and not 86400 % period:
                                                                                                                                    if now.time() > runTime:
                                                                                                                                        date = now.date()
                                                                                                                                    else:
                                                                                                                                        date = now.date() - td(days = 1)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2240..2245

                                                                                                                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

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

                                                                                                                        if not img or not img.IsOk():
                                                                                                                            from cStringIO import StringIO
                                                                                                                            from base64 import b64decode
                                                                                                                            stream = StringIO(b64decode(CUR_STRING))
                                                                                                                            img = wx.ImageFromStream(stream)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 1081..1088

                                                                                                                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

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

                                                                                                                        if self.dialog:
                                                                                                                            tmpList = [item[1] for item in self.tmpData]
                                                                                                                            if schedule in tmpList:
                                                                                                                                ixTmp = tmpList.index(schedule)
                                                                                                                                self.tmpData[ixTmp][4] = last
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2349..2354

                                                                                                                Duplicated Code

                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                Tuning

                                                                                                                This issue has a mass of 80.

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

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

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

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

                                                                                                                Refactorings

                                                                                                                Further Reading

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

                                                                                                                            if flags & wx.ICON_EXCLAMATION:
                                                                                                                                art = wx.ART_WARNING
                                                                                                                            elif flags & wx.ICON_ERROR:
                                                                                                                                art = wx.ART_ERROR
                                                                                                                            elif flags & wx.ICON_QUESTION:
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 2 hrs to fix
                                                                                                                plugins/RemoteEventMapper/__init__.py on lines 1255..1262

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

                                                                                                                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 onCheckListCtrl(evt):
                                                                                                                            index, flag = evt.GetValue()
                                                                                                                            if self.tmpData[index][0] != int(flag):
                                                                                                                                self.tmpData[index][0] = int(flag)
                                                                                                                                Diff()
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 hr to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1439..1443

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

                                                                                                                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 schedType == 0:
                                                                                                                                date = dateTime.getElementsByTagName('Date')[0].firstChild.data
                                                                                                                                params.append(date)
                                                                                                                                date = int(dateTime.getElementsByTagName('Yearly')[0].firstChild.data)
                                                                                                                                params.append(date)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 hr to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2570..2574

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

                                                                                                                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 art is not None:
                                                                                                                                bmp = wx.ArtProvider.GetBitmap(art, wx.ART_MESSAGE_BOX, (32,32))
                                                                                                                                icon = wx.StaticBitmap(self, -1, bmp)
                                                                                                                                icon2 = wx.StaticBitmap(self, -1, bmp)
                                                                                                                            else:
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 hr to fix
                                                                                                                plugins/RemoteEventMapper/__init__.py on lines 1263..1269

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

                                                                                                                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 RefreshGrid(self, ix, last, next):
                                                                                                                        if self.grid.GetItem(ix, 1).GetText() == self.tmpData[ix][1]:
                                                                                                                            self.grid.SetStringItem(ix, 2, last)
                                                                                                                            self.grid.SetStringItem(ix, 3, next)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 hr to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 1671..1674

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

                                                                                                                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 indx <= len(self.plugin.Favorites):
                                                                                                                                SendMessage(hwnd[0], WM_COMMAND, 4101+indx, 0)
                                                                                                                                return str(indx)+": "+self.plugin.Favorites[indx-1][1]
                                                                                                                            else:
                                                                                                                                self.PrintError(
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 hr to fix
                                                                                                                plugins/ScreamerRadio/__init__.py on lines 579..586

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

                                                                                                                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 SendMessageActions(eg.ActionBase):
                                                                                                                    def __call__(self):
                                                                                                                        hwnd = HandleRS()
                                                                                                                        if hwnd:
                                                                                                                            SendMessage(hwnd[0], WM_COMMAND, self.value, 0)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 hr to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5166..5173

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

                                                                                                                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 WindowControl(eg.ActionBase):
                                                                                                                    def __call__(self):
                                                                                                                        hwnd = HandleRS()
                                                                                                                        if hwnd:
                                                                                                                            SendMessage(hwnd[0], WM_SYSCOMMAND, self.value, 0)
                                                                                                                Severity: Major
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 1 hr to fix
                                                                                                                plugins/RadioSure/__init__.py on lines 5176..5183

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

                                                                                                                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 data[2] == 0 or data[3] == 0 or (data[4] + data[5]) == 0:
                                                                                                                                return ""
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 35 mins to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 2116..2117

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

                                                                                                                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 OnChangeDay(self, evt):
                                                                                                                        if evt.GetId() == self.fixWin.GetCalId():
                                                                                                                            self.fixListBox.Reset(self.fixHolidays)
                                                                                                                        else:
                                                                                                                            self.varListBox.Reset(self.varHolidays)
                                                                                                                Severity: Minor
                                                                                                                Found in plugins/RadioSure/__init__.py and 1 other location - About 35 mins to fix
                                                                                                                plugins/SchedulGhost/__init__.py on lines 487..492

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

                                                                                                                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