Showing 10,000 of 24,891 total issues
File AutoDispatcher2.py
has 8042 lines of code (exceeds 300 allowed). Consider refactoring. Open
# AutoDispatcher 2
#
# This script provides full layout automation, using connectivity info
# provided by Layout Editor panels.
#
Method placeDirectionSensors
has a Cognitive Complexity of 1045 (exceeds 20 allowed). Consider refactoring. Open
@Override
public int placeDirectionSensors() {
int missingSignalsBB = 0;
int missingSignalsTurnouts = 0;
int missingSignalsLevelXings = 0;
- 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 LayoutEditor.java
has 6615 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.layoutEditor;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.awt.*;
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) {
- 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 propertyChange
has a Cognitive Complexity of 687 (exceeds 20 allowed). Consider refactoring. Open
def propertyChange(self, event):
# Customize bellow for throttles calls:
if (event.propertyName == "Value") : # USB
if (event.oldValue.getController() == self.desiredController ) :
component = event.oldValue.getComponent().toString()
- 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 run
has a Cognitive Complexity of 642 (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
File panel.js
has 4456 lines of code (exceeds 300 allowed). Consider refactoring. Open
/**********************************************************************************************
* panel Servlet - Draw JMRI panels on browser screen
* Retrieves panel xml from JMRI and builds panel client-side from that xml, including
* click functions. Sends and listens for changes to panel elements using the JSON WebSocket server.
* If no parm passed, page will list links to available panels.
File ConditionalTreeEdit.java
has 3618 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.conditional;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
Method addBeanSettings
has a Cognitive Complexity of 479 (exceeds 20 allowed). Consider refactoring. Open
public void addBeanSettings(Path p, LayoutConnectivity lc, LayoutBlock layoutBlock) {
p.clearSettings();
LayoutTrack curConnection = null;
LayoutTrack prevConnection = null;
HitPointType typeCurConnection = HitPointType.NONE;
- 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 LayoutBlock.java
has 3374 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.layoutEditor;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.ActionEvent;
File LocoNetMessageInterpret.java
has 3288 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.loconet.messageinterp;
import java.time.LocalTime;
import java.util.ArrayList;
Method cabUpdateUsb
has a Cognitive Complexity of 434 (exceeds 20 allowed). Consider refactoring. Open
private void cabUpdateUsb() {
if (firstTime) {
try {
Thread.sleep(FIRST_TIME_SLEEP); // wait for panel to display
- 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 Train.java
has 3077 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.operations.trains;
import java.awt.Color;
import java.beans.PropertyChangeListener;
import java.io.*;
Method readTrainInfo
has a Cognitive Complexity of 413 (exceeds 20 allowed). Consider refactoring. Open
public TrainInfo readTrainInfo(String name) throws org.jdom2.JDOMException, java.io.IOException {
log.debug("entered readTrainInfo for {}", name);
TrainInfo tInfo = null;
int version = 1;
// check if file exists
- 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 ConditionalEditFrame.java
has 2934 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.conditional;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
File TrackSegmentView.java
has 2919 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.layoutEditor;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.geom.*;
File DispatcherFrame.java
has 2880 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.dispatcher;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
Function setup_graph_edges
has a Cognitive Complexity of 401 (exceeds 20 allowed). Consider refactoring. Open
def setup_graph_edges(self):
global le
if self.logLevel > 0: print "*****************************"
if self.logLevel > 0: print "****setup_graph_edges********"
- 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 search
has a Cognitive Complexity of 400 (exceeds 20 allowed). Consider refactoring. Open
static boolean search(String name, JTextArea text) {
String[] names = getTypeAndNames(name);
if (log.isDebugEnabled()) {
log.debug("search for {} as {} \"{}\" ({})", name, names[0], names[1], names[2]);
}
- 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 Editor.java
has 2778 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.event.*;