java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java

Summary

Maintainability
F
2 mos
Test Coverage
F
33%

Method getFacingSignalHead has a Cognitive Complexity of 696 (exceeds 20 allowed). Consider refactoring.
Open

    @CheckReturnValue
    @CheckForNull
    public SignalHead getFacingSignalHead(
            @CheckForNull Block facingBlock,
            @CheckForNull Block protectedBlock) {
Severity: Minor
Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 2 wks to fix

Cognitive Complexity

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

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

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

Further reading

File LayoutBlockManager.java has 1962 lines of code (exceeds 300 allowed). Consider refactoring.
Open

package jmri.jmrit.display.layoutEditor;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
Severity: Major
Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 5 days to fix

    Method getFacingBean has a Cognitive Complexity of 255 (exceeds 20 allowed). Consider refactoring.
    Open

        @CheckReturnValue
        @CheckForNull
        public NamedBean getFacingBean(@CheckForNull Block facingBlock,
                @CheckForNull Block protectedBlock,
                @CheckForNull LayoutEditor panel, Class< ?> T) {
    Severity: Minor
    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 4 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    Method getFacingSignalHead has 711 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @CheckReturnValue
        @CheckForNull
        public SignalHead getFacingSignalHead(
                @CheckForNull Block facingBlock,
                @CheckForNull Block protectedBlock) {
    Severity: Major
    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 3 days to fix

      Method getFacingBean has 290 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @CheckReturnValue
          @CheckForNull
          public NamedBean getFacingBean(@CheckForNull Block facingBlock,
                  @CheckForNull Block protectedBlock,
                  @CheckForNull LayoutEditor panel, Class< ?> T) {
      Severity: Major
      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 1 day to fix

        Method getFacingBlockByBeanByPanel has a Cognitive Complexity of 69 (exceeds 20 allowed). Consider refactoring.
        Open

            @CheckReturnValue
            @CheckForNull
            private LayoutBlock getFacingBlockByBeanByPanel(
                    @Nonnull NamedBean bean,
                    @Nonnull LayoutEditor panel) {
        Severity: Minor
        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.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

        LayoutBlockManager has 56 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class LayoutBlockManager extends AbstractManager<LayoutBlock> implements jmri.InstanceManagerAutoDefault {
        
            public LayoutBlockManager() {
                super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
                InstanceManager.sensorManagerInstance().addVetoableChangeListener(this);
        Severity: Major
        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 1 day to fix

          Method getFacingBlockByBeanByPanel has 118 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @CheckReturnValue
              @CheckForNull
              private LayoutBlock getFacingBlockByBeanByPanel(
                      @Nonnull NamedBean bean,
                      @Nonnull LayoutEditor panel) {
          Severity: Major
          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 4 hrs to fix

            Method getSensorAtEndBumper has a Cognitive Complexity of 42 (exceeds 20 allowed). Consider refactoring.
            Open

                @CheckReturnValue
                @CheckForNull
                public Sensor getSensorAtEndBumper(
                        @CheckForNull Block facingBlock,
                        @CheckForNull LayoutEditor panel) {
            Severity: Minor
            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 3 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

            Method getSignalMastAtEndBumper has a Cognitive Complexity of 42 (exceeds 20 allowed). Consider refactoring.
            Open

                @CheckReturnValue
                @CheckForNull
                public SignalMast getSignalMastAtEndBumper(
                        @CheckForNull Block facingBlock,
                        @CheckForNull LayoutEditor panel) {
            Severity: Minor
            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 3 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

            Method getProtectingBlocksByBeanByPanel has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring.
            Open

                @Nonnull
                private List<LayoutBlock> getProtectingBlocksByBeanByPanel(
                        @CheckForNull NamedBean bean,
                        @CheckForNull LayoutEditor panel) {
                    List<LayoutBlock> protectingBlocks = new ArrayList<>();
            Severity: Minor
            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 2 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                @Nonnull
                private List<LayoutBlock> getProtectingBlocksByBeanByPanel(
                        @CheckForNull NamedBean bean,
                        @CheckForNull LayoutEditor panel) {
                    List<LayoutBlock> protectingBlocks = new ArrayList<>();
            Severity: Major
            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 2 hrs to fix

              Method setRoutingStabilised has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private void setRoutingStabilised() {
                      if (checking) {
                          return;
                      }
                      log.debug("routing table change has been initiated");
              Severity: Major
              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 2 hrs to fix

                Method getProtectingBlocksBySensorOld has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @Nonnull
                    public List<LayoutBlock> getProtectingBlocksBySensorOld(
                            @CheckForNull Sensor sensor, @Nonnull LayoutEditor panel) {
                        List<LayoutBlock> result = new ArrayList<>();
                        PositionablePoint pp = panel.getFinder().findPositionablePointByEastBoundBean(sensor);
                Severity: Minor
                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 2 hrs to fix

                  Method getSignalMastAtEndBumper has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @CheckReturnValue
                      @CheckForNull
                      public SignalMast getSignalMastAtEndBumper(
                              @CheckForNull Block facingBlock,
                              @CheckForNull LayoutEditor panel) {
                  Severity: Minor
                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 1 hr to fix

                    Method getSensorAtEndBumper has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        @CheckReturnValue
                        @CheckForNull
                        public Sensor getSensorAtEndBumper(
                                @CheckForNull Block facingBlock,
                                @CheckForNull LayoutEditor panel) {
                    Severity: Minor
                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 1 hr to fix

                      Method createNewLayoutBlock has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          @CheckReturnValue
                          @CheckForNull
                          public LayoutBlock createNewLayoutBlock(
                                  @CheckForNull String systemName,
                                  String userName) {
                      Severity: Minor
                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 1 hr to fix

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

                            public void initializeLayoutBlockPaths() {
                                log.debug("start initializeLayoutBlockPaths");
                        
                                // cycle through all LayoutBlocks, completing initialization of associated jmri.Blocks
                                for (LayoutBlock b : getNamedBeanSet()) {
                        Severity: Minor
                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 1 hr to fix

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

                              @Nonnull
                              public List<LayoutBlock> getProtectingBlocksBySensorOld(
                                      @CheckForNull Sensor sensor, @Nonnull LayoutEditor panel) {
                                  List<LayoutBlock> result = new ArrayList<>();
                                  PositionablePoint pp = panel.getFinder().findPositionablePointByEastBoundBean(sensor);
                          Severity: Minor
                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 45 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

                          Avoid deeply nested control flow statements.
                          Open

                                                          if (T.equals(SignalMast.class)) {
                                                              return lt.getSignalAMast();
                                                          } else if (T.equals(Sensor.class)) {
                                                              return lt.getSensorA();
                                                          }
                          Severity: Major
                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 45 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                            Severity: Major
                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                              Severity: Major
                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                return p.getWestBoundSignalHead();
                                Severity: Major
                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                  Severity: Major
                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                    Severity: Major
                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                              return null;
                                      Severity: Major
                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                        Severity: Major
                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                          Severity: Major
                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                            Severity: Major
                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                                          return tLinked.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                              Severity: Major
                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTA3);
                                                Severity: Major
                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                  Severity: Major
                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                    Severity: Major
                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                      Severity: Major
                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                                            return lt.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                        Severity: Major
                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                          Severity: Major
                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                            Severity: Major
                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                          return tLinked.getSignalHead(LayoutTurnout.Geometry.POINTA3);
                                                              Severity: Major
                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                Severity: Major
                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                  Severity: Major
                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                    Severity: Major
                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                      Severity: Major
                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                        Severity: Major
                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                          Severity: Major
                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                            Severity: Major
                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                              Severity: Major
                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                Severity: Major
                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                  Severity: Major
                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                                return null;
                                                                                    Severity: Major
                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                      Severity: Major
                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                        Severity: Major
                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                          Severity: Major
                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                            Severity: Major
                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                                      return null;
                                                                                              Severity: Major
                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                                return null;
                                                                                                Severity: Major
                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                  Severity: Major
                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                    Severity: Major
                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                      Severity: Major
                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                        Severity: Major
                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                          Severity: Major
                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                            Severity: Major
                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                                          return null;
                                                                                                              Severity: Major
                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                Severity: Major
                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                                          return null;
                                                                                                                  Severity: Major
                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this method.
                                                                                                                    Open

                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                    Severity: Major
                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this method.
                                                                                                                      Open

                                                                                                                                      return p.getEastBoundSignalHead();
                                                                                                                      Severity: Major
                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this method.
                                                                                                                        Open

                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA3);
                                                                                                                        Severity: Major
                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this method.
                                                                                                                          Open

                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                          Severity: Major
                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this method.
                                                                                                                            Open

                                                                                                                                                    return tLinked.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                            Severity: Major
                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this method.
                                                                                                                              Open

                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                                                                              Severity: Major
                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                Open

                                                                                                                                            return null;
                                                                                                                                Severity: Major
                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                  Open

                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                    Open

                                                                                                                                                                    return null;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                      Open

                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                        Open

                                                                                                                                                        return null;
                                                                                                                                        Severity: Major
                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                          Open

                                                                                                                                                              return null;
                                                                                                                                          Severity: Major
                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                            Open

                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                            Severity: Major
                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                              Open

                                                                                                                                                                                  return null;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                Open

                                                                                                                                                                                return null;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                  Open

                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                    Open

                                                                                                                                                                return null;
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                      Open

                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                        Open

                                                                                                                                                                                        return null;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                          Open

                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                            Open

                                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                              Open

                                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                Open

                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                  Open

                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                    Open

                                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                      Open

                                                                                                                                                                                              return null;
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                        Open

                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                          Open

                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                            Open

                                                                                                                                                                                            return null;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                              Open

                                                                                                                                                                                                  return null;
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                Open

                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                  Open

                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                    Open

                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                      Open

                                                                                                                                                                                                                  return null;
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                return ls.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                          Open

                                                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                            Open

                                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                              Open

                                                                                                                                                                                                                              return null;
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                Open

                                                                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                                            return lt.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                                            return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                return xing.getSignalHead(LevelXing.Geometry.POINTB);
                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                return lt.getSensorD();
                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                      return xing.getSignalHead(LevelXing.Geometry.POINTA);
                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                        return xing.getSignalHead(LevelXing.Geometry.POINTC);
                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                  return null;
                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                            return p.getEastBoundSignalMast();
                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                          return xing.getSensorD();
                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                            return null;
                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                          return null;
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                    return xing.getSignalHead(LevelXing.Geometry.POINTC);
                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                      return p.getWestBoundSignalMast();
                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                return lt.getSensorA();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                          return lt.getSensorA();
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                        return xing.getSensorB();
                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                        return tLinked.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                    return ls.getSignalAMast();
                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                  return xing.getSignalDMast();
                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                      return ls.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                        return null;
                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                              return lt.getSignalDMast();
                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                            return null;
                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                      return ls.getSignalDMast();
                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                return null;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              return null;
                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                            return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                            return p.getWestBoundSensor();
                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                            return null;
                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                              return null;
                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                return lt.getSignalDMast();
                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                  return ls.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                return ls.getSignalCMast();
                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                          return ls.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                    return xing.getSignalHead(LevelXing.Geometry.POINTA);
                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                          return null;
                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                    return lt.getSensorB();
                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                              return lt.getSensorC();
                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                        return lt.getSensorC();
                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                  return lt.getSensorD();
                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                    return null;
                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                  return ls.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                            return p.getEastBoundSensor();
                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                              return ls.getSensorC();
                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                            return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                  return null;
                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                    return null;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                        return null;
                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                                            return xing.getSignalHead(LevelXing.Geometry.POINTB);
                                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                                                      return p.getWestBoundSignalMast();
                                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                            return xing.getSensorC();
                                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                      return null;
                                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                                            return ls.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                                          return ls.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                                return null;
                                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                                                    return null;
                                                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                                                            return tLinked.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                                                              return tLinked.getSignalHead(LayoutTurnout.Geometry.POINTA3);
                                                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                                                            return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                                                                                return ls.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                                                                              return xing.getSignalHead(LevelXing.Geometry.POINTD);
                                                                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                                                    return null;
                                                                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                                                                  return p.getWestBoundSensor();
                                                                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                                                                                    return lt.getSignalAMast();
                                                                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSensorB();
                                                                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                                                                    return xing.getSignalAMast();
                                                                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                                                                                  return tLinked.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                                                                                          return null;
                                                                                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                                                                                        return xing.getSignalHead(LevelXing.Geometry.POINTD);
                                                                                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                                                                                                                return ls.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                                                                                                                  return ls.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                                                                                                    return lt.getSignalBMast();
                                                                                                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalAMast();
                                                                                                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                                                                                                        return lt.getSignalCMast();
                                                                                                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                                                                                                      return ls.getSensorB();
                                                                                                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                                                                                                        return ls.getSensorD();
                                                                                                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                      return null;
                                                                                                                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                                                                                                                        return xing.getSensorA();
                                                                                                                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                                                                                                                          return xing.getSignalCMast();
                                                                                                                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                    return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                        return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return lt.getSignalCMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                        return ls.getSensorA();
                                                                                                                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                      Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                        return xing.getSignalBMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                        Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                          Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                                return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                            Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                          return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                              Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                return lt.getSignalBMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                                Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                              return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        return ls.getSignalBMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Found in java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java - About 30 mins to fix

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //check if track segments at B or C are in facing block (block 1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (((TrackSegment) (lt.getConnectB())).getBlockName().equals(facingBlock.getUserName())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //track segment connected at B matches block 1, check C
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (!(((TrackSegment) lt.getConnectC()).getBlockName().equals(facingBlock.getDisplayName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 690..738
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 875..923
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1077..1125

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //check if track segments at D or A are in facing block (block 1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (((TrackSegment) (lt.getConnectD())).getBlockName().equals(facingBlock.getUserName())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //track segment connected at D matches block 1, check A
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (!(((TrackSegment) lt.getConnectA()).getBlockName().equals(facingBlock.getUserName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 521..570
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 690..738
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1077..1125

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      //check if track segments at C or B are in facing block (block 1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (((TrackSegment) (lt.getConnectC())).getBlockName().equals(facingBlock.getUserName())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //track segment connected at C matches block 1, check B
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (!(((TrackSegment) lt.getConnectB()).getBlockName().equals(facingBlock.getUserName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 521..570
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 690..738
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 875..923

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //check if track segments at A or D are in facing block (block 1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (((TrackSegment) (lt.getConnectA())).getBlockName().equals(facingBlock.getUserName())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //track segment connected at A matches block 1, check D
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (!(((TrackSegment) lt.getConnectD()).getBlockName().equals(facingBlock.getUserName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 521..570
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 875..923
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1077..1125

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (((TrackSegment) (lt.getConnectC())).getBlockName().equals(protectedBlock.getUserName())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //track segment connected at C matches block 2, check B
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (!(((TrackSegment) lt.getConnectB()).getBlockName().equals(protectedBlock.getUserName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //track segment connected at B is not in block2, return continuing signal head at D
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 835..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 232.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (((TrackSegment) (lt.getConnectA())).getBlockName().equals(protectedBlock.getUserName())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //track segment connected at A matches block 2, check D
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (!(((TrackSegment) lt.getConnectD()).getBlockName().equals(protectedBlock.getUserName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //track segment connected at D is not in block2, return diverging signal head at C
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1039..1061

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (l != null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Object connect = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (bean instanceof SignalMast) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (l.getSignalAMast() == bean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 2310..2341

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (ls != null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Object connect = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (bean instanceof SignalMast) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (ls.getSignalAMast() == bean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 2275..2306

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (cType == HitPointType.TURNOUT_D) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lt = (LayoutTurnout) connected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if ((T.equals(SignalMast.class) && (lt.getSignalDMast() != null))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          || (T.equals(Sensor.class) && (lt.getSensorD() != null))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1653..1679
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1681..1707

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (cType == HitPointType.TURNOUT_B) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lt = (LayoutTurnout) connected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if ((T.equals(SignalMast.class) && (lt.getSignalBMast() != null))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          || (T.equals(Sensor.class) && (lt.getSensorB() != null))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1681..1707
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1709..1735

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (cType == HitPointType.TURNOUT_C) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lt = (LayoutTurnout) connected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if ((T.equals(SignalMast.class) && (lt.getSignalCMast() != null))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          || (T.equals(Sensor.class) && (lt.getSensorC() != null))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1653..1679
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1709..1735

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (TrackSegment t : panel.getTrackSegments()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (t.getLayoutBlock() == fLayoutBlock) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      PositionablePoint p = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (t.getType1() == HitPointType.POS_POINT) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1289..1321

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (TrackSegment t : panel.getTrackSegments()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (t.getLayoutBlock() == fLayoutBlock) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      PositionablePoint p = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (t.getType1() == HitPointType.POS_POINT) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1358..1390

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (pp != null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //            LayoutEditorTools tools = panel.getLETools(); //TODO: Dead-code strip this
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (east) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (LayoutEditorTools.isAtWestEndOfAnchor(panel, pp.getConnect1(), pp)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1935..1957

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (pp != null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //   LayoutEditorTools tools = panel.getLETools(); //TODO: Dead-code strip this
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (east) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (LayoutEditorTools.isAtWestEndOfAnchor(panel, pp.getConnect1(), pp)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 2050..2072

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              while ((i < c.size()) && (lc == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  LayoutConnectivity tlc = c.get(i);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if ((tlc.getBlock1() == fLayoutBlock) && (tlc.getBlock2() == pLayoutBlock)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      lc = tlc;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1527..1537

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              while ((i < c.size()) && (lc == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  LayoutConnectivity tlc = c.get(i);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if ((tlc.getBlock1() == fLayoutBlock) && (tlc.getBlock2() == pLayoutBlock)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      lc = tlc;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 342..352

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckReturnValue
                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckForNull
                                                                                                                                                                                                                                                                                                                                                                                                                                                          public LayoutBlock getProtectedBlock(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @Nonnull String signalName, @Nonnull LayoutEditor panel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PositionablePoint pp = panel.getFinder().findPositionablePointByEastBoundSignal(signalName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 2429..2451

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckReturnValue
                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckForNull
                                                                                                                                                                                                                                                                                                                                                                                                                                                          public LayoutBlock getFacingBlock(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @Nonnull String signalName, @Nonnull LayoutEditor panel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              PositionablePoint pp = panel.getFinder().findPositionablePointByWestBoundSignal(signalName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 2382..2405

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case LayoutConnectivity.XOVER_BOUNDARY_BD: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (facingIsBlock1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (lt.getSignalHead(LayoutTurnout.Geometry.POINTB2) == null) { //there is no signal head for diverging (crossed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //over)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 387..402

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 104.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case LayoutConnectivity.XOVER_BOUNDARY_AC: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (facingIsBlock1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (lt.getSignalHead(LayoutTurnout.Geometry.POINTA2) == null) { //there is no signal head for diverging (crossed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //over)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 404..419

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 104.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if ((lt.getContinuingSense() == Turnout.CLOSED) && (lt.getSignalHead(LayoutTurnout.Geometry.POINTB2) == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //there is only one signal head here - return it
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if ((lt.getContinuingSense() == Turnout.THROWN) && (lt.getSignalHead(LayoutTurnout.Geometry.POINTC2) == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //there is only one signal head here - return it
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 953..959

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 ((lt.getContinuingSense() == Turnout.CLOSED) && (lt.getSignalHead(LayoutTurnout.Geometry.POINTC2) == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //there is only one signal head here - return it
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if ((lt.getContinuingSense() == Turnout.THROWN) && (lt.getSignalHead(LayoutTurnout.Geometry.POINTB2) == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          //there is only one signal head here - return it
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 765..771

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckReturnValue
                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckForNull
                                                                                                                                                                                                                                                                                                                                                                                                                                                          public LayoutBlock getProtectedBlock(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @Nonnull SignalHead signalHead, @CheckForNull LayoutEditor panel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              LayoutBlock result = null;  //assume failure (pessimist!)
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 2407..2420

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckReturnValue
                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CheckForNull
                                                                                                                                                                                                                                                                                                                                                                                                                                                          public LayoutBlock getFacingBlock(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @Nonnull SignalHead signalHead, @CheckForNull LayoutEditor panel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              LayoutBlock result = null;  //assume failure (pessimist!)
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 2359..2373

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 (bean instanceof SignalMast) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (l.getSignalAMast() == bean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          protectingBlocks.add(l.getLayoutBlockAC());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (l.getSignalBMast() == bean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          protectingBlocks.add(l.getLayoutBlockBD());
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1972..1982

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (bean instanceof Sensor) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (l.getSensorA() == bean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          protectingBlocks.add(l.getLayoutBlockAC());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (l.getSensorB() == bean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          protectingBlocks.add(l.getLayoutBlockBD());
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1962..1972

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case SLIP_B: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (ls.getTurnoutType() == LayoutSlip.TurnoutType.DOUBLE_SLIP) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (ls.getSlipState() == LayoutSlip.STATE_BC) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return ls.getSignalHead(LayoutTurnout.Geometry.POINTB2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1156..1166

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case SLIP_C: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (ls.getTurnoutType() == LayoutSlip.TurnoutType.DOUBLE_SLIP) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (ls.getSlipState() == LayoutSlip.STATE_BC) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return ls.getSignalHead(LayoutTurnout.Geometry.POINTC2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1144..1154

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              } else if (state == Turnout.THROWN) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (tLinked.getContinuingSense() == Turnout.THROWN) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (lt.getSignalHead(LayoutTurnout.Geometry.POINTA3) == null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 595..603

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (state == Turnout.CLOSED) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (tLinked.getContinuingSense() == Turnout.CLOSED) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (lt.getSignalHead(LayoutTurnout.Geometry.POINTA3) == null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 603..611

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 72.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              if ((fLayoutBlock == null) || (pLayoutBlock == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (fLayoutBlock == null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      log.error("Block {} is not on a Layout Editor panel.", facingBlock.getDisplayName());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1507..1516

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 ((fLayoutBlock == null) || (pLayoutBlock == null)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (fLayoutBlock == null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      log.error("Block {} is not on a Layout Editor panel.", facingBlock.getDisplayName());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 324..333

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 ((((TrackSegment) lt.getConnectD()).getBlockName().equals(protectedBlock.getUserName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //track segment connected at D is in block 2, return continuing signal head
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //neither track segment is in block 2 - should never get here unless layout turnout is
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 673..689
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1064..1075

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 ((((TrackSegment) lt.getConnectB()).getBlockName().equals(protectedBlock.getUserName()))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //track segment connected at B is in block 2, return diverging signal head
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //neither track segment is in block 2 - should never get here unless layout turnout is
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 673..689
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 863..874

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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 ((((TrackSegment) lt.getConnectD()).getBlockName().equals(protectedBlock.getUserName()))) { //track segment
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //connected at D
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //is in block 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              //diverging
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 863..874
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1064..1075

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (lt.getLinkType() == LayoutTurnout.LinkType.NO_LINK) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (facingIsBlock1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (lt.getSignalHead(LayoutTurnout.Geometry.POINTA2) == null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 983..993

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (lt.getLinkType() == LayoutTurnout.LinkType.FIRST_3_WAY) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (facingIsBlock1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (lt.getSignalHead(LayoutTurnout.Geometry.POINTA2) == null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 748..758

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (lc.getXoverBoundaryType() == LayoutConnectivity.XOVER_BOUNDARY_AC) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (fLayoutBlock == lc.getXover().getLayoutBlock()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_A;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_C;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1583..1590
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1569..1576
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1562..1569

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (lc.getXoverBoundaryType() == LayoutConnectivity.XOVER_BOUNDARY_AB) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (fLayoutBlock == lc.getXover().getLayoutBlock()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_A;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_B;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1583..1590
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1576..1583
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1569..1576

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (lc.getXoverBoundaryType() == LayoutConnectivity.XOVER_BOUNDARY_BD) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (fLayoutBlock == lc.getXover().getLayoutBlockB()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_B;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_D;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1576..1583
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1569..1576
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1562..1569

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (lc.getXoverBoundaryType() == LayoutConnectivity.XOVER_BOUNDARY_CD) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (fLayoutBlock == lc.getXover().getLayoutBlockC()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_C;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              cType = HitPointType.TURNOUT_D;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1583..1590
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1576..1583
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1562..1569

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case SLIP_D: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (ls.getSlipState() == LayoutSlip.STATE_AD) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return ls.getSignalHead(LayoutTurnout.Geometry.POINTD2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return ls.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1136..1142

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case SLIP_A: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (ls.getSlipState() == LayoutSlip.STATE_AD) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return ls.getSignalHead(LayoutTurnout.Geometry.POINTA2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return ls.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1168..1174

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (cType == HitPointType.LEVEL_XING_A) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //block boundary is at the A connection of a level crossing
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return xing.getSignalAMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1744..1750
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1752..1758
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1760..1766
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1768..1774
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1797..1804
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1806..1813
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1815..1821

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (cType == HitPointType.LEVEL_XING_D) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return xing.getSignalDMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return xing.getSensorD();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1744..1750
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1752..1758
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1760..1766
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1768..1774
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1788..1795
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1797..1804
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1806..1813

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (cType == HitPointType.SLIP_D) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSignalDMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSensorD();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1744..1750
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1752..1758
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1760..1766
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1788..1795
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1797..1804
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1806..1813
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1815..1821

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (cType == HitPointType.LEVEL_XING_C) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //block boundary is at the C connection of a level crossing
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return xing.getSignalCMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1744..1750
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1752..1758
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1760..1766
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1768..1774
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1788..1795
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1797..1804
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1815..1821

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (cType == HitPointType.SLIP_C) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSignalCMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSensorC();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1744..1750
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1752..1758
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1768..1774
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1788..1795
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1797..1804
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1806..1813
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1815..1821

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              if (cType == HitPointType.LEVEL_XING_B) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //block boundary is at the B connection of a level crossing
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return xing.getSignalBMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1744..1750
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1752..1758
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1760..1766
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1768..1774
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1788..1795
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1806..1813
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1815..1821

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (cType == HitPointType.SLIP_B) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSignalBMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSensorB();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1744..1750
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1760..1766
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1768..1774
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1788..1795
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1797..1804
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1806..1813
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1815..1821

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if (cType == HitPointType.SLIP_A) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if (T.equals(SignalMast.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSignalAMast();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      } else if (T.equals(Sensor.class)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          return ls.getSensorA();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1752..1758
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1760..1766
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1768..1774
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1788..1795
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1797..1804
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1806..1813
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 1815..1821

                                                                                                                                                                                                                                                                                                                                                                                                                                                      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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case LayoutConnectivity.XOVER_BOUNDARY_AB: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (facingIsBlock1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTA1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTB1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 379..385

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 40.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      case LayoutConnectivity.XOVER_BOUNDARY_CD: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          if (facingIsBlock1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTC1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return lt.getSignalHead(LayoutTurnout.Geometry.POINTD1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      java/src/jmri/jmrit/display/layoutEditor/LayoutBlockManager.java on lines 371..377

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                                                                                                                                                                                      This issue has a mass of 40.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                                                                                                                                                                                      There are no issues that match your filters.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Category
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Status