The following document contains the results of SpotBugs
SpotBugs Version is 4.7.1
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
101 | 51 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 72 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 144 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
com.bric.multislider.MultiThumbSlider.setSelectedThumb(int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead | PERFORMANCE | DM_NUMBER_CTOR | 669 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new com.bric.multislider.MultiThumbSliderUi(MultiThumbSlider) may expose internal representation by storing an externally mutable object into MultiThumbSliderUi.slider | MALICIOUS_CODE | EI_EXPOSE_REP2 | 288 | Medium |
Inconsistent synchronization of com.bric.multislider.MultiThumbSliderUi.mouseInside; locked 50% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 1106 | Medium |
Inconsistent synchronization of com.bric.multislider.MultiThumbSliderUi.thumbIndications; locked 75% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 1074 | Medium |
Inconsistent synchronization of com.bric.multislider.MultiThumbSliderUi.thumbPositions; locked 57% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 893 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in com.bric.multislider.PlafPaintUtils.getFocusRingColor(), since all java.awt.Color are instances of java.awt.Color | STYLE | BC_VACUOUS_INSTANCEOF | 59 | Medium |
Incorrect lazy initialization of static field com.bric.multislider.PlafPaintUtils.checkers in com.bric.multislider.PlafPaintUtils.getCheckerBoard(int, Color, Color) | MT_CORRECTNESS | LI_LAZY_INIT_STATIC | 269-270 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.swing.graphs.SwingContourPlot.setSpaceGranularityRadioButton(double) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 167 | Medium |
org.opentrafficsim.swing.graphs.SwingContourPlot.setTimeGranularityRadioButton(double) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 181 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.swing.graphs.SwingPlot.getPlot() may expose internal representation by returning SwingPlot.plot | MALICIOUS_CODE | EI_EXPOSE_REP | 280 | Medium |
new org.opentrafficsim.swing.graphs.SwingPlot(AbstractPlot) may expose internal representation by storing an externally mutable object into SwingPlot.plot | MALICIOUS_CODE | EI_EXPOSE_REP2 | 64 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.swing.gui.ColorControlPanel(GtuColorer) may expose internal representation by storing an externally mutable object into ColorControlPanel.switchableGtuColorer | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.swing.gui.OtsAnimationPanel.getAnimationPanel() may expose internal representation by returning OtsAnimationPanel.animationPanel | MALICIOUS_CODE | EI_EXPOSE_REP | 557 | Medium |
org.opentrafficsim.swing.gui.OtsAnimationPanel.getColorControlPanel() may expose internal representation by returning OtsAnimationPanel.colorControlPanel | MALICIOUS_CODE | EI_EXPOSE_REP | 675 | Medium |
org.opentrafficsim.swing.gui.OtsAnimationPanel.getDemoPanel() may expose internal representation by returning OtsAnimationPanel.demoPanel | MALICIOUS_CODE | EI_EXPOSE_REP | 618 | Medium |
new org.opentrafficsim.swing.gui.OtsAnimationPanel(Rectangle2D, Dimension, OtsAnimator, OtsModelInterface, GtuColorer, Network) invokes org.opentrafficsim.swing.gui.OtsAnimationPanel$UpdateTimer.start() | MT_CORRECTNESS | SC_START_IN_CTOR | 229 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unwritten field: org.opentrafficsim.swing.gui.OtsAnimationPanel$AutoAnimationPanel.lastGtu | CORRECTNESS | UWF_UNWRITTEN_FIELD | 1068 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.swing.gui.OtsAnimationPanel$DisposeOnCloseThread(OtsAnimationPanel, OtsAnimationPanel) may expose internal representation by storing an externally mutable object into OtsAnimationPanel$DisposeOnCloseThread.panel | MALICIOUS_CODE | EI_EXPOSE_REP2 | 703 | Medium |
new org.opentrafficsim.swing.gui.OtsAnimationPanel$DisposeOnCloseThread(OtsAnimationPanel, OtsAnimationPanel) may expose internal representation by storing an externally mutable object into OtsAnimationPanel$DisposeOnCloseThread.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 702 | Medium |
Should org.opentrafficsim.swing.gui.OtsAnimationPanel$DisposeOnCloseThread be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 702-738 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Do not catch NullPointerException like in org.opentrafficsim.swing.gui.OtsControlPanel.loadGrayscaleIcon(String) | STYLE | DCN_NULLPOINTER_EXCEPTION | 283 | Medium |
Do not catch NullPointerException like in org.opentrafficsim.swing.gui.OtsControlPanel.loadIcon(String) | STYLE | DCN_NULLPOINTER_EXCEPTION | 265 | Medium |
org.opentrafficsim.swing.gui.OtsControlPanel.getOtsSearchPanel() may expose internal representation by returning OtsControlPanel.otsSearchPanel | MALICIOUS_CODE | EI_EXPOSE_REP | 201 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.swing.gui.OtsControlPanel$DisposeOnCloseThread(OtsControlPanel, OtsControlPanel) may expose internal representation by storing an externally mutable object into OtsControlPanel$DisposeOnCloseThread.panel | MALICIOUS_CODE | EI_EXPOSE_REP2 | 338 | Medium |
new org.opentrafficsim.swing.gui.OtsControlPanel$DisposeOnCloseThread(OtsControlPanel, OtsControlPanel) may expose internal representation by storing an externally mutable object into OtsControlPanel$DisposeOnCloseThread.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 337 | Medium |
Should org.opentrafficsim.swing.gui.OtsControlPanel$DisposeOnCloseThread be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 337-374 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.swing.gui.OtsSearchPanel(OtsAnimationPanel) may expose internal representation by storing an externally mutable object into OtsSearchPanel.otsAnimationPanel | MALICIOUS_CODE | EI_EXPOSE_REP2 | 58 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.swing.gui.OtsSimulationApplication.getAnimationPanel() may expose internal representation by returning OtsSimulationApplication.animationPanel | MALICIOUS_CODE | EI_EXPOSE_REP | 74 | Medium |
new org.opentrafficsim.swing.gui.OtsSimulationApplication(OtsModelInterface, OtsAnimationPanel) may expose internal representation by storing an externally mutable object into OtsSimulationApplication.animationPanel | MALICIOUS_CODE | EI_EXPOSE_REP2 | 35 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.swing.gui.OtsSimulationPanel.getConsole() may expose internal representation by returning OtsSimulationPanel.console | MALICIOUS_CODE | EI_EXPOSE_REP | 129 | Medium |
org.opentrafficsim.swing.gui.OtsSimulationPanel.getOtsControlPanel() may expose internal representation by returning OtsSimulationPanel.otsControlPanel | MALICIOUS_CODE | EI_EXPOSE_REP | 121 | Medium |
org.opentrafficsim.swing.gui.OtsSimulationPanel.getTabbedPane() may expose internal representation by returning OtsSimulationPanel.tabbedPane | MALICIOUS_CODE | EI_EXPOSE_REP | 104 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in new org.opentrafficsim.swing.gui.OtsSwingApplication(OtsModelInterface, JPanel): new java.io.FileReader(String) | I18N | DM_DEFAULT_ENCODING | 141 | High |
new org.opentrafficsim.swing.gui.OtsSwingApplication(OtsModelInterface, JPanel) may fail to clean up java.io.Reader | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 141 | Medium |
new org.opentrafficsim.swing.gui.OtsSwingApplication(OtsModelInterface, JPanel) may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 141 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.opentrafficsim.swing.gui.OtsSwingApplication$2.windowClosing(WindowEvent): new java.io.FileWriter(File) | I18N | DM_DEFAULT_ENCODING | 125 | High |
org.opentrafficsim.swing.gui.OtsSwingApplication$2.windowClosing(WindowEvent) may fail to clean up java.io.Writer | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 125 | Medium |
org.opentrafficsim.swing.gui.OtsSwingApplication$2.windowClosing(WindowEvent) may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 125 | Medium |
Exceptional return value of java.io.File.mkdirs() ignored in org.opentrafficsim.swing.gui.OtsSwingApplication$2.windowClosing(WindowEvent) | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 124 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.swing.script.AbstractSimulationScript.start() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 220 | Medium |
org.opentrafficsim.swing.script.AbstractSimulationScript.getNetwork() may expose internal representation by returning AbstractSimulationScript.network | MALICIOUS_CODE | EI_EXPOSE_REP | 286 | Medium |
org.opentrafficsim.swing.script.AbstractSimulationScript.getSimulationTime() may expose internal representation by returning AbstractSimulationScript.simulationTime | MALICIOUS_CODE | EI_EXPOSE_REP | 152 | Medium |
org.opentrafficsim.swing.script.AbstractSimulationScript.getStartTime() may expose internal representation by returning AbstractSimulationScript.startTime | MALICIOUS_CODE | EI_EXPOSE_REP | 134 | Medium |
org.opentrafficsim.swing.script.AbstractSimulationScript.getWarmupTime() may expose internal representation by returning AbstractSimulationScript.warmupTime | MALICIOUS_CODE | EI_EXPOSE_REP | 143 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.swing.script.IdmOptions.getACar() may expose internal representation by returning IdmOptions.aCar | MALICIOUS_CODE | EI_EXPOSE_REP | 56 | Medium |
org.opentrafficsim.swing.script.IdmOptions.getATruck() may expose internal representation by returning IdmOptions.aTruck | MALICIOUS_CODE | EI_EXPOSE_REP | 65 | Medium |
org.opentrafficsim.swing.script.IdmOptions.getB() may expose internal representation by returning IdmOptions.b | MALICIOUS_CODE | EI_EXPOSE_REP | 74 | Medium |
org.opentrafficsim.swing.script.IdmOptions.getTMax() may expose internal representation by returning IdmOptions.tMax | MALICIOUS_CODE | EI_EXPOSE_REP | 92 | Medium |
org.opentrafficsim.swing.script.IdmOptions.getTMin() may expose internal representation by returning IdmOptions.tMin | MALICIOUS_CODE | EI_EXPOSE_REP | 83 | Medium |