Showing 10,007 of 24,911 total issues
File TransitTableAction.java
has 2772 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.beantable;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
Method trackSegmentLeadsTo
has a Cognitive Complexity of 383 (exceeds 20 allowed). Consider refactoring. Open
private boolean trackSegmentLeadsTo(
@CheckForNull TrackSegment trackSegment, @CheckForNull LayoutTrack layoutTrack) {
if ((trackSegment == null) || (layoutTrack == null)) {
log.error("Null argument on entry to trackSegmentLeadsTo");
return false;
- Read upRead up
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 Ds64TabbedPanel.java
has 2669 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.loconet.ds64;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.awt.Color;
File TrainBuilderBase.java
has 2608 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.operations.trains;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.*;
File Warrant.java
has 2573 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.logix;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
File LRouteTableAction.java
has 2520 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.beantable;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
Method load
has a Cognitive Complexity of 347 (exceeds 20 allowed). Consider refactoring. Open
public static void load(Element e) {
if (e.getChild(Xml.OPERATIONS) == null) {
log.warn("OperationsPro settings values not found");
return;
}
- Read upRead up
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 LayoutTurnoutView.java
has 2474 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.layoutEditor;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
File Setup.java
has 2469 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.operations.setup;
import java.awt.Color;
import java.io.IOException;
import java.util.*;
File DefaultSignalMastLogic.java
has 2449 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.implementation;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyVetoException;
LayoutEditor
has 329 methods (exceeds 20 allowed). Consider refactoring. Open
final public class LayoutEditor extends PanelEditor implements MouseWheelListener, LayoutModels {
// Operational instance variables - not saved to disk
private JmriJFrame floatingEditToolBoxFrame = null;
private JScrollPane floatingEditContentScrollPane = null;
Method load
has a Cognitive Complexity of 326 (exceeds 20 allowed). Consider refactoring. Open
@Override
public void load(Element element, Object o) {
// create the objects
LayoutEditor p = (LayoutEditor) o;
- Read upRead up
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 DefaultSection.java
has 2318 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.implementation;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.beans.*;
File StlEditorPane.java
has 2314 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.openlcb.swing.stleditor;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
File LayoutTurnout.java
has 2275 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.layoutEditor;
import java.awt.Color;
import java.awt.Font;
import java.text.MessageFormat;
File ConnectivityUtil.java
has 2268 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.stream.Collectors;
File TimeTableFrame.java
has 2265 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.timetable.swing;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
File XNetMessage.java
has 2195 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.lenz;
import java.io.Serializable;
import org.slf4j.Logger;
File DCCppMessage.java
has 2186 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.dccpp;
import java.util.concurrent.Delayed;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
Method draw1
has a Cognitive Complexity of 297 (exceeds 20 allowed). Consider refactoring. Open
@Override
protected void draw1(Graphics2D g2, boolean isMain, boolean isBlock) {
if (isBlock && getLayoutBlock() == null) {
// Skip the block layer if there is no block assigned.
return;
- Read upRead up
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"