java/src/jmri/jmrit/beantable/Maintenance.java

Summary

Maintainability
F
3 wks
Test Coverage
F
11%

Method search has a Cognitive Complexity of 400 (exceeds 20 allowed). Consider refactoring.
Open

    static boolean search(String name, JTextArea text) {
        String[] names = getTypeAndNames(name);
        if (log.isDebugEnabled()) {
            log.debug("search for {} as {} \"{}\" ({})", name, names[0], names[1], names[2]);
        }
Severity: Minor
Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 1 wk to fix

Cognitive Complexity

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

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

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

Further reading

Method search has 779 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static boolean search(String name, JTextArea text) {
        String[] names = getTypeAndNames(name);
        if (log.isDebugEnabled()) {
            log.debug("search for {} as {} \"{}\" ({})", name, names[0], names[1], names[2]);
        }
Severity: Major
Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 3 days to fix

    File Maintenance.java has 1140 lines of code (exceeds 300 allowed). Consider refactoring.
    Open

    package jmri.jmrit.beantable;
    
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Frame;
    Severity: Major
    Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 2 days to fix

      Method findOrphansPressed has a Cognitive Complexity of 96 (exceeds 20 allowed). Consider refactoring.
      Open

          public static void findOrphansPressed(Frame parent) {
              List<String> display = new ArrayList<>();
              List<String> names = new ArrayList<>();
      
              for (String name : getSystemNameList(InstanceManager.sensorManagerInstance())) {
      Severity: Minor
      Found in java/src/jmri/jmrit/beantable/Maintenance.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 findOrphansPressed has 154 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static void findOrphansPressed(Frame parent) {
              List<String> display = new ArrayList<>();
              List<String> names = new ArrayList<>();
      
              for (String name : getSystemNameList(InstanceManager.sensorManagerInstance())) {
      Severity: Major
      Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 6 hrs to fix

        Method actionPerformed has a Cognitive Complexity of 48 (exceeds 20 allowed). Consider refactoring.
        Open

                    @Override
                    public void actionPerformed(ActionEvent e) {
                        int index = list.getMaxSelectionIndex();
                        if (index < 0) {
                            JmriJOptionPane.showMessageDialog(null,
        Severity: Minor
        Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 4 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Method findEmptyPressed has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static void findEmptyPressed(Frame parent) {
                List<String> display = new ArrayList<>();
                List<String> names = new ArrayList<>();
        
                log.debug("findEmptyPressed");
        Severity: Major
        Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 2 hrs to fix

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

              static void makeDialog(Component component, Component button, Frame parent, String title) {
                  JDialog dialog = new JDialog(parent, title, true);
                  JButton ok = new JButton(Bundle.getMessage("ButtonOK"));
                  class myListener implements ActionListener {
          
          
          Severity: Minor
          Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 1 hr to fix

            Method testName has 7 arguments (exceeds 5 allowed). Consider refactoring.
            Open

                static boolean testName(String name, boolean found, String[] names, String line1, String line2,
                        String line, StringBuilder tempText) {
            Severity: Major
            Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 45 mins to fix

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

                  public static void findEmptyPressed(Frame parent) {
                      List<String> display = new ArrayList<>();
                      List<String> names = new ArrayList<>();
              
                      log.debug("findEmptyPressed");
              Severity: Minor
              Found in java/src/jmri/jmrit/beantable/Maintenance.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

              Avoid too many return statements within this method.
              Open

                      if (result != null) return result;
              Severity: Major
              Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        if (result != null) return result;
                Severity: Major
                Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          return new String[]{"", name, name, "0"};
                  Severity: Major
                  Found in java/src/jmri/jmrit/beantable/Maintenance.java - About 30 mins to fix

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

                                for (int i = 0; i < r.getNumOutputSensors(); i++) {
                                    line = "\t" +  MessageFormat.format(rbm.getString("OutputReference"), Bundle.getMessage("BeanNameSensor"));
                                    if (testName(r.getOutputSensorByIndex(i), found, names, line1, null, line, tempText)) {
                                        found = true;
                                        referenceCount++;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 602..608

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 86.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                for (int i = 0; i < r.getNumOutputTurnouts(); i++) {
                                    line = "\t" + MessageFormat.format(rbm.getString("OutputReference"), Bundle.getMessage("BeanNameTurnout"));
                                    if (testName(r.getOutputTurnoutByIndex(i), found, names, line1, null, line, tempText)) {
                                        found = true;
                                        referenceCount++;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 609..615

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 86.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                            if (sensor != null) {
                                                name = sensor.getSystemName();
                                                line = MessageFormat.format(rbm.getString("PanelReference"),
                                                        new Object[]{"\t", Bundle.getMessage("IndicatorTO")});
                                                if (testName(name, found, names, line1, null, line, tempText)) {
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1152..1160

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

                    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 (sensor != null) {
                                                name = sensor.getSystemName();
                                                String line = MessageFormat.format(rbm.getString("PanelReference"),
                                                        new Object[]{"\t", Bundle.getMessage("IndicatorTrack")});
                                                if (testName(name, found, names, line1, null, line, tempText)) {
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1177..1185

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

                    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 (sensor != null) {
                                            name = sensor.getSystemName();
                                            line = MessageFormat.format(rbm.getString("PanelReference"),
                                                    new Object[]{"\t", Bundle.getMessage("IndicatorTO")});
                                            if (testName(name, found, names, line1, null, line, tempText)) {
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1164..1172

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

                    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 (sensor != null) {
                                            name = sensor.getSystemName();
                                            String line = MessageFormat.format(rbm.getString("PanelReference"),
                                                    new Object[]{"\t", Bundle.getMessage("IndicatorTrack")});
                                            if (testName(name, found, names, line1, null, line, tempText)) {
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1189..1197

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

                    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

                                    } else if (o.getClass().getName().equals("jmri.jmrit.display.TurnoutIcon")) {
                                        name = ((TurnoutIcon) o).getTurnout().getSystemName();
                                        String line = MessageFormat.format(rbm.getString("PanelReference"),
                                                new Object[]{"\t", Bundle.getMessage("BeanNameTurnout")});
                                        if (testName(name, found, names, line1, null, line, tempText)) {
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 2 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1123..1131
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1107..1115

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 82.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    if (o.getClass().getName().equals("jmri.jmrit.display.SensorIcon")) {
                                        name = ((SensorIcon) o).getSensor().getSystemName();
                                        String line = MessageFormat.format(rbm.getString("PanelReference"),
                                                new Object[]{"\t", Bundle.getMessage("BeanNameSensor")});
                                        if (testName(name, found, names, line1, null, line, tempText)) {
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 2 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1123..1131
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1115..1123

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 82.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    } else if (o.getClass().getName().equals("jmri.jmrit.display.SignalHeadIcon")) {
                                        name = ((SignalHeadIcon) o).getSignalHead().getSystemName();
                                        String line = MessageFormat.format(rbm.getString("PanelReference"),
                                                new Object[]{"\t", Bundle.getMessage("BeanNameSignalHead")});
                                        if (testName(name, found, names, line1, null, line, tempText)) {
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 2 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1115..1123
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1107..1115

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 82.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                        } else if (names[0].equals("Block")) { // NOI18N
                                            Block b = InstanceManager.getDefault(BlockManager.class).getBySystemName(names[2]);
                                            if (b == null) {
                                                b = InstanceManager.getDefault(BlockManager.class).getBySystemName(names[1]);
                                            }
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 205..213
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 197..205
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 189..197
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 181..189
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 173..181
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 165..173

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 74.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                        } else if (names[0].equals("Light")) { // NOI18N
                                            Light l = InstanceManager.getDefault(LightManager.class).getBySystemName(names[2]);
                                            if (l == null) {
                                                l = InstanceManager.getDefault(LightManager.class).getBySystemName(names[1]);
                                            }
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 213..221
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 205..213
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 197..205
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 181..189
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 173..181
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 165..173

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 74.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                        } else if (names[0].equals("Turnout")) { // NOI18N
                                            Turnout t = InstanceManager.getDefault(TurnoutManager.class).getBySystemName(names[2]);
                                            if (t == null) {
                                                t = InstanceManager.getDefault(TurnoutManager.class).getBySystemName(names[1]);
                                            }
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 213..221
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 205..213
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 197..205
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 189..197
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 181..189
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 165..173

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 74.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                        if (names[0].equals("Sensor")) { // NOI18N
                                            Sensor s = InstanceManager.getDefault(SensorManager.class).getBySystemName(names[2]);
                                            if (s == null) {
                                                s = InstanceManager.getDefault(SensorManager.class).getBySystemName(names[1]);
                                            }
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 213..221
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 205..213
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 197..205
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 189..197
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 181..189
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 173..181

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 74.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                        } else if (names[0].equals("SignalHead")) { // NOI18N
                                            SignalHead sh = InstanceManager.getDefault(SignalHeadManager.class).getBySystemName(names[2]);
                                            if (sh == null) {
                                                sh = InstanceManager.getDefault(SignalHeadManager.class).getBySystemName(names[1]);
                                            }
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 213..221
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 205..213
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 197..205
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 189..197
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 173..181
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 165..173

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 74.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                        } else if (names[0].equals("Section")) { // NOI18N
                                            Section sec = InstanceManager.getDefault(SectionManager.class).getBySystemName(names[2]);
                                            if (sec == null) {
                                                sec = InstanceManager.getDefault(SectionManager.class).getBySystemName(names[1]);
                                            }
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 213..221
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 197..205
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 189..197
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 181..189
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 173..181
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 165..173

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 74.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                        } else if (names[0].equals("Conditional")) { // NOI18N
                                            Conditional c = InstanceManager.getDefault(ConditionalManager.class).getBySystemName(names[2]);
                                            if (c == null) {
                                                c = InstanceManager.getDefault(ConditionalManager.class).getBySystemName(names[1]);
                                            }
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 213..221
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 205..213
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 189..197
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 181..189
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 173..181
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 165..173

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 74.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    if (sName.equals(sysName) || (uName != null && uName.equals(userName))) {
                                        tempText.append(line2);
                                        tempText.append(MessageFormat.format(rbm.getString("BlockReference"), "\t"));
                                        found = true;
                                        referenceCount++;
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 855..860

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

                    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 (sName.equals(sysName) || (uName != null && uName.equals(userName))) {
                                    tempText.append(line1);
                                    tempText.append(MessageFormat.format(rbm.getString("BlockReference"), "\t"));
                                    found = true;
                                    referenceCount++;
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 1 hr to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 797..802

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

                    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 (sensor != null) {
                                            line = MessageFormat.format(rbm.getString("BlockSensor"), "\t\t");
                                            if (testName(sensor.getSystemName(), found, names, line1, line2, line, tempText)) {
                                                found = true;
                                                referenceCount++;
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 55 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 804..810

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 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 (sensor != null) {
                                        line = MessageFormat.format(rbm.getString("BlockSensor"), "\t\t");
                                        if (testName(sensor.getSystemName(), found, names, line1, line2, line, tempText)) {
                                            found = true;
                                            referenceCount++;
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 55 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 696..702

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 64.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                if (s != null) {
                                    String line = MessageFormat.format(rbm.getString("OccupancySensor"), "\t\t");
                                    if (testName(s.getSystemName(), found, names, line1, null, line, tempText)) {
                                        found = true;
                                        referenceCount++;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 2 other locations - About 55 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 542..548
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 862..868

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 64.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                if (sensor != null) {
                                    String line = MessageFormat.format(rbm.getString("OBlockSensor"), "\t");
                                    if (testName(sensor.getSystemName(), found, names, line1, null, line, tempText)) {
                                        found = true;
                                        referenceCount++;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 2 other locations - About 55 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 862..868
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 901..907

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 64.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                if (s != null) {
                                    String line = MessageFormat.format(rbm.getString("BlockSensor"), "\t\t");
                                    if (testName(s.getSystemName(), found, names, line1, null, line, tempText)) {
                                        found = true;
                                        referenceCount++;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 2 other locations - About 55 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 542..548
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 901..907

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

                            for (String name : getSystemNameList(InstanceManager.getDefault(ConditionalManager.class))) {
                                if (!search(name, null)) {
                                    display.add(MessageFormat.format(rbm.getString("OrphanName"),
                                            (Object[]) getTypeAndNames(name)));
                                    names.add(name);
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 50 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 96..102
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 117..123
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 124..130

                    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

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

                            for (String name : getSystemNameList(InstanceManager.getDefault(BlockManager.class))) {
                                if (!search(name, null)) {
                                    display.add(MessageFormat.format(rbm.getString("OrphanName"),
                                            (Object[]) getTypeAndNames(name)));
                                    names.add(name);
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 50 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 96..102
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 110..116
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 117..123

                    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

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

                            for (String name : getSystemNameList(InstanceManager.getDefault(SectionManager.class))) {
                                if (!search(name, null)) {
                                    display.add(MessageFormat.format(rbm.getString("OrphanName"),
                                            (Object[]) getTypeAndNames(name)));
                                    names.add(name);
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 50 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 96..102
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 110..116
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 124..130

                    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

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

                            for (String name : getSystemNameList(InstanceManager.getDefault(SignalHeadManager.class))) {
                                if (!search(name, null)) {
                                    display.add(MessageFormat.format(rbm.getString("OrphanName"),
                                            (Object[]) getTypeAndNames(name)));
                                    names.add(name);
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 50 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 110..116
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 117..123
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 124..130

                    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

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

                                    if (text != null && found) {
                                        text.append(tempText.toString());
                                        tempText = new StringBuilder();
                                        found = false;
                                        empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 45 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 503..509
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 704..710
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1082..1088

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 56.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    if (text != null && found) {
                                        text.append(tempText.toString());
                                        tempText = new StringBuilder();
                                        found = false;
                                        empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 45 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 503..509
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1082..1088
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1200..1206

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 56.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    if (text != null && found) {
                                        text.append(tempText.toString());
                                        tempText = new StringBuilder();
                                        found = false;
                                        empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 45 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 704..710
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1082..1088
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1200..1206

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 56.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 3 other locations - About 45 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 503..509
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 704..710
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1200..1206

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 56.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            for (String name : getSystemNameList(InstanceManager.lightManagerInstance())) {
                                if (!search(name, null)) {
                                    display.add(MessageFormat.format(rbm.getString("OrphanName"),
                                            (Object[]) getTypeAndNames(name)));
                                    names.add(name);
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 45 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 89..95

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 56.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            for (String name : getSystemNameList(InstanceManager.turnoutManagerInstance())) {
                                if (!search(name, null)) {
                                    display.add(MessageFormat.format(rbm.getString("OrphanName"),
                                            (Object[]) getTypeAndNames(name)));
                                    names.add(name);
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 45 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 103..109

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 56.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                if (sName.equals(sysName) || uName.equals(userName)) {
                                    tempText.append(MessageFormat.format(rbm.getString("SectionReference"), "\t"));
                    
                                    found = true;
                                    referenceCount++;
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 690..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 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

                                        if (sName.equals(sysName) || uName.equals(userName)) {
                                            tempText.append(MessageFormat.format(rbm.getString("BlockReference"), "\t\t"));
                                            found = true;
                                            referenceCount++;
                                        }
                    Severity: Minor
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 1 other location - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 763..768

                    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

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 549..554
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 616..621
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 712..717
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 869..874
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 908..913
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1011..1016

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

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 549..554
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 616..621
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 712..717
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 812..817
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 869..874
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 908..913

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

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 616..621
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 712..717
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 812..817
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 869..874
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 908..913
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1011..1016

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

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 549..554
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 616..621
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 712..717
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 812..817
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 869..874
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1011..1016

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

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 549..554
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 712..717
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 812..817
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 869..874
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 908..913
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1011..1016

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

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 549..554
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 616..621
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 812..817
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 869..874
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 908..913
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1011..1016

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

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

                                if (text != null && found) {
                                    text.append(tempText.toString());
                                    tempText = new StringBuilder();
                                    found = false;
                                    empty = false;
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 40 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 549..554
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 616..621
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 712..717
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 812..817
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 908..913
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1011..1016

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

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

                            if (text != null) {
                                if (empty) {
                                    text.append(MessageFormat.format(rbm.getString("NoReference"), "Route"));
                                } else {
                                    text.append("\n");
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 35 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 556..562
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 719..725
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 819..825
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 876..882
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 915..921
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1018..1024

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 44.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            if (text != null) {
                                if (empty) {
                                    text.append(MessageFormat.format(rbm.getString("NoReference"), "LayoutBlock"));
                                } else {
                                    text.append("\n");
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 35 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 556..562
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 623..629
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 719..725
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 819..825
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 876..882
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1018..1024

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 44.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            if (text != null) {
                                if (empty) {
                                    text.append(MessageFormat.format(rbm.getString("NoReference"), "OBlock"));
                                } else {
                                    text.append("\n");
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 35 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 623..629
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 719..725
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 819..825
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 876..882
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 915..921
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1018..1024

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 44.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            if (text != null) {
                                if (empty) {
                                    text.append(MessageFormat.format(rbm.getString("NoReference"), "Transit"));
                                } else {
                                    text.append("\n");
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 35 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 556..562
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 623..629
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 819..825
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 876..882
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 915..921
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1018..1024

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 44.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            if (text != null) {
                                if (empty) {
                                    text.append(MessageFormat.format(rbm.getString("NoReference"), "Section"));
                                } else {
                                    text.append("\n");
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 35 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 556..562
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 623..629
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 719..725
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 876..882
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 915..921
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1018..1024

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 44.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            if (text != null) {
                                if (empty) {
                                    text.append(MessageFormat.format(rbm.getString("NoReference"), "Block"));
                                } else {
                                    text.append("\n");
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 35 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 556..562
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 623..629
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 719..725
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 819..825
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 915..921
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 1018..1024

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 44.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            if (text != null) {
                                if (empty) {
                                    text.append(MessageFormat.format(rbm.getString("NoReference"), "BlockBossLogic"));
                                } else {
                                    text.append("\n");
                    Severity: Major
                    Found in java/src/jmri/jmrit/beantable/Maintenance.java and 6 other locations - About 35 mins to fix
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 556..562
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 623..629
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 719..725
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 819..825
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 876..882
                    java/src/jmri/jmrit/beantable/Maintenance.java on lines 915..921

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 44.

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

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

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

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

                    Refactorings

                    Further Reading

                    There are no issues that match your filters.

                    Category
                    Status