java/src/jmri/jmrit/beantable/LRouteTableAction.java

Summary

Maintainability
F
3 wks
Test Coverage
F
58%

File LRouteTableAction.java has 2520 lines of code (exceeds 300 allowed). Consider refactoring.
Open

package jmri.jmrit.beantable;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
Severity: Major
Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 6 days to fix

    Method updatePressed has a Cognitive Complexity of 137 (exceeds 20 allowed). Consider refactoring.
    Open

        void updatePressed() {
            Logix logix = checkNamesOK();
            if (logix == null) {
                log.error("No Logix found!");
                return;
    Severity: Minor
    Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 2 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    Method updatePressed has 348 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        void updatePressed() {
            Logix logix = checkNamesOK();
            if (logix == null) {
                log.error("No Logix found!");
                return;
    Severity: Major
    Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 day to fix

      Method makeEditWindow has 223 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          void makeEditWindow() {
              buildLists();
              if (_addFrame == null) {
                  _addFrame = new JmriJFrame(rbx.getString("LRouteAddTitle"), false, false);
                  _addFrame.addHelpMenu("package.jmri.jmrit.beantable.LRouteAddEdit", true);
      Severity: Major
      Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 day to fix

        LRouteTableAction has 45 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class LRouteTableAction extends AbstractTableAction<Logix> {
        
            static final ResourceBundle rbx = ResourceBundle.getBundle("jmri.jmrit.beantable.LRouteTableBundle");
        
            /**
        Severity: Minor
        Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 6 hrs to fix

          Method getControlsAndActions has 132 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              void getControlsAndActions(String cSysName) {
                  Conditional c = _conditionalManager.getBySystemName(cSysName);
                  if (c != null) {
                      List<ConditionalAction> actionList = c.getCopyOfActions();
                      boolean onChange = false;
          Severity: Major
          Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 5 hrs to fix

            Method getControlsAndActions has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring.
            Open

                void getControlsAndActions(String cSysName) {
                    Conditional c = _conditionalManager.getBySystemName(cSysName);
                    if (c != null) {
                        List<ConditionalAction> actionList = c.getCopyOfActions();
                        boolean onChange = false;
            Severity: Minor
            Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - 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

            Method getAlignmentSensors has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                void getAlignmentSensors(String cSysName) {
                    Conditional c = _conditionalManager.getBySystemName(cSysName);
                    if (c != null) {
                        AlignElement element = null;
                        List<ConditionalAction> actionList = c.getCopyOfActions();
            Severity: Major
            Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 3 hrs to fix

              Method buildLists has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  void buildLists() {
                      TreeSet<RouteInputElement> inputTS = new TreeSet<>(new RouteElementComparator());
                      TreeSet<RouteOutputElement> outputTS = new TreeSet<>(new RouteElementComparator());
                      //TreeSet <RouteInputElement>inputTS = new TreeSet<RouteInputElement>();
                      //TreeSet <RouteOutputElement>outputTS = new TreeSet<RouteOutputElement>();
              Severity: Major
              Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 3 hrs to fix

                Method makeRouteConditional has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    int makeRouteConditional(int numConds, /*boolean onChange,*/ ArrayList<ConditionalAction> actionList,
                            ArrayList<ConditionalVariable> triggerList, ArrayList<ConditionalVariable> vetoList,
                            Logix logix, String sName, String uName, String type) {
                        if (log.isDebugEnabled()) {
                            log.debug("makeRouteConditional: numConds= {}, triggerList.size()= {}", numConds, triggerList.size());
                Severity: Major
                Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 2 hrs to fix

                  Method getAlignmentSensors has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring.
                  Open

                      void getAlignmentSensors(String cSysName) {
                          Conditional c = _conditionalManager.getBySystemName(cSysName);
                          if (c != null) {
                              AlignElement element = null;
                              List<ConditionalAction> actionList = c.getCopyOfActions();
                  Severity: Minor
                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - 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

                  Method getTestState has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          @Override
                          String getTestState() {
                              switch (_state) {
                                  case Conditional.TYPE_SIGNAL_HEAD_RED:
                                      return ON_RED;
                  Severity: Minor
                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 hr to fix

                    Method setupEdit has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        void setupEdit(ActionEvent e) {
                            makeEditWindow();
                            Logix logix = checkNamesOK();
                            if (logix == null) {
                                return;
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 hr to fix

                      Method makeRouteConditional has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring.
                      Open

                          int makeRouteConditional(int numConds, /*boolean onChange,*/ ArrayList<ConditionalAction> actionList,
                                  ArrayList<ConditionalVariable> triggerList, ArrayList<ConditionalVariable> vetoList,
                                  Logix logix, String sName, String uName, String type) {
                              if (log.isDebugEnabled()) {
                                  log.debug("makeRouteConditional: numConds= {}, triggerList.size()= {}", numConds, triggerList.size());
                      Severity: Minor
                      Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - 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

                      Method getLockConditions has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          void getLockConditions(String cSysName) {
                              Conditional c = _conditionalManager.getBySystemName(cSysName);
                              if (c != null) {
                                  _lock = true;
                                  // Verify conditional is what we think it is
                      Severity: Minor
                      Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 hr to fix

                        Method setTestState has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                @Override
                                void setTestState(String state) {
                                    if (ON_RED.equals(state)) {
                                        _state = Conditional.TYPE_SIGNAL_HEAD_RED;
                                    } else if (ON_FLASHRED.equals(state)) {
                        Severity: Minor
                        Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 hr to fix

                          Method clearPage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              void clearPage() {
                                  // move to show all turnouts if not there
                                  cancelIncludedOnly();
                                  deleteButton.setVisible(false);
                                  cancelButton.setVisible(false);
                          Severity: Minor
                          Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 hr to fix

                            Method getSetToState has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    @Override
                                    String getSetToState() {
                                        switch (_state) {
                                            case SignalHead.DARK:
                                                return SET_TO_DARK;
                            Severity: Minor
                            Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 1 hr to fix

                              Method makeRouteConditional has 8 arguments (exceeds 5 allowed). Consider refactoring.
                              Open

                                  int makeRouteConditional(int numConds, /*boolean onChange,*/ ArrayList<ConditionalAction> actionList,
                                          ArrayList<ConditionalVariable> triggerList, ArrayList<ConditionalVariable> vetoList,
                                          Logix logix, String sName, String uName, String type) {
                              Severity: Major
                              Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 50 mins to fix

                                Method getLockConditions has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring.
                                Open

                                    void getLockConditions(String cSysName) {
                                        Conditional c = _conditionalManager.getBySystemName(cSysName);
                                        if (c != null) {
                                            _lock = true;
                                            // Verify conditional is what we think it is
                                Severity: Minor
                                Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - 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

                                Method makeAlignConditional has 6 arguments (exceeds 5 allowed). Consider refactoring.
                                Open

                                    int makeAlignConditional(int numConds, ArrayList<ConditionalAction> actionList,
                                            ArrayList<ConditionalVariable> triggerList,
                                            Logix logix, String sName, String uName) {
                                Severity: Minor
                                Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java - About 35 mins to fix

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

                                      class RouteInputModel extends RouteElementModel {
                                  
                                          @Override
                                          public boolean isInput() {
                                              return true;
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 4 hrs to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2188..2261

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

                                  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 RouteOutputModel extends RouteElementModel {
                                  
                                          @Override
                                          public boolean isInput() {
                                              return false;
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 4 hrs to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2110..2183

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

                                  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 RouteInputLight extends RouteInputElement {
                                  
                                          RouteInputLight(String sysName, String userName) {
                                              super(sysName, userName, LIGHT_TYPE);
                                              setState(Conditional.TYPE_LIGHT_OFF);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 3 hrs to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2563..2604

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

                                  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 RouteInputSensor extends RouteInputElement {
                                  
                                          RouteInputSensor(String sysName, String userName) {
                                              super(sysName, userName, SENSOR_TYPE);
                                              setState(Conditional.TYPE_SENSOR_ACTIVE);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 3 hrs to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2648..2689

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

                                  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 RouteOutputLight extends RouteOutputElement {
                                  
                                          RouteOutputLight(String sysName, String userName) {
                                              super(sysName, userName, LIGHT_TYPE);
                                              setState(Light.ON);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 2 hrs to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2832..2864

                                  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

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

                                      class RouteOutputTurnout extends RouteOutputElement {
                                  
                                          RouteOutputTurnout(String sysName, String userName) {
                                              super(sysName, userName, TURNOUT_TYPE);
                                              setState(Turnout.CLOSED);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 2 hrs to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2866..2898

                                  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

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

                                                      case SENSOR_TYPE:
                                                          if (alignType == SENSOR_TYPE) {
                                                              add = true;
                                                          }
                                                          switch (elt.getState()) {
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 1 hr to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1615..1633
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1634..1652

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

                                  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

                                                      case LIGHT_TYPE:
                                                          if (alignType == LIGHT_TYPE) {
                                                              add = true;
                                                          }
                                                          switch (elt.getState()) {
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 1 hr to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1596..1614
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1615..1633

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

                                  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

                                                      case TURNOUT_TYPE:
                                                          if (alignType == TURNOUT_TYPE) {
                                                              add = true;
                                                          }
                                                          switch (elt.getState()) {
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 1 hr to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1596..1614
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1634..1652

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

                                  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

                                          while (it.hasNext()) {
                                              RouteInputElement elt = it.next();
                                              _inputList.add(elt);
                                              String key = elt.getType() + elt.getSysName();
                                              _inputMap.put(key, elt);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 1 hr to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 399..409
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 415..425

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

                                          while (itAlign.hasNext()) {
                                              AlignElement elt = itAlign.next();
                                              _alignList.add(elt);
                                              String key = elt.getType() + elt.getSysName();
                                              _alignMap.put(key, elt);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 1 hr to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 387..397
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 399..409

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

                                          while (itOut.hasNext()) {
                                              RouteOutputElement elt = itOut.next();
                                              _outputList.add(elt);
                                              String key = elt.getType() + elt.getSysName();
                                              _outputMap.put(key, elt);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 1 hr to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 387..397
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 415..425

                                  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

                                              for (int i = 0; i < twoTriggerList.size(); i++) {
                                                  ArrayList<ConditionalVariable> vList = new ArrayList<>();
                                                  vList.add(twoTriggerList.get(i));
                                                  numConds = makeRouteConditional(numConds, /*true, actionList,*/ onChangeList, vList,
                                                          vetoList, logix, sName, uName, "T");
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 55 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1556..1561

                                  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

                                              for (int i = 0; i < oneTriggerList.size(); i++) {
                                                  ArrayList<ConditionalVariable> vList = new ArrayList<>();
                                                  vList.add(oneTriggerList.get(i));
                                                  numConds = makeRouteConditional(numConds, /*false,*/ actionList, vList,
                                                          vetoList, logix, sName, uName, "T");
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 55 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1562..1567

                                  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

                                                      default:
                                                          if (!getLogixInitializer().equals(variable.getName())) {
                                                              JmriJOptionPane.showMessageDialog(
                                                                      _addFrame, java.text.MessageFormat.format(rbx.getString("TypeWarnVar"),
                                                                              new Object[]{variable.toString(), c.getSystemName()}),
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 55 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 745..752

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

                                  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

                                                      default:
                                                          if (!getLogixInitializer().equals(variable.getName())) {
                                                              JmriJOptionPane.showMessageDialog(
                                                                      _addFrame, java.text.MessageFormat.format(rbx.getString("TypeWarnVar"),
                                                                              new Object[]{variable.toString(), c.getSystemName()}),
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 55 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 634..641

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

                                  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

                                      void initializeIncludedOutputList() {
                                          _includedOutputList = new ArrayList<>();
                                          for (int i = 0; i < _outputList.size(); i++) {
                                              if (_outputList.get(i).isIncluded()) {
                                                  _includedOutputList.add(_outputList.get(i));
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1193..1200
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1217..1224

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 57.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      void initializeIncludedInputList() {
                                          _includedInputList = new ArrayList<>();
                                          for (int i = 0; i < _inputList.size(); i++) {
                                              if (_inputList.get(i).isIncluded()) {
                                                  _includedInputList.add(_inputList.get(i));
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1205..1212
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1217..1224

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 57.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      void initializeIncludedAlignList() {
                                          _includedAlignList = new ArrayList<>();
                                          for (int i = 0; i < _alignList.size(); i++) {
                                              if (_alignList.get(i).isIncluded()) {
                                                  _includedAlignList.add(_alignList.get(i));
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1193..1200
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1205..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 57.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                          shm.getNamedBeanSet().forEach((nb) -> {
                                              String userName = nb.getUserName();
                                              String systemName = nb.getSystemName();
                                              inputTS.add(new RouteInputSignal(systemName, userName));
                                              outputTS.add(new RouteOutputSignal(systemName, userName));
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 348..353
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 365..370

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

                                  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

                                          lm.getNamedBeanSet().forEach((nb) -> {
                                              String userName = nb.getUserName();
                                              String systemName = nb.getSystemName();
                                              inputTS.add(new RouteInputLight(systemName, userName));
                                              outputTS.add(new RouteOutputLight(systemName, userName));
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 348..353
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 372..377

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

                                  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

                                          tm.getNamedBeanSet().forEach((nb) -> {
                                              String userName = nb.getUserName();
                                              String systemName = nb.getSystemName();
                                              inputTS.add(new RouteInputTurnout(systemName, userName));
                                              outputTS.add(new RouteOutputTurnout(systemName, userName));
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 365..370
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 372..377

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

                                  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

                                          @Override
                                          String getSetToState() {
                                              switch (_state) {
                                                  case Sensor.INACTIVE:
                                                      return SET_TO_INACTIVE;
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/routetable/RouteSensor.java on lines 30..44

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 55.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                              } else if (SET_TO_CLEAR.equals(state)) {
                                                  _state = CLEAR_SIGNAL_HELD;
                                              } else if (SET_TO_LIT.equals(state)) {
                                                  _state = SET_SIGNAL_LIT;
                                              } else if (SET_TO_HELD.equals(state)) {
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2994..3000

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

                                  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

                                              } else if (ALIGN_LIGHT.equals(state)) {
                                                  _state = LIGHT_TYPE;
                                              } else if (ALIGN_SIGNAL.equals(state)) {
                                                  _state = SIGNAL_TYPE;
                                              } else if (ALIGN_ALL.equals(state)) {
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 45 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2953..2959

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

                                  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

                                          switch (type) {
                                              case SENSOR_TYPE:
                                                  return INPUT_SENSOR_STATES;
                                              case TURNOUT_TYPE:
                                                  return INPUT_TURNOUT_STATES;
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 40 mins to fix
                                  java/src/jmri/jmrit/display/Editor.java on lines 789..803

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 50.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                              } else {
                                                  JmriJOptionPane.showMessageDialog(
                                                          _addFrame, java.text.MessageFormat.format(rbx.getString("NoAlign"),
                                                                  new Object[]{name, sensor.getAlignType()}),
                                                          Bundle.getMessage("WarningTitle"), JmriJOptionPane.WARNING_MESSAGE);
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 35 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 805..810

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

                                  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 (retVal == JFileChooser.APPROVE_OPTION) {
                                              try {
                                                  soundFile.setText(FileUtil.getPortableFilename(soundChooser.getSelectedFile().getCanonicalPath()));
                                              } catch (java.io.IOException e) {
                                                  log.error("exception setting sound file", e);
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 35 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1342..1348

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

                                  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

                                              } else {
                                                  if (_showAllOutput) {
                                                      elt = _outputList.get(row);
                                                  } else {
                                                      elt = _includedOutputList.get(row);
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 35 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2020..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 46.

                                  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 (!found) {
                                                          JmriJOptionPane.showMessageDialog(
                                                                  _addFrame, java.text.MessageFormat.format(rbx.getString("LockWarn3"),
                                                                          new Object[]{name, c.getSystemName()}),
                                                                  rbx.getString("EditDiff"), JmriJOptionPane.WARNING_MESSAGE);
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 35 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1708..1713

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

                                  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 (model.isInput()) {
                                                  if (_showAllInput) {
                                                      elt = _inputList.get(row);
                                                  } else {
                                                      elt = _includedInputList.get(row);
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 35 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 2027..2034

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

                                  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 (retVal == JFileChooser.APPROVE_OPTION) {
                                              try {
                                                  scriptFile.setText(FileUtil.getPortableFilename(scriptChooser.getSelectedFile().getCanonicalPath()));
                                              } catch (java.io.IOException e) {
                                                  log.error("exception setting script file", e);
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 35 mins to fix
                                  java/src/jmri/jmrit/beantable/LRouteTableAction.java on lines 1321..1327

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

                                  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

                                          @Override
                                          public void configureTable(JTable table) {
                                              table.setDefaultRenderer(Boolean.class, new EnablingCheckboxRenderer());
                                              table.setDefaultRenderer(JComboBox.class, new jmri.jmrit.symbolicprog.ValueRenderer());
                                              table.setDefaultEditor(JComboBox.class, new jmri.jmrit.symbolicprog.ValueEditor());
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 2 other locations - About 30 mins to fix
                                  java/src/jmri/jmrit/beantable/LogixTableAction.java on lines 274..280
                                  java/src/jmri/jmrit/beantable/RouteTableDataModel.java on lines 155..161

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 42.

                                  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

                                      void handleCreateException(String sysName) {
                                          JmriJOptionPane.showMessageDialog(_addFrame,
                                                  Bundle.getMessage("ErrorLRouteAddFailed", sysName) + "\n" + Bundle.getMessage("ErrorAddFailedCheck"),
                                                  Bundle.getMessage("ErrorTitle"),
                                                  JmriJOptionPane.ERROR_MESSAGE);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 3 other locations - About 30 mins to fix
                                  java/src/jmri/jmrit/beantable/BlockTableAction.java on lines 402..407
                                  java/src/jmri/jmrit/beantable/MemoryTableAction.java on lines 230..235
                                  java/src/jmri/jmrit/beantable/OBlockTableAction.java on lines 478..483

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

                                  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

                                      void showReminderMessage() {
                                          if (checkEnabled) return;
                                          InstanceManager.getDefault(jmri.UserPreferencesManager.class).
                                              showInfoMessage(Bundle.getMessage("ReminderTitle"), Bundle.getMessage("ReminderSaveString", Bundle.getMessage("BeanNameLRoute")),
                                                      getClassName(),
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/LRouteTableAction.java and 1 other location - About 30 mins to fix
                                  java/src/jmri/jmrit/beantable/routetable/AbstractRouteAddEditFrame.java on lines 586..592

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

                                  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