java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java

Summary

Maintainability
F
1 mo
Test Coverage
F
34%

File PaneProgPane.java has 1885 lines of code (exceeds 300 allowed). Consider refactoring.
Open

package jmri.jmrit.symbolicprog.tabbedframe;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
Severity: Major
Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 5 days to fix

    Method newGridItem has a Cognitive Complexity of 95 (exceeds 20 allowed). Consider refactoring.
    Open

        @edu.umd.cs.findbugs.annotations.SuppressFBWarnings("DP_DO_INSIDE_DO_PRIVILEGED") // setAccessible()
        public JPanel newGridItem(Element element, boolean showStdName, Element modelElem, GridGlobals globs) {
    
            List<Attribute> itemAttList = element.getAttributes(); // get item-level attributes
            List<Attribute> attList = new ArrayList<>(globs.gridAttList);
    Severity: Minor
    Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.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 printPane has a Cognitive Complexity of 89 (exceeds 20 allowed). Consider refactoring.
    Open

        public void printPane(HardcopyWriter w) {
            // if pane is empty, don't print anything
            if (isEmpty()) {
                return;
            }
    Severity: Minor
    Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.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

    PaneProgPane has 68 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class PaneProgPane extends javax.swing.JPanel
            implements java.beans.PropertyChangeListener {
    
        static final String LAST_GRIDX = "last_gridx";
        static final String LAST_GRIDY = "last_gridy";
    Severity: Major
    Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 day to fix

      Method printPane has 226 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public void printPane(HardcopyWriter w) {
              // if pane is empty, don't print anything
              if (isEmpty()) {
                  return;
              }
      Severity: Major
      Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 day to fix

        Method newGridItem has 208 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            @edu.umd.cs.findbugs.annotations.SuppressFBWarnings("DP_DO_INSIDE_DO_PRIVILEGED") // setAccessible()
            public JPanel newGridItem(Element element, boolean showStdName, Element modelElem, GridGlobals globs) {
        
                List<Attribute> itemAttList = element.getAttributes(); // get item-level attributes
                List<Attribute> attList = new ArrayList<>(globs.gridAttList);
        Severity: Major
        Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 day to fix

          Method newRow has 93 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public JPanel newRow(Element element, boolean showStdName, Element modelElem) {
          
                  // create a panel to add as a new column or row
                  final JPanel c = new JPanel();
                  panelList.add(c);
          Severity: Major
          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 3 hrs to fix

            Method newGroup has 93 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected JPanel newGroup(Element element, boolean showStdName, Element modelElem) {
            
                    // create a panel to add as a new column or row
                    final JPanel c = new JPanel();
                    panelList.add(c);
            Severity: Major
            Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 3 hrs to fix

              Method newColumn has 92 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public JPanel newColumn(Element element, boolean showStdName, Element modelElem) {
              
                      // create a panel to add as a new column or row
                      final JPanel c = new JPanel();
                      panelList.add(c);
              Severity: Major
              Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 3 hrs to fix

                Method newVariable has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public void newVariable(Element var, JComponent col,
                            GridBagLayout g, GridBagConstraints cs, boolean showStdName) {
                
                        // get the name
                        String name = var.getAttribute("item").getValue();
                Severity: Major
                Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 2 hrs to fix

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

                      void setToRead(boolean justChanges, boolean startProcess) {
                          if (!container.isBusy()
                                  || // the frame has already setToRead
                                  (!startProcess)) {  // we want to setToRead false if the pane's process is being stopped
                              for (int varNum : varList) {
                  Severity: Minor
                  Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.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 setToWrite has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring.
                  Open

                      void setToWrite(boolean justChanges, boolean startProcess) {
                          log.debug("start setToWrite method with {},{}", justChanges, startProcess);
                          if (!container.isBusy()
                                  || // the frame has already setToWrite
                                  (!startProcess)) {  // we want to setToWrite false if the pane's process is being stopped
                  Severity: Minor
                  Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.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 newGroup has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring.
                  Open

                      protected JPanel newGroup(Element element, boolean showStdName, Element modelElem) {
                  
                          // create a panel to add as a new column or row
                          final JPanel c = new JPanel();
                          panelList.add(c);
                  Severity: Minor
                  Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.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 newColumn has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
                  Open

                      public JPanel newColumn(Element element, boolean showStdName, Element modelElem) {
                  
                          // create a panel to add as a new column or row
                          final JPanel c = new JPanel();
                          panelList.add(c);
                  Severity: Minor
                  Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.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 newRow has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
                  Open

                      public JPanel newRow(Element element, boolean showStdName, Element modelElem) {
                  
                          // create a panel to add as a new column or row
                          final JPanel c = new JPanel();
                          panelList.add(c);
                  Severity: Minor
                  Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.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 nextRead has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      boolean nextRead() {
                          // look for possible variables
                          if (log.isDebugEnabled()) {
                              log.debug("nextRead scans {} variables", varList.size());
                          }
                  Severity: Minor
                  Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

                    Method nextWrite has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        boolean nextWrite() {
                            log.debug("start nextWrite");
                            // look for possible variables
                            while ((varList.size() > 0) && (varListIndex < varList.size())) {
                                int varNum = varList.get(varListIndex);
                    Severity: Minor
                    Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

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

                          public JPanel newGrid(Element element, boolean showStdName, Element modelElem) {
                      
                              // create a panel to add as a new grid
                              final JPanel c = new JPanel();
                              panelList.add(c);
                      Severity: Minor
                      Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

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

                            public void dispose() {
                                log.debug("dispose");
                        
                                // remove components
                                removeAll();
                        Severity: Minor
                        Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

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

                              void setToWrite(boolean justChanges, boolean startProcess) {
                                  log.debug("start setToWrite method with {},{}", justChanges, startProcess);
                                  if (!container.isBusy()
                                          || // the frame has already setToWrite
                                          (!startProcess)) {  // we want to setToWrite false if the pane's process is being stopped
                          Severity: Minor
                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

                            Method propertyChange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                @Override
                                public void propertyChange(java.beans.PropertyChangeEvent e) {
                                    // check for the right event & condition
                                    if (_programmingVar == null && _programmingCV == null ) {
                                        log.warn("unexpected propertChange: {}", e);
                            Severity: Minor
                            Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

                              Method newGridGroup has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected void newGridGroup(Element element, final JPanel c, GridBagLayout g, GridGlobals globs, boolean showStdName, Element modelElem) {
                              
                                      // handle include/exclude
                                      if (!PaneProgFrame.isIncludedFE(element, modelElem, rosterEntry, "", "")) {
                                          return;
                              Severity: Minor
                              Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

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

                                    void setToRead(boolean justChanges, boolean startProcess) {
                                        if (!container.isBusy()
                                                || // the frame has already setToRead
                                                (!startProcess)) {  // we want to setToRead false if the pane's process is being stopped
                                            for (int varNum : varList) {
                                Severity: Minor
                                Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

                                  Method addDccAddressPanel has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private JPanel addDccAddressPanel(Element e) {
                                          JPanel l = new DccAddressPanel(_varModel);
                                          panelList.add(l);
                                          // make sure this will get read/written, even if real vars not on pane
                                          int iVar;
                                  Severity: Minor
                                  Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

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

                                        boolean nextConfirm() {
                                            // look for possible CVs
                                            while (cvListIterator != null && cvListIterator.hasNext()) {
                                                int cvNum = cvListIterator.next();
                                                CvValue cv = _cvModel.getCvByRow(cvNum);
                                    Severity: Minor
                                    Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

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

                                          void makeCvTable(GridBagConstraints cs, GridBagLayout g, JPanel c) {
                                              log.debug("starting to build CvTable pane");
                                      
                                              TableRowSorter<TableModel> sorter = new TableRowSorter<>(_cvModel);
                                      
                                      
                                      Severity: Minor
                                      Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 1 hr to fix

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

                                            protected void newGridGroup(Element element, final JPanel c, GridBagLayout g, GridGlobals globs, boolean showStdName, Element modelElem) {
                                        Severity: Minor
                                        Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 35 mins to fix

                                          Method propertyChange has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
                                          Open

                                              @Override
                                              public void propertyChange(java.beans.PropertyChangeEvent e) {
                                                  // check for the right event & condition
                                                  if (_programmingVar == null && _programmingCV == null ) {
                                                      log.warn("unexpected propertChange: {}", e);
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java - About 35 mins to fix

                                          Cognitive Complexity

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

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

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

                                          Further reading

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

                                                  for (Element value : elemList) {
                                          
                                                      // update the grid position
                                                      cs.gridy = 0;
                                                      cs.gridx++;
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1895..1974

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

                                          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 (Element value : elemList) {
                                          
                                                      // update the grid position
                                                      cs.gridy = 0;
                                                      cs.gridx++;
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1568..1647

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      if (name.equals("display")) { // its a variable
                                                          // load the variable
                                                          newVariable(e, c, g, cs, showStdName);
                                                      } else if (name.equals("separator")) { // its a separator
                                                          JSeparator j = new JSeparator(SwingConstants.HORIZONTAL);
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1454..1522

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      if (name.equals("display")) { // it's a variable
                                                          // load the variable
                                                          newVariable(value, c, g, cs, showStdName);
                                                      } else if (name.equals("separator")) { // its a separator
                                                          JSeparator j = new JSeparator(SwingConstants.HORIZONTAL);
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1268..1336

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

                                          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

                                                          while ((valueLeftIndex < value.length()) || (nameLeftIndex < name.length())) {
                                                              // name split code
                                                              if (name.substring(nameLeftIndex).length() > col1Width) {
                                                                  for (int j = 0; j < col1Width; j++) {
                                                                      String delimiter = name.substring(nameLeftIndex + col1Width - j - 1, nameLeftIndex + col1Width - j);
                                          java/src/jmri/jmrit/roster/FunctionLabelPane.java on lines 398..442

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  while (cvListIterator != null && cvListIterator.hasNext()) {
                                                      int cvNum = cvListIterator.next();
                                                      CvValue cv = _cvModel.getCvByRow(cvNum);
                                                      if (log.isDebugEnabled()) {
                                                          log.debug("nextWrite cv index {} state {}", cvNum, cv.getState());
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 833..857
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 880..903

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 152.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  while (cvListIterator != null && cvListIterator.hasNext()) {
                                                      int cvNum = cvListIterator.next();
                                                      CvValue cv = _cvModel.getCvByRow(cvNum);
                                                      if (log.isDebugEnabled()) {
                                                          log.debug("nextRead cv index {} state {}", cvNum, cv.getState());
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 880..903
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 990..1013

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 152.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  while (cvListIterator != null && cvListIterator.hasNext()) {
                                                      int cvNum = cvListIterator.next();
                                                      CvValue cv = _cvModel.getCvByRow(cvNum);
                                                      if (log.isDebugEnabled()) {
                                                          log.debug("nextConfirm cv index {} state {}", cvNum, cv.getState());
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 833..857
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 990..1013

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 152.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  readChangesButton.addItemListener(l1 = (ItemEvent e) -> {
                                                      if (e.getStateChange() == ItemEvent.SELECTED) {
                                                          readChangesButton.setText(SymbolicProgBundle.getMessage("ButtonStopReadChangesSheet"));
                                                          if (!container.isBusy()) {
                                                              prepReadPane(true);
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 677..693
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 695..711
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 342..358
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 361..377
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 380..396
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 403..419
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 420..436

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

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

                                                  readAllButton.addItemListener(l2 = (ItemEvent e) -> {
                                                      if (e.getStateChange() == ItemEvent.SELECTED) {
                                                          readAllButton.setText(SymbolicProgBundle.getMessage("ButtonStopReadSheet"));
                                                          if (!container.isBusy()) {
                                                              prepReadPane(false);
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 677..693
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 695..711
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 325..341
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 361..377
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 380..396
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 403..419
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 420..436

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

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

                                                  confirmAllButton.addItemListener(l6 = (ItemEvent e) -> {
                                                      if (e.getStateChange() == ItemEvent.SELECTED) {
                                                          confirmAllButton.setText(SymbolicProgBundle.getMessage("ButtonStopConfirmSheet"));
                                                          if (!container.isBusy()) {
                                                              prepConfirmPane(false);
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 677..693
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 695..711
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 325..341
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 342..358
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 361..377
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 380..396
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 403..419

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

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

                                                  writeChangesButton.addItemListener(l3 = (ItemEvent e) -> {
                                                      if (e.getStateChange() == ItemEvent.SELECTED) {
                                                          writeChangesButton.setText(SymbolicProgBundle.getMessage("ButtonStopWriteChangesSheet"));
                                                          if (!container.isBusy()) {
                                                              prepWritePane(true);
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 677..693
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 695..711
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 325..341
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 342..358
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 380..396
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 403..419
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 420..436

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

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

                                                  writeAllButton.addItemListener(l4 = (ItemEvent e) -> {
                                                      if (e.getStateChange() == ItemEvent.SELECTED) {
                                                          writeAllButton.setText(SymbolicProgBundle.getMessage("ButtonStopWriteSheet"));
                                                          if (!container.isBusy()) {
                                                              prepWritePane(false);
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 677..693
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 695..711
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 325..341
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 342..358
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 361..377
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 403..419
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 420..436

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

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

                                                  confirmChangesButton.addItemListener(l5 = (ItemEvent e) -> {
                                                      if (e.getStateChange() == ItemEvent.SELECTED) {
                                                          confirmChangesButton.setText(SymbolicProgBundle.getMessage("ButtonStopConfirmChangesSheet"));
                                                          if (!container.isBusy()) {
                                                              prepConfirmPane(true);
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 677..693
                                          java/src/apps/gui3/dp3/PaneProgDp3Action.java on lines 695..711
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 325..341
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 342..358
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 361..377
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 380..396
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 420..436

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

                                          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 enableConfirmButtons() {
                                                  confirmChangesButton.setToolTipText(SymbolicProgBundle.getMessage("TipConfirmChangesSheet"));
                                                  confirmAllButton.setToolTipText(SymbolicProgBundle.getMessage("TipConfirmAllSheet"));
                                                  if (_cvModel.getProgrammer() != null
                                                          && !_cvModel.getProgrammer().getCanRead()) {
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 471..486

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 107.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              void enableReadButtons() {
                                                  readChangesButton.setToolTipText(SymbolicProgBundle.getMessage("TipReadChangesSheet"));
                                                  readAllButton.setToolTipText(SymbolicProgBundle.getMessage("TipReadAllSheet"));
                                                  if (_cvModel.getProgrammer() != null
                                                          && !_cvModel.getProgrammer().getCanRead()) {
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 493..508

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 107.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      case "above":
                                                          // label aligned like others
                                                          cs.anchor = GridBagConstraints.WEST;
                                                          cs.ipadx = spaceWidth;
                                                          g.setConstraints(l, cs);
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2229..2239

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

                                          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 "right":
                                                          cs.anchor = GridBagConstraints.EAST;
                                                          g.setConstraints(rep, cs);
                                                          col.add(rep);
                                                          cs.gridx++;
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2252..2264

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

                                          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 "below":
                                                          // variable in center of upper line
                                                          cs.anchor = GridBagConstraints.CENTER;
                                                          g.setConstraints(rep, cs);
                                                          col.add(rep);
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2241..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 94.

                                          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 "left":
                                                          cs.anchor = GridBagConstraints.EAST;
                                                          cs.ipadx = spaceWidth;
                                                          g.setConstraints(l, cs);
                                                          col.add(l);
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2265..2277

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

                                          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 executeRead(VariableValue var) {
                                                  setBusy(true);
                                                  // var.setToRead(false);  // variables set this themselves
                                                  if (_programmingVar != null) {
                                                      log.error("listener already set at read start");
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 778..794

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 72.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              void executeWrite(VariableValue var) {
                                                  setBusy(true);
                                                  // var.setToWrite(false);   // variables reset themselves when done
                                                  if (_programmingVar != null) {
                                                      log.error("listener already set at write start");
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 760..776

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 72.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      for (int cvNum : cvList) {
                                                          CvValue cv = _cvModel.getCvByRow(cvNum);
                                                          if (justChanges) {
                                                              if (VariableValue.considerChanged(cv)) {
                                                                  cv.setToWrite(startProcess);
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 55 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 699..710

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 66.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      for (int cvNum : cvList) {
                                                          CvValue cv = _cvModel.getCvByRow(cvNum);
                                                          if (justChanges) {
                                                              if (VariableValue.considerChanged(cv)) {
                                                                  cv.setToRead(startProcess);
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 55 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 744..755

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 66.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      for (int varNum : varList) {
                                                          VariableValue var = _varModel.getVariable(varNum);
                                                          if (justChanges) {
                                                              if (var.isChanged()) {
                                                                  var.setToRead(startProcess);
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 55 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 727..738

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 64.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      for (int varNum : varList) {
                                                          VariableValue var = _varModel.getVariable(varNum);
                                                          if (justChanges) {
                                                              if (var.isChanged()) {
                                                                  var.setToWrite(startProcess);
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 55 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 683..694

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 64.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                                  if (PrintCvAction.cvSortOrderVal(cvStrings[i + 1].substring(0, 15).trim()) < PrintCvAction.cvSortOrderVal(cvStrings[i].substring(0, 15).trim())) {
                                                                      temp = cvStrings[i + 1];
                                                                      cvStrings[i + 1] = cvStrings[i];
                                                                      cvStrings[i] = temp;
                                                                      swap = true;
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 50 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/PrintCvAction.java on lines 165..170

                                          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

                                                      } else if (name.equals("group")) {
                                                          // nested "group" elements ...
                                                          newGridGroup(e, c, g, globs, showStdName, modelElem);
                                                      } else if (!name.equals("qualifier")) { // its a mistake
                                                          log.error("No code to handle element of type {} in newColumn", e.getName());
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 40 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1707..1712

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 50.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                      } else if (name.equals("group")) {
                                                          // nested "group" elements ...
                                                          newGridGroup(value, c, g, globs, showStdName, modelElem);
                                                      } else if (!name.equals("qualifier")) { // its a mistake
                                                          log.error("No code to handle element of type {} in newGrid", value.getName());
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 40 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1409..1414

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 50.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  QualifierAdder qa = new QualifierAdder() {
                                                      @Override
                                                      protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                          return new JComponentQualifier(c, var, Integer.parseInt(value), relation);
                                                      }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1344..1354
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1395..1405
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1530..1540
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1654..1664
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1721..1731
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2027..2037
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2065..2075

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

                                                  QualifierAdder qa = new QualifierAdder() {
                                                      @Override
                                                      protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                          return new JComponentQualifier(c, var, Integer.parseInt(value), relation);
                                                      }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1344..1354
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1395..1405
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1654..1664
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1721..1731
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1986..1996
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2027..2037
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2065..2075

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

                                                  QualifierAdder qa = new QualifierAdder() {
                                                      @Override
                                                      protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                          return new JComponentQualifier(c, var, Integer.parseInt(value), relation);
                                                      }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1395..1405
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1530..1540
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1654..1664
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1721..1731
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1986..1996
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2027..2037
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2065..2075

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

                                                  QualifierAdder qa = new QualifierAdder() {
                                                      @Override
                                                      protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                          return new JComponentQualifier(c, var, Integer.parseInt(value), relation);
                                                      }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1344..1354
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1395..1405
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1530..1540
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1721..1731
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1986..1996
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2027..2037
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2065..2075

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

                                                  QualifierAdder qa = new QualifierAdder() {
                                                      @Override
                                                      protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                          return new JComponentQualifier(l, var, Integer.parseInt(value), relation);
                                                      }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1344..1354
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1395..1405
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1530..1540
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1654..1664
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1721..1731
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1986..1996
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2027..2037

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

                                                  QualifierAdder qa = new QualifierAdder() {
                                                      @Override
                                                      protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                          return new JComponentQualifier(c, var, Integer.parseInt(value), relation);
                                                      }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1344..1354
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1395..1405
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1530..1540
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1654..1664
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1986..1996
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2027..2037
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2065..2075

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

                                                  QualifierAdder qa = new QualifierAdder() {
                                                      @Override
                                                      protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                          return new JComponentQualifier(l, var, Integer.parseInt(value), relation);
                                                      }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1344..1354
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1395..1405
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1530..1540
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1654..1664
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1721..1731
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1986..1996
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2065..2075

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

                                                              QualifierAdder qa = new QualifierAdder() {
                                                                  @Override
                                                                  protected Qualifier createQualifier(VariableValue var, String relation, String value) {
                                                                      return new JComponentQualifier(l, var, Integer.parseInt(value), relation);
                                                                  }
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 8 other locations - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/VariableTableModel.java on lines 397..407
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1344..1354
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1530..1540
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1654..1664
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1721..1731
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1986..1996
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2027..2037
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2065..2075

                                          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

                                                  if ((attr = var.getAttribute("layout")) != null && attr.getValue() != null) {
                                                      layout = attr.getValue();
                                                  }
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2298..2300

                                          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

                                                  if ((attr = var.getAttribute("format")) != null && attr.getValue() != null) {
                                                      format = attr.getValue();
                                                  }
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2202..2204

                                          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

                                                      if (attribName.equals("gridy")) {
                                                          Attribute a = new Attribute(LAST_GRIDY, attribRawValue);
                                                          attList.set(attList.size() - 1, a);
                                          //                        log.info("Moved & Updated Attribute list:"+attList);
                                                          continue; //. don't process now
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1777..1782

                                          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

                                                  if (_cvModel.getProgrammer() != null
                                                          && !_cvModel.getProgrammer().getCanWrite()) {
                                                      start = StringUtil.concatTextHtmlAware(start, SymbolicProgBundle.getMessage("TipHardwareCannotWrite"));
                                                  }
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2341..2344

                                          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

                                                      if (attribName.equals("gridx")) {
                                                          Attribute a = new Attribute(LAST_GRIDX, attribRawValue);
                                                          attList.set(attList.size() - 2, a);
                                          //                        log.info("Moved & Updated Attribute list:"+attList);
                                                          continue; //. don't process now
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 1783..1788

                                          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

                                                  if (_cvModel.getProgrammer() != null
                                                          && !_cvModel.getProgrammer().getCanRead()) {
                                                      start = StringUtil.concatTextHtmlAware(start, SymbolicProgBundle.getMessage("TipHardwareCannotRead"));
                                                  }
                                          Severity: Minor
                                          Found in java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java and 1 other location - About 30 mins to fix
                                          java/src/jmri/jmrit/symbolicprog/tabbedframe/PaneProgPane.java on lines 2345..2348

                                          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