Showing 10,024 of 24,937 total issues
File bootstrap.js
has 1537 lines of code (exceeds 300 allowed). Consider refactoring. Open
/*!
* Bootstrap v3.3.2 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
File YetAnotherAutoTrain3.py
has 1530 lines of code (exceeds 300 allowed). Consider refactoring. Open
# YetAnotherAutoTrain.py -- Data driven automatic train
# Use a list of actions to automatically run a train.
# v1.3 -- Add line numbers to the compiler error messages.
# v1.4 -- Add a master controller that can be used to terminate all of the threads.
# v1.5 -- Add signal mast and signal head options.
File CircuitBuilder.java
has 1529 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.display.controlPanelEditor;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
File DCCppReply.java
has 1528 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.dccpp;
import java.util.LinkedHashMap;
import java.util.ArrayList;
import java.util.regex.Matcher;
File NceShowCabPanel.java
has 1520 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.nce.cab;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
Method getProtectedBlocks
has a Cognitive Complexity of 206 (exceeds 20 allowed). Consider refactoring. Open
@Nonnull
public ArrayList<LayoutBlock> getProtectedBlocks(jmri.NamedBean bean) {
ArrayList<LayoutBlock> ret = new ArrayList<>(2);
if (getLayoutBlock() == null) {
return ret;
- 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 779 lines of code (exceeds 25 allowed). Consider refactoring. Open
static boolean search(String name, JTextArea text) {
String[] names = getTypeAndNames(name);
if (log.isDebugEnabled()) {
log.debug("search for {} as {} \"{}\" ({})", name, names[0], names[1], names[2]);
}
File RobotThrottle2.py
has 1509 lines of code (exceeds 300 allowed). Consider refactoring. Open
# This script runs a loco around the track, controlling the speed
# according to signals and following the blocks.
#
# Author: Ken Cameron, copyright 2009
# Part of the JMRI distribution
Method setRoute
has a Cognitive Complexity of 204 (exceeds 20 allowed). Consider refactoring. Open
void setRoute(boolean state) {
if (log.isDebugEnabled()) {
log.debug("Set route {}", src.getPoint().getDisplayName()); // NOI18N
}
if (disposed) {
- 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 readDispatcherOptions
has a Cognitive Complexity of 202 (exceeds 20 allowed). Consider refactoring. Open
public void readDispatcherOptions(DispatcherFrame f) throws org.jdom2.JDOMException, java.io.IOException {
// check if file exists
if (checkFile(defaultFileName)) {
// file is present,
log.debug("Reading Dispatcher options from file {}", defaultFileName);
- 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
TrackSegmentView
has 190 methods (exceeds 20 allowed). Consider refactoring. Open
public class TrackSegmentView extends LayoutTrackView {
public TrackSegmentView(@Nonnull TrackSegment track, @Nonnull LayoutEditor layoutEditor) {
super(track, layoutEditor);
Method vetoableChange
has a Cognitive Complexity of 200 (exceeds 20 allowed). Consider refactoring. Open
@Override
public void vetoableChange(
@Nonnull PropertyChangeEvent evt)
throws PropertyVetoException {
NamedBean nb = (NamedBean) evt.getOldValue();
- 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 755 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void run() {
File file = getFile();
if (file == null) {
return;
Track
has 189 methods (exceeds 20 allowed). Consider refactoring. Open
public class Track extends PropertyChangeSupport {
public static final String NONE = "";
protected String _id = NONE;
File RosterFrame.java
has 1470 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrit.roster.swing;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
File SpeedoConsoleFrame.java
has 1450 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.bachrus;
//<editor-fold defaultstate="collapsed" desc="Imports">
import java.awt.BorderLayout;
import java.awt.CardLayout;
Method runUpdate
has a Cognitive Complexity of 195 (exceeds 20 allowed). Consider refactoring. Open
private void runUpdate() {
log.debug("run update");
removePropertyChangeListerners();
trainCommon.clearUtilityCarTypes(); // reset the utility car counts
checkBoxes.clear();
- 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 ClockMonPanel.java
has 1426 lines of code (exceeds 300 allowed). Consider refactoring. Open
package jmri.jmrix.nce.clockmon;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
Method allocateSection
has a Cognitive Complexity of 192 (exceeds 20 allowed). Consider refactoring. Open
public AllocatedSection allocateSection(AllocationRequest ar, Section ns) {
log.trace("{}: Checking Section [{}]", ar.getActiveTrain().getTrainName(), (ns != null ? ns.getDisplayName(USERSYS) : "auto"));
AllocatedSection as = null;
Section nextSection = null;
int nextSectionSeqNo = 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
LayoutTurnoutView
has 180 methods (exceeds 20 allowed). Consider refactoring. Open
public class LayoutTurnoutView extends LayoutTrackView {
public LayoutTurnoutView(@Nonnull LayoutTurnout turnout,
@Nonnull Point2D c, double rot,
@Nonnull LayoutEditor layoutEditor) {