EventGhost/EventGhost

View on GitHub
plugins/RemoteEventMapper/__init__.py

Summary

Maintainability
F
2 wks
Test Coverage

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

    def Configure(
        self,
        Prefix = "Remote",
        remotes = [],
        suffixes = None
Severity: Minor
Found in plugins/RemoteEventMapper/__init__.py - About 4 days to fix

Cognitive Complexity

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

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

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

Further reading

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

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

version="0.0.1"

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

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

        def Configure(
            self,
            Prefix = "Remote",
            remotes = [],
            suffixes = None
    Severity: Major
    Found in plugins/RemoteEventMapper/__init__.py - About 6 hrs to fix

      Function ShowSuffixesFrame has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
      Open

          def ShowSuffixesFrame(self):
              text = self.plugin.text
              self.SetTitle(text.suffTitle)
              sizer = wx.BoxSizer(wx.VERTICAL)
              mainSizer = wx.GridBagSizer(1,8)
      Severity: Minor
      Found in plugins/RemoteEventMapper/__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 ShowSuffixesFrame has 76 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def ShowSuffixesFrame(self):
              text = self.plugin.text
              self.SetTitle(text.suffTitle)
              sizer = wx.BoxSizer(wx.VERTICAL)
              mainSizer = wx.GridBagSizer(1,8)
      Severity: Major
      Found in plugins/RemoteEventMapper/__init__.py - About 3 hrs to fix

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

            def __init__(self, parent, message, caption='', flags=0, time = 0, plugin = None):
                PlaySound('SystemExclamation', SND_ASYNC)
                wx.Dialog.__init__(self, parent, style = wx.DEFAULT_DIALOG_STYLE )
                self.SetTitle(plugin.text.messBoxTit0)
                self.SetIcon(plugin.info.icon.GetWxIcon())
        Severity: Minor
        Found in plugins/RemoteEventMapper/__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 __init__ has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def __init__(self, parent, message, caption='', flags=0, time = 0, plugin = None):
                PlaySound('SystemExclamation', SND_ASYNC)
                wx.Dialog.__init__(self, parent, style = wx.DEFAULT_DIALOG_STYLE )
                self.SetTitle(plugin.text.messBoxTit0)
                self.SetIcon(plugin.info.icon.GetWxIcon())
        Severity: Minor
        Found in plugins/RemoteEventMapper/__init__.py - About 1 hr to fix

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

              def xmlToData(self, xmlfile):
                  data = []
                  xmldoc = miniDom.parse(xmlfile)
                  document = xmldoc.getElementsByTagName('Remote')
                  if len(document) == 0:
          Severity: Minor
          Found in plugins/RemoteEventMapper/__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

          Avoid deeply nested control flow statements.
          Open

                                      for sf in rmt[2]:
                                          if suff[0] == sf[0] and suff[2] != sf[2]:
                                              s = suff[0]
                                              n = rmt[0]
                                              n0 = suff[2]
          Severity: Major
          Found in plugins/RemoteEventMapper/__init__.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if s:
                                            break
                                    if s:
            Severity: Major
            Found in plugins/RemoteEventMapper/__init__.py - About 45 mins to fix

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

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

                Avoid too many return statements within this function.
                Open

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

                  Avoid too many return statements within this function.
                  Open

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

                    Avoid too many return statements within this function.
                    Open

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

                      Avoid too many return statements within this function.
                      Open

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

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

                        def Move(lst, index, direction):
                            tmpList = lst[:]
                            max = len(lst)-1
                            #Last to first position, other down
                            if index == max and direction == 1:
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 2 other locations - About 1 day to fix
                        plugins/E-mail/__init__.py on lines 364..381
                        plugins/Multitap/__init__.py on lines 78..95

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

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

                        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

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

                                        for suff in item[2]:
                                            for sf in rem[2]:
                                                if suff[0] == sf[0] and suff[2] != sf[2]:
                                                    s = suff[0]
                                                    n = rem[0]
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 4 hrs to fix
                        plugins/RemoteEventMapper/__init__.py on lines 535..543

                        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

                                                for suff in self.remotes[rem][2]:
                                                    for sf in rmt[2]:
                                                        if suff[0] == sf[0] and suff[2] != sf[2]:
                                                            s = suff[0]
                                                            n = rmt[0]
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 4 hrs to fix
                        plugins/RemoteEventMapper/__init__.py on lines 814..822

                        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 onButtonUp(evt):
                                    rem = listBoxCtrl.GetSelection()
                                    newSel, suffixes = Move(self.remotes[rem][2], self.oldSel, -1)
                                    self.remotes[rem][2] = suffixes
                                    FillButtonsList(self.remotes[rem])
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 4 hrs to fix
                        plugins/RemoteEventMapper/__init__.py on lines 869..876

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

                        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 onButtonDown(evt):
                                    rem = listBoxCtrl.GetSelection()
                                    newSel, suffixes = Move(self.remotes[rem][2], self.oldSel, 1)
                                    self.remotes[rem][2] = suffixes
                                    FillButtonsList(self.remotes[rem])
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 4 hrs to fix
                        plugins/RemoteEventMapper/__init__.py on lines 858..865

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

                        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/RemoteEventMapper/__init__.py and 1 other location - About 2 hrs to fix
                        plugins/RadioSure/__init__.py on lines 541..548

                        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

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

                                def OnSuffText(evt):
                                    strng = evt.GetString()
                                    self.remotes[listBoxCtrl.GetSelection()][2][self.oldSel][0] = strng
                                    buttonsListCtrl.SetStringItem(self.oldSel, 0, strng)
                                    Validation()
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 1 hr to fix
                        plugins/RemoteEventMapper/__init__.py on lines 704..709

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

                        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 OnLabelText(evt):
                                    strng = labelText.GetValue()
                                    self.remotes[listBoxCtrl.GetSelection()][2][self.oldSel][1] = strng
                                    buttonsListCtrl.SetStringItem(self.oldSel, 1, strng)
                                    Validation()
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 1 hr to fix
                        plugins/RemoteEventMapper/__init__.py on lines 695..700

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

                        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/RemoteEventMapper/__init__.py and 1 other location - About 1 hr to fix
                        plugins/RadioSure/__init__.py on lines 549..555

                        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

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

                                if len(self.suffixes) > 0:
                                    listBoxCtrl.Set(self.suffixes)
                                    listBoxCtrl.SetSelection(0)
                                    labelCtrl.ChangeValue(self.suffixes[0])
                                    self.oldSel=0
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 1 hr to fix
                        plugins/Multitap/__init__.py on lines 399..406

                        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

                                def onButtonUp(evt):
                                    newSel,self.suffixes=Move(self.suffixes,listBoxCtrl.GetSelection(),-1)
                                    listBoxCtrl.Set(self.suffixes)
                                    listBoxCtrl.SetSelection(newSel)
                                    self.oldSel = newSel
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 1 hr to fix
                        plugins/RemoteEventMapper/__init__.py on lines 1173..1179

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

                        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 onButtonDown(evt):
                                    newSel,self.suffixes=Move(self.suffixes,listBoxCtrl.GetSelection(),1)
                                    listBoxCtrl.Set(self.suffixes)
                                    listBoxCtrl.SetSelection(newSel)
                                    self.oldSel = newSel
                        Severity: Major
                        Found in plugins/RemoteEventMapper/__init__.py and 1 other location - About 1 hr to fix
                        plugins/RemoteEventMapper/__init__.py on lines 1163..1169

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

                        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