java/src/jmri/jmrit/beantable/TransitTableAction.java

Summary

Maintainability
F
1 mo
Test Coverage
F
28%

File TransitTableAction.java has 2781 lines of code (exceeds 300 allowed). Consider refactoring.
Open

package jmri.jmrit.beantable;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
Severity: Major
Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 wk to fix

    TransitTableAction has 86 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class TransitTableAction extends AbstractTableAction<Transit> {
    
        /**
         * Create an action with a specific title.
         * <p>
    Severity: Major
    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 day to fix

      Method addEditActionWindow has 253 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void addEditActionWindow() {
              if (addEditActionFrame == null) {
                  // set up add/edit action window
                  addEditActionFrame = new JmriJFrame(rbx.getString("TitleAddAction"));
                  addEditActionFrame.addHelpMenu(
      Severity: Major
      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 day to fix

        Method addAlternateForSeqPressed has a Cognitive Complexity of 76 (exceeds 20 allowed). Consider refactoring.
        Open

            void addAlternateForSeqPressed(ActionEvent e) {
                int seq = getSeqNum();
                if (seq == 0) {
                    return;
                }
        Severity: Minor
        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 day to fix

        Cognitive Complexity

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

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

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

        Further reading

        Method replacePrimaryForSeqPressed has a Cognitive Complexity of 76 (exceeds 20 allowed). Consider refactoring.
        Open

            void replacePrimaryForSeqPressed(ActionEvent e) {
                int seq = getSeqNum();
                if (seq == 0) {
                    return;
                }
        Severity: Minor
        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 day to fix

        Cognitive Complexity

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

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

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

        Further reading

        Method addEditPressed has 187 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            void addEditPressed() {
                pref = InstanceManager.getDefault(UserPreferencesManager.class);
                if (addFrame == null) {
                    addFrame = new JmriJFrame(Bundle.getMessage("TitleAddTransit"));
                    addFrame.addHelpMenu("package.jmri.jmrit.beantable.TransitAddEdit", true);
        Severity: Major
        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 7 hrs to fix

          Method createModel has 166 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              protected void createModel() {
                  m = new BeanTableDataModel<Transit>() {
          
                      static public final int EDITCOL = NUMCOLUMN;
          Severity: Major
          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 6 hrs to fix

            Method setWhat has 165 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void setWhat(int code) {
                    // setting the whatBox here causes recursion
                    // hide all input boxes, set those needed visible via a switch case
                    whatStringField.setVisible(false);
                    whatPercentSpinner.setVisible(false);
            Severity: Major
            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 6 hrs to fix

              Method validateWhatData has 125 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private boolean validateWhatData() {
                      tWhat = getWhatMenuCode((String)whatBox.getSelectedItem());
                      tWhatData1 = 0;
                      tWhatData2 = 0;
                      tWhatString = "";
              Severity: Major
              Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 5 hrs to fix

                Method addAlternateForSeqPressed has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    void addAlternateForSeqPressed(ActionEvent e) {
                        int seq = getSeqNum();
                        if (seq == 0) {
                            return;
                        }
                Severity: Major
                Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 4 hrs to fix

                  Method replacePrimaryForSeqPressed has 120 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      void replacePrimaryForSeqPressed(ActionEvent e) {
                          int seq = getSeqNum();
                          if (seq == 0) {
                              return;
                          }
                  Severity: Major
                  Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 4 hrs to fix

                    Method createModel has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring.
                    Open

                        @Override
                        protected void createModel() {
                            m = new BeanTableDataModel<Transit>() {
                    
                                static public final int EDITCOL = NUMCOLUMN;
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.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 validateWhatData has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring.
                    Open

                        private boolean validateWhatData() {
                            tWhat = getWhatMenuCode((String)whatBox.getSelectedItem());
                            tWhatData1 = 0;
                            tWhatData2 = 0;
                            tWhatString = "";
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.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 getWhatText has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private String getWhatText(int r) {
                            TransitSectionAction tsa = action.get(activeRow).get(r);
                            switch (tsa.getWhatCode()) {
                                case TransitSectionAction.PAUSE:
                                    return java.text.MessageFormat.format(rbx.getString("PauseFull"),
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 3 hrs to fix

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

                          private void addEditActionsPressed(int r) {
                              activeRow = r;
                              if (actionTableModel != null) {
                                  actionTableModel.fireTableStructureChanged();
                              }
                      Severity: Major
                      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 3 hrs to fix

                        Method setWhat has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
                        Open

                            private void setWhat(int code) {
                                // setting the whatBox here causes recursion
                                // hide all input boxes, set those needed visible via a switch case
                                whatStringField.setVisible(false);
                                whatPercentSpinner.setVisible(false);
                        Severity: Minor
                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 3 hrs to fix

                        Cognitive Complexity

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

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

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

                        Further reading

                        Method initializeSectionCombos has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private void initializeSectionCombos() {
                                primarySectionBox.removeAllItems();
                                alternateSectionBox.removeAllItems();
                                insertAtBeginningBox.removeAllItems();
                                primarySectionBoxList.clear();
                        Severity: Major
                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 2 hrs to fix

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

                              private int getWhatMenuCode(String s) {
                                  if (s.equals(rbx.getString("SelectWhat"))) {
                                      return TransitSectionAction.SELECTWHAT;
                                  }
                                  if (s.equals(rbx.getString("TerminateTrain"))) {
                          Severity: Major
                          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 2 hrs to fix

                            Method initializeSectionCombos has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring.
                            Open

                                private void initializeSectionCombos() {
                                    primarySectionBox.removeAllItems();
                                    alternateSectionBox.removeAllItems();
                                    insertAtBeginningBox.removeAllItems();
                                    primarySectionBoxList.clear();
                            Severity: Minor
                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.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 getWhenText has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private String getWhenText(int r) {
                                    TransitSectionAction tsa = action.get(activeRow).get(r);
                                    switch (tsa.getWhenCode()) {
                                        case TransitSectionAction.ENTRY:
                                            if (tsa.getDataWhen() > 0) {
                            Severity: Major
                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 2 hrs to fix

                              Method initializeEditInformation has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private void initializeEditInformation() {
                                      sectionList.clear();
                                      sequence.clear();
                                      action.clear();
                                      direction.clear();
                              Severity: Minor
                              Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

                                Method getWhatMenuText has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private String getWhatMenuText(int i) {
                                        switch (i) {
                                            case TransitSectionAction.SELECTWHAT:
                                                return rbx.getString("SelectWhat");
                                            case TransitSectionAction.TERMINATETRAIN:
                                Severity: Minor
                                Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

                                  Method setWhen has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private void setWhen(int code) {
                                          // setting the whenBox here causes recursion
                                          whenSensorComboBox.setVisible(false);
                                          blockBox.setVisible(false);
                                          panelDelay.setVisible(true);
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

                                    Method addNextSectionPressed has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        void addNextSectionPressed(ActionEvent e) {
                                            if (primarySectionBoxList.isEmpty()) {
                                                JmriJOptionPane.showMessageDialog(addFrame, rbx
                                                        .getString("Message25"), Bundle.getMessage("ErrorTitle"),
                                                        JmriJOptionPane.ERROR_MESSAGE);
                                    Severity: Minor
                                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

                                      Method getValueAt has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              @Override
                                              public Object getValueAt(int r, int c) {
                                                  int rx = r;
                                                  if (rx > sectionList.size()) {
                                                      return null;
                                      Severity: Minor
                                      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

                                        Method getWhenMenuCode has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private int getWhenMenuCode(String s) {
                                                if (s.equals(rbx.getString("OnEntry"))) {
                                                    return TransitSectionAction.ENTRY;
                                                }
                                                if (s.equals(rbx.getString("OnExit"))) {
                                        Severity: Minor
                                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

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

                                              private String getWhenMenuText(int i) {
                                                  switch (i) {
                                                      case TransitSectionAction.ENTRY:
                                                          return rbx.getString("OnEntry");
                                                      case TransitSectionAction.EXIT:
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

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

                                                private boolean forwardConnected(Section s1, Section s2, int restrictedDirection) {
                                                    if ((s1 != null) && (s2 != null)) {
                                                        List<EntryPoint> s1ForwardEntries = s1.getForwardEntryPointList();
                                                        List<EntryPoint> s2Entries;
                                                        switch (restrictedDirection) {
                                            Severity: Minor
                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

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

                                                  private boolean reverseConnected(Section s1, Section s2, int restrictedDirection) {
                                                      if ((s1 != null) && (s2 != null)) {
                                                          List<EntryPoint> s1ReverseEntries = s1.getReverseEntryPointList();
                                                          List<EntryPoint> s2Entries;
                                                          switch (restrictedDirection) {
                                              Severity: Minor
                                              Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 1 hr to fix

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

                                                    private void initializeEditInformation() {
                                                        sectionList.clear();
                                                        sequence.clear();
                                                        action.clear();
                                                        direction.clear();
                                                Severity: Minor
                                                Found in java/src/jmri/jmrit/beantable/TransitTableAction.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

                                                Avoid too many return statements within this method.
                                                Open

                                                            return TransitSectionAction.SENSORINACTIVE;
                                                Severity: Major
                                                Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                      return false;
                                                  Severity: Major
                                                  Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                        return java.text.MessageFormat.format(rbx.getString("TrainStopDelayedFull"),
                                                                                new Object[]{"" + tsa.getDataWhen()});
                                                    Severity: Major
                                                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                  return TransitSectionAction.RELEASESIGNAL;
                                                      Severity: Major
                                                      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                        return java.text.MessageFormat.format(rbx.getString("OnSensorInactiveFull"),
                                                                                new Object[]{tsa.getStringWhen()});
                                                        Severity: Major
                                                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                      return TransitSectionAction.SETSENSORINACTIVE;
                                                          Severity: Major
                                                          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                return false;
                                                            Severity: Major
                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                          return TransitSectionAction.LOCOFUNCTION;
                                                              Severity: Major
                                                              Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                return rbx.getString("TrainStartFull");
                                                                Severity: Major
                                                                Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                      return java.text.MessageFormat.format(rbx.getString("OnSensorInactiveDelayedFull"),
                                                                                              new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                  Severity: Major
                                                                  Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                        return cb;
                                                                    Severity: Major
                                                                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                  return TransitSectionAction.SOUNDHORN;
                                                                      Severity: Major
                                                                      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                    return TransitSectionAction.SENSORACTIVE;
                                                                        Severity: Major
                                                                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                  return TransitSectionAction.SELECTWHEN;
                                                                          Severity: Major
                                                                          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                        return TransitSectionAction.SETCURRENTSPEED;
                                                                            Severity: Major
                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                          return TransitSectionAction.STARTBELL;
                                                                              Severity: Major
                                                                              Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                                return java.text.MessageFormat.format(rbx.getString("OnBlockExitFull"),
                                                                                                        new Object[]{tsa.getStringWhen()});
                                                                                Severity: Major
                                                                                Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                      return Bundle.getMessage("BeanStateUnknown");
                                                                                  Severity: Major
                                                                                  Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                return TransitSectionAction.PRESTARTDELAY;
                                                                                    Severity: Major
                                                                                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                  return TransitSectionAction.RAMPTRAINSPEED;
                                                                                      Severity: Major
                                                                                      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                return 0;
                                                                                        Severity: Major
                                                                                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                              return java.text.MessageFormat.format(rbx.getString("OnBlockExitDelayedFull"),
                                                                                                                      new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                          Severity: Major
                                                                                          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                                    return java.text.MessageFormat.format(rbx.getString("LoadTrainInfoDefaultFull"),
                                                                                                                            new Object[]{tsa.getStringWhat()});
                                                                                            Severity: Major
                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                                  return java.text.MessageFormat.format(rbx.getString("TrainStartDelayedFull"),
                                                                                                                          new Object[]{"" + tsa.getDataWhen()});
                                                                                              Severity: Major
                                                                                              Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                            return TransitSectionAction.ESTOP;
                                                                                                Severity: Major
                                                                                                Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                              return TransitSectionAction.HOLDSIGNAL;
                                                                                                  Severity: Major
                                                                                                  Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                return TransitSectionAction.TOMANUALMODE;
                                                                                                    Severity: Major
                                                                                                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                  return TransitSectionAction.PRESTARTRESUME;
                                                                                                      Severity: Major
                                                                                                      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                        return java.text.MessageFormat.format(rbx.getString("OnSensorActiveFull"),
                                                                                                                                new Object[]{tsa.getStringWhen()});
                                                                                                        Severity: Major
                                                                                                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                              return java.text.MessageFormat.format(rbx.getString("OnSensorActiveDelayedFull"),
                                                                                                                                      new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                                          Severity: Major
                                                                                                          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                        return TransitSectionAction.STOPBELL;
                                                                                                            Severity: Major
                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                          return TransitSectionAction.SOUNDHORNPATTERN;
                                                                                                              Severity: Major
                                                                                                              Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                            return TransitSectionAction.SETSENSORACTIVE;
                                                                                                                Severity: Major
                                                                                                                Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                          return true;
                                                                                                                  Severity: Major
                                                                                                                  Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this method.
                                                                                                                    Open

                                                                                                                                return TransitSectionAction.PRESTARTACTION;
                                                                                                                    Severity: Major
                                                                                                                    Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this method.
                                                                                                                      Open

                                                                                                                                  return TransitSectionAction.SETLIGHT;
                                                                                                                      Severity: Major
                                                                                                                      Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this method.
                                                                                                                        Open

                                                                                                                                        return rbx.getString("TrainStopFull");
                                                                                                                        Severity: Major
                                                                                                                        Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this method.
                                                                                                                          Open

                                                                                                                                  return "WHAT";
                                                                                                                          Severity: Major
                                                                                                                          Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 30 mins to fix

                                                                                                                            Method getWhatMenuCode has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                private int getWhatMenuCode(String s) {
                                                                                                                                    if (s.equals(rbx.getString("SelectWhat"))) {
                                                                                                                                        return TransitSectionAction.SELECTWHAT;
                                                                                                                                    }
                                                                                                                                    if (s.equals(rbx.getString("TerminateTrain"))) {
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java - About 25 mins to fix

                                                                                                                            Cognitive Complexity

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

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

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

                                                                                                                            Further reading

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

                                                                                                                                    for (Section s : sectionManager.getNamedBeanSet()) {
                                                                                                                                        Section mayBeSection = null;
                                                                                                                                        String mayBeName = s.getDisplayName();
                                                                                                                                        int mayBeDirection = 0;
                                                                                                                                        if ((s != primarySection) && (s != beforeSection)
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 5 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 799..842

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

                                                                                                                            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 (Section s : sectionManager.getNamedBeanSet()) {
                                                                                                                                        Section mayBeSection = null;
                                                                                                                                        String mayBeName = s.getDisplayName();
                                                                                                                                        int mayBeDirection = 0;
                                                                                                                                        if ((s != sOld) && (s != beforeSection)
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 5 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 986..1029

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

                                                                                                                            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 < sectionList.size(); i++) {
                                                                                                                                        if ((sequence.get(i) == seq) && (!alternate.get(i))) {
                                                                                                                                            sOld = sectionList.get(i);
                                                                                                                                            index = i;
                                                                                                                                        }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 3 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 959..978

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

                                                                                                                            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 < sectionList.size(); i++) {
                                                                                                                                        if ((sequence.get(i) == seq) && (!alternate.get(i))) {
                                                                                                                                            primarySection = sectionList.get(i);
                                                                                                                                            index = i;
                                                                                                                                        }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 3 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 771..790

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

                                                                                                                            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

                                                                                                                                private boolean forwardConnected(Section s1, Section s2, int restrictedDirection) {
                                                                                                                                    if ((s1 != null) && (s2 != null)) {
                                                                                                                                        List<EntryPoint> s1ForwardEntries = s1.getForwardEntryPointList();
                                                                                                                                        List<EntryPoint> s2Entries;
                                                                                                                                        switch (restrictedDirection) {
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 3 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1305..1332

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

                                                                                                                            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

                                                                                                                                private boolean reverseConnected(Section s1, Section s2, int restrictedDirection) {
                                                                                                                                    if ((s1 != null) && (s2 != null)) {
                                                                                                                                        List<EntryPoint> s1ReverseEntries = s1.getReverseEntryPointList();
                                                                                                                                        List<EntryPoint> s2Entries;
                                                                                                                                        switch (restrictedDirection) {
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 3 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1276..1303

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

                                                                                                                            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 (possibles.size() > 1) {
                                                                                                                                        Object choices[] = new Object[possibles.size()];
                                                                                                                                        for (int j = 0; j < possibles.size(); j++) {
                                                                                                                                            choices[j] = possibleNames.get(j);
                                                                                                                                        }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 2 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 851..868

                                                                                                                            Duplicated Code

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

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

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

                                                                                                                            Tuning

                                                                                                                            This issue has a mass of 158.

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

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

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

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

                                                                                                                            Refactorings

                                                                                                                            Further Reading

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

                                                                                                                                    if (possibles.size() > 1) {
                                                                                                                                        Object choices[] = new Object[possibles.size()];
                                                                                                                                        for (int j = 0; j < possibles.size(); j++) {
                                                                                                                                            choices[j] = possibleNames.get(j);
                                                                                                                                        }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 2 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1038..1055

                                                                                                                            Duplicated Code

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

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

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

                                                                                                                            Tuning

                                                                                                                            This issue has a mass of 158.

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

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

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

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

                                                                                                                            Refactorings

                                                                                                                            Further Reading

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

                                                                                                                                void updatePressed(ActionEvent e) {
                                                                                                                                    if (!checkTransitInformation()) {
                                                                                                                                        return;
                                                                                                                                    }
                                                                                                                                    // check if user name has been changed
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 2 hrs to fix
                                                                                                                            java/src/jmri/jmrit/beantable/SectionTableAction.java on lines 688..716

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

                                                                                                                            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 (Section s : sectionManager.getNamedBeanSet()) {
                                                                                                                                            String sName = s.getDisplayName();
                                                                                                                                            if ((s != prevSection) && (forwardConnected(s, curSection, curSectionDirection))) {
                                                                                                                                                primarySectionBox.addItem(sName);
                                                                                                                                                primarySectionBoxList.add(s);
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 1 hr to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1258..1269

                                                                                                                            Duplicated Code

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

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

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

                                                                                                                            Tuning

                                                                                                                            This issue has a mass of 122.

                                                                                                                            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 (Section s : sectionManager.getNamedBeanSet()) {
                                                                                                                                            String sName = s.getDisplayName();
                                                                                                                                            if ((s != firstSection) && (forwardConnected(s, firstSection, testDirection))) {
                                                                                                                                                insertAtBeginningBox.addItem(sName);
                                                                                                                                                insertAtBeginningBoxList.add(s);
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 1 hr to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1223..1234

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

                                                                                                                            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

                                                                                                                                        case TransitSectionAction.BLOCKENTRY:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("OnBlockEntryDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 1 hr to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2584..2590
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2603..2609
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2610..2616

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

                                                                                                                            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

                                                                                                                                        case TransitSectionAction.SENSORACTIVE:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("OnSensorActiveDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 1 hr to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2577..2583
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2584..2590
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2610..2616

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

                                                                                                                            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

                                                                                                                                        case TransitSectionAction.BLOCKEXIT:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("OnBlockExitDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 1 hr to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2577..2583
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2603..2609
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2610..2616

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

                                                                                                                            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

                                                                                                                                        case TransitSectionAction.SENSORINACTIVE:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("OnSensorInactiveDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 1 hr to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2577..2583
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2584..2590
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2603..2609

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

                                                                                                                            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 ((tWhatString == null) || tWhatString.isEmpty() || (tWhatString.length() < 1)) {
                                                                                                                                                JmriJOptionPane.showMessageDialog(addEditActionFrame, (rbx.getString("MissingPattern")),
                                                                                                                                                        Bundle.getMessage("ErrorTitle"), JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                                                return false;
                                                                                                                                            }
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 50 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2222..2226

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

                                                                                                                            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

                                                                                                                                private void removeSupportingArrayEntries(int index) {
                                                                                                                                    sectionList.remove(index);
                                                                                                                                    sequence.remove(index);
                                                                                                                                    direction.remove(index);
                                                                                                                                    action.remove(index);
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 50 mins to fix
                                                                                                                            java/src/jmri/jmrit/operations/trains/TrainRoadOptionsFrame.java on lines 305..315

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

                                                                                                                            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 ((tWhatString2 == null) || tWhatString2.isEmpty() || (tWhatString2.length() < 1)) {
                                                                                                                                                    JmriJOptionPane.showMessageDialog(addEditActionFrame, (rbx.getString("MissingRosterEntryOrLocoAddress")),
                                                                                                                                                            Bundle.getMessage("ErrorTitle"), JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                                                    return false;
                                                                                                                                                }
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 50 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2247..2251

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

                                                                                                                            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

                                                                                                                                private void doneWithActionsPressed(ActionEvent e) {
                                                                                                                                    actionTableFrame.setVisible(false);
                                                                                                                                    actionTableFrame.dispose();
                                                                                                                                    actionTableFrame = null;
                                                                                                                                    if (addEditActionFrame != null) {
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 50 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1437..1447

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

                                                                                                                            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
                                                                                                                                        public void windowClosing(java.awt.event.WindowEvent e) {
                                                                                                                                            actionTableFrame.setVisible(false);
                                                                                                                                            actionTableFrame.dispose();
                                                                                                                                            actionTableFrame = null;
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 50 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1453..1462

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

                                                                                                                            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

                                                                                                                                        case TransitSectionAction.ENTRY:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("OnEntryDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 45 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2571..2576
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2591..2596
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2597..2602

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

                                                                                                                                        case TransitSectionAction.EXIT:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("OnExitDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 45 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2565..2570
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2591..2596
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2597..2602

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

                                                                                                                                        case TransitSectionAction.TRAINSTOP:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("TrainStopDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 45 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2565..2570
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2571..2576
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2597..2602

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

                                                                                                                                        case TransitSectionAction.TRAINSTART:
                                                                                                                                            if (tsa.getDataWhen() > 0) {
                                                                                                                                                return java.text.MessageFormat.format(rbx.getString("TrainStartDelayedFull"),
                                                                                                                                                        new Object[]{"" + tsa.getDataWhen()});
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 45 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2565..2570
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2571..2576
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2591..2596

                                                                                                                            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

                                                                                                                                    if (possibles.isEmpty()) {
                                                                                                                                        JmriJOptionPane.showMessageDialog(addFrame,
                                                                                                                                                java.text.MessageFormat.format(rbx.getString("Message36"),
                                                                                                                                                        new Object[]{"" + seq}), Bundle.getMessage("ErrorTitle"),
                                                                                                                                                JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 45 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1030..1036

                                                                                                                            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

                                                                                                                                    if (possibles.isEmpty()) {
                                                                                                                                        JmriJOptionPane.showMessageDialog(addFrame,
                                                                                                                                                java.text.MessageFormat.format(rbx.getString("Message37"),
                                                                                                                                                        new Object[]{"" + seq}), Bundle.getMessage("ErrorTitle"),
                                                                                                                                                JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 45 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 843..849

                                                                                                                            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

                                                                                                                                    if ((sectionManager.getNamedBeanSet().size()) > 0) {
                                                                                                                                        addEditPressed();
                                                                                                                                    } else {
                                                                                                                                        JmriJOptionPane.showMessageDialog(null, rbx
                                                                                                                                                .getString("Message21"), Bundle.getMessage("ErrorTitle"),
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 35 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/SectionTableAction.java on lines 314..320

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

                                                                                                                                private void autoSystemName() {
                                                                                                                                    if (_autoSystemName.isSelected()) {
                                                                                                                            //            create.setEnabled(true);
                                                                                                                                        sysName.setEnabled(false);
                                                                                                                                        sysNameLabel.setEnabled(false);
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 8 other locations - About 35 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/AbstractLogixNGTableAction.java on lines 273..281
                                                                                                                            java/src/jmri/jmrit/beantable/AddNewBeanPanel.java on lines 151..159
                                                                                                                            java/src/jmri/jmrit/beantable/AddNewHardwareDevicePanel.java on lines 151..159
                                                                                                                            java/src/jmri/jmrit/beantable/LogixTableAction.java on lines 881..889
                                                                                                                            java/src/jmri/jmrit/beantable/SignalGroupTableAction.java on lines 711..719
                                                                                                                            java/src/jmri/jmrit/beantable/routetable/AbstractRouteAddEditFrame.java on lines 576..584
                                                                                                                            java/src/jmri/jmrit/logixng/tools/swing/LogixNGEditor.java on lines 596..604
                                                                                                                            java/src/jmri/jmrit/logixng/tools/swing/TreeEditor.java on lines 1210..1218

                                                                                                                            Duplicated Code

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

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

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

                                                                                                                            Tuning

                                                                                                                            This issue has a mass of 45.

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

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

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

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

                                                                                                                            Refactorings

                                                                                                                            Further Reading

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

                                                                                                                                    for (int i = 0; i < blockList.size(); i++) {
                                                                                                                                        String s = blockList.get(i).getDisplayName();
                                                                                                                                        blockBox.addItem(s);
                                                                                                                                    }
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 35 mins to fix
                                                                                                                            java/src/jmri/util/docbook/configurexml/RevHistoryXml.java on lines 105..108

                                                                                                                            Duplicated Code

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

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

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

                                                                                                                            Tuning

                                                                                                                            This issue has a mass of 44.

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

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

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

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

                                                                                                                            Refactorings

                                                                                                                            Further Reading

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

                                                                                                                                    if (sName.length() < 1) {
                                                                                                                                        // no sensor selected
                                                                                                                                        JmriJOptionPane.showMessageDialog(addEditActionFrame, (rbx.getString("NoSensorError")),
                                                                                                                                                Bundle.getMessage("ErrorTitle"), JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                                        return false;
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2143..2148
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2204..2208
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2213..2217

                                                                                                                            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

                                                                                                                                            if (trainInfoComboBox.getSelectedIndex() < 0 ) {
                                                                                                                                                JmriJOptionPane.showMessageDialog(addEditActionFrame, (rbx.getString("MissingTrainInfoFile")),
                                                                                                                                                        Bundle.getMessage("ErrorTitle"), JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                                                return false;
                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2117..2122
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2143..2148
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2213..2217

                                                                                                                            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

                                                                                                                                    if (sName.length() < 1) {
                                                                                                                                        // no signal selected
                                                                                                                                        JmriJOptionPane.showMessageDialog(addEditActionFrame, (rbx.getString("NoSignalError")),
                                                                                                                                                Bundle.getMessage("ErrorTitle"), JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                                        return false;
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2117..2122
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2204..2208
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2213..2217

                                                                                                                            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

                                                                                                                                                if (rosterComboBox.getSelectedIndex() < 1) {
                                                                                                                                                    JmriJOptionPane.showMessageDialog(addEditActionFrame, (rbx.getString("MissingRosterEntryOrLocoAddress")),
                                                                                                                                                            Bundle.getMessage("ErrorTitle"), JmriJOptionPane.ERROR_MESSAGE);
                                                                                                                                                    return false;
                                                                                                                                                }
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 3 other locations - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2117..2122
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2143..2148
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2204..2208

                                                                                                                            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

                                                                                                                                    @Override
                                                                                                                                    public Class<?> getColumnClass(int c) {
                                                                                                                                        switch (c) {
                                                                                                                                            case ACTION_COLUMN:
                                                                                                                                                return JButton.class;
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/LogixNGGlobalVariableTableAction.java on lines 326..338

                                                                                                                            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

                                                                                                                                        case TransitSectionAction.PRESTARTDELAY:
                                                                                                                                            return java.text.MessageFormat.format(rbx.getString("PreStartDelayFull"),
                                                                                                                                                    new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2620..2622

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

                                                                                                                            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

                                                                                                                                        case TransitSectionAction.PRESTARTACTION:
                                                                                                                                            return java.text.MessageFormat.format(rbx.getString("PreStartActionFull"),
                                                                                                                                                    new Object[]{"" + tsa.getDataWhen(), tsa.getStringWhen()});
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 2617..2619

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

                                                                                                                            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

                                                                                                                                                case TransitSectionAction.LOCOADDRESSTYPENUMBER:
                                                                                                                                                    locoAddressNumber.setSelected(true);
                                                                                                                                                    locoAddress.setText(tWhatString2);
                                                                                                                                                    rosterComboBox.setVisible(false);
                                                                                                                                                    locoAddress.setVisible(true);
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1872..1877

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

                                                                                                                            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

                                                                                                                                                case TransitSectionAction.LOCOADDRESSTYPEROSTER:
                                                                                                                                                    locoAddressRoster.setSelected(true);
                                                                                                                                                    rosterComboBox.setSelectedItem(tWhatString2);
                                                                                                                                                    rosterComboBox.setVisible(true);
                                                                                                                                                    locoAddress.setVisible(false);
                                                                                                                            Severity: Minor
                                                                                                                            Found in java/src/jmri/jmrit/beantable/TransitTableAction.java and 1 other location - About 30 mins to fix
                                                                                                                            java/src/jmri/jmrit/beantable/TransitTableAction.java on lines 1878..1883

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

                                                                                                                            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