Showing 10,024 of 24,937 total issues
Method run
has a Cognitive Complexity of 231 (exceeds 20 allowed). Consider refactoring. Open
@Override
public void run() {
File file = getFile();
if (file == null) {
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
Method initComponents
has 885 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void initComponents() {
setTitle(Bundle.getMessage("ConfigNodesTitle"));
contentPane = getContentPane();
Method scanAllocationRequestList
has a Cognitive Complexity of 230 (exceeds 20 allowed). Consider refactoring. Open
private synchronized void scanAllocationRequestList(List<AllocationRequest> list) {
boolean okToAllocate = false;
if (list.size() <= 0) {
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
Function dispatch_train
has a Cognitive Complexity of 230 (exceeds 20 allowed). Consider refactoring. Open
def dispatch_train(self, sensor_changed, button_sensor_name, button_station_name):
global trains_allocated
global trains_dispatched
global g
- 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 TreeEditor.java
has 1679 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.logixng.tools.swing;
import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyVetoException;
File NodeConfigFrame.java
has 1679 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.acela.nodeconfig;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
Method notifyNeighboursOfRemoval
has a Cognitive Complexity of 225 (exceeds 20 allowed). Consider refactoring. Open
private void notifyNeighboursOfRemoval(List<Routes> routesToRemove, Block notifyingblk) {
String msgPrefix = "From " + this.getDisplayName() + " notify block " + notifyingblk.getDisplayName() + " ";
if (enableDeleteRouteLogging) {
log.info("{} notifyNeighboursOfRemoval called for routes from {} ===", msgPrefix, notifyingblk.getDisplayName());
- 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 SignalHeadAddEditFrame.java
has 1645 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.beantable;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.awt.*;
Method getTurnoutList
has a Cognitive Complexity of 223 (exceeds 20 allowed). Consider refactoring. Open
@Nonnull
public List<LayoutTrackExpectedState<LayoutTurnout>> getTurnoutList(
@CheckForNull Block currBlock,
@CheckForNull Block prevBlock,
@CheckForNull Block nextBlock,
- 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
Method loadSignalMastLogic
has a Cognitive Complexity of 221 (exceeds 20 allowed). Consider refactoring. Open
public boolean loadSignalMastLogic(Element signalMastLogic) {
List<Element> logicList = signalMastLogic.getChildren("signalmastlogic");
log.debug("Found {} signal mast logics", logicList.size());
SignalMastManager sm = InstanceManager.getDefault(jmri.SignalMastManager.class);
- 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
Method RPSpos
has a Cognitive Complexity of 218 (exceeds 20 allowed). Consider refactoring. Open
RetVal RPSpos(int nr, double Tr[], double Xr[], double Yr[], double Zr[],// many
double Vs, double Xt, double Yt, double Zt) {// receivers
int i = 0, j = 0, jmax = 0, k = 0, l = 0, ns, nss, nxx, nox = 0, S, cmax;
int[] ce = new int[NMAX];
- 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
Editor
has 207 methods (exceeds 20 allowed). Consider refactoring. Open
abstract public class Editor extends JmriJFrame implements JmriMouseListener, JmriMouseMotionListener,
ActionListener, KeyListener, VetoableChangeListener {
final public static int BKG = 1;
final public static int TEMP = 2;
File RunDispatch.py
has 1598 lines of code (exceeds 300 allowed). Consider refactoring. Open
###############################################################################
#
# class OptionDialog
# Some Swing dialogs
#
File AutoActiveTrain.java
has 1596 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.dispatcher;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
File ControlPanelEditor.java
has 1595 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.controlPanelEditor;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
Method load
has 826 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void load(Element e) {
if (e.getChild(Xml.OPERATIONS) == null) {
log.warn("OperationsPro settings values not found");
return;
}
File TrainCommon.java
has 1588 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.operations.trains;
import java.awt.*;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
DCCppMessage
has 203 methods (exceeds 20 allowed). Consider refactoring. Open
public class DCCppMessage extends jmri.jmrix.AbstractMRMessage implements Delayed {
private static int _nRetries = 3;
/* According to the specification, DCC++ has a maximum timing
File PositionablePointView.java
has 1551 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.layoutEditor;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.Point2D;
File MoveTrain.py
has 1547 lines of code (exceeds 300 allowed). Consider refactoring. Open
###############################################################################
#
# class MoveTrain
# Calls dispatcher to e train from one station to another
# given engine and start and end positions