SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.9.1
Threshold is medium
Effort is default
Summary
| Classes |
Bugs |
Errors |
Missing Classes |
| 30 |
43 |
1 |
0 |
org.opentrafficsim.web.OtsWebModel
| Bug |
Category |
Details |
Line |
Priority |
| org.opentrafficsim.web.OtsWebModel.getAnimationPanel() may expose internal representation by returning OtsWebModel.animationPanel |
MALICIOUS_CODE |
EI_EXPOSE_REP |
118 |
Medium |
| Unread field: org.opentrafficsim.web.OtsWebModel.dirtyControls |
PERFORMANCE |
URF_UNREAD_FIELD |
56 |
Medium |
org.opentrafficsim.web.OtsWebServer
| Bug |
Category |
Details |
Line |
Priority |
| org.opentrafficsim.web.OtsWebServer.getAnimationPanel() may expose internal representation by returning OtsWebServer.animationPanel |
MALICIOUS_CODE |
EI_EXPOSE_REP |
160 |
Medium |
| new org.opentrafficsim.web.OtsWebServer(String, OtsSimulatorInterface, Bounds2d) invokes org.opentrafficsim.web.OtsWebServer$ServerThread.start() |
MT_CORRECTNESS |
SC_START_IN_CTOR |
91 |
High |
| Unread field: org.opentrafficsim.web.OtsWebServer.dirtyControls |
PERFORMANCE |
URF_UNREAD_FIELD |
62 |
Medium |
org.opentrafficsim.web.OtsWebServer$XHRHandler
| Bug |
Category |
Details |
Line |
Priority |
| new org.opentrafficsim.web.OtsWebServer$XHRHandler(OtsWebServer) may expose internal representation by storing an externally mutable object into OtsWebServer$XHRHandler.webServer |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
269 |
Medium |
org.opentrafficsim.web.TestDemoServer$XHRHandler
| Bug |
Category |
Details |
Line |
Priority |
| Boxing/unboxing to parse a primitive org.opentrafficsim.web.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
518 |
High |
| Boxing/unboxing to parse a primitive org.opentrafficsim.web.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
523 |
High |
| Boxing/unboxing to parse a primitive org.opentrafficsim.web.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
538 |
High |
| Boxing/unboxing to parse a primitive org.opentrafficsim.web.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
533 |
High |
| Exception is caught when Exception is not thrown in org.opentrafficsim.web.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) |
STYLE |
REC_CATCH_EXCEPTION |
566 |
Medium |
org.opentrafficsim.web.animation.HtmlDevice
| Bug |
Category |
Details |
Line |
Priority |
| org.opentrafficsim.web.animation.HtmlDevice.getConfigurations() may expose internal representation by returning HtmlDevice.htmlGraphicsConfigurations |
MALICIOUS_CODE |
EI_EXPOSE_REP |
49 |
Medium |
org.opentrafficsim.web.animation.HtmlGraphics2d
| Bug |
Category |
Details |
Line |
Priority |
| org.opentrafficsim.web.animation.HtmlGraphics2d.getRenderingHints() may expose internal representation by returning HtmlGraphics2d.renderingHints |
MALICIOUS_CODE |
EI_EXPOSE_REP |
707 |
Medium |
| org.opentrafficsim.web.animation.HtmlGraphics2d.getTransform() may expose internal representation by returning HtmlGraphics2d.affineTransform |
MALICIOUS_CODE |
EI_EXPOSE_REP |
769 |
Medium |
org.opentrafficsim.web.animation.HtmlGraphicsConfiguration
| Bug |
Category |
Details |
Line |
Priority |
| org.opentrafficsim.web.animation.HtmlGraphicsConfiguration.getBounds() may expose internal representation by returning HtmlGraphicsConfiguration.bounds |
MALICIOUS_CODE |
EI_EXPOSE_REP |
90 |
Medium |
| org.opentrafficsim.web.animation.HtmlGraphicsConfiguration.getDefaultTransform() may expose internal representation by returning HtmlGraphicsConfiguration.identityTransform |
MALICIOUS_CODE |
EI_EXPOSE_REP |
76 |
Medium |
| org.opentrafficsim.web.animation.HtmlGraphicsConfiguration.getDevice() may expose internal representation by returning HtmlGraphicsConfiguration.htmlDevice |
MALICIOUS_CODE |
EI_EXPOSE_REP |
44 |
Medium |
| org.opentrafficsim.web.animation.HtmlGraphicsConfiguration.getNormalizingTransform() may expose internal representation by returning HtmlGraphicsConfiguration.identityTransform |
MALICIOUS_CODE |
EI_EXPOSE_REP |
83 |
Medium |
| org.opentrafficsim.web.animation.HtmlGraphicsConfiguration.setDevice(HtmlDevice) may expose internal representation by storing an externally mutable object into HtmlGraphicsConfiguration.htmlDevice |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
55 |
Medium |
org.opentrafficsim.web.animation.HtmlGraphicsEnvironment
| Bug |
Category |
Details |
Line |
Priority |
| org.opentrafficsim.web.animation.HtmlGraphicsEnvironment.createGraphics(BufferedImage) may expose internal representation by returning HtmlGraphicsEnvironment.graphics2D |
MALICIOUS_CODE |
EI_EXPOSE_REP |
62 |
Medium |
| org.opentrafficsim.web.animation.HtmlGraphicsEnvironment.getDefaultScreenDevice() may expose internal representation by returning HtmlGraphicsEnvironment.htmlDevice |
MALICIOUS_CODE |
EI_EXPOSE_REP |
55 |
Medium |
org.opentrafficsim.web.animation.d2.HtmlAnimationPanel
| Bug |
Category |
Details |
Line |
Priority |
| Shared primitive variable "dragLineEnabled" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
158 |
Medium |
| Shared primitive variable "dragLineEnabled" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
409 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlAnimationPanel.getDragLine() may expose internal representation by returning HtmlAnimationPanel.dragLine |
MALICIOUS_CODE |
EI_EXPOSE_REP |
391 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlAnimationPanel.getElements() may expose internal representation by returning HtmlAnimationPanel.elements |
MALICIOUS_CODE |
EI_EXPOSE_REP |
382 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlAnimationPanel.getGtuColorerManager() may expose internal representation by returning HtmlAnimationPanel.gtuColorerManager |
MALICIOUS_CODE |
EI_EXPOSE_REP |
117 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlAnimationPanel.getToggleButtons() may expose internal representation by returning HtmlAnimationPanel.toggleButtons |
MALICIOUS_CODE |
EI_EXPOSE_REP |
556 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlAnimationPanel.isShowClass(Class) makes inefficient use of keySet iterator instead of entrySet iterator |
PERFORMANCE |
WMI_WRONG_MAP_ITERATOR |
193 |
Medium |
org.opentrafficsim.web.animation.d2.HtmlGridPanel
| Bug |
Category |
Details |
Line |
Priority |
| Shared primitive variable "dirty" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
491 |
Medium |
| Shared primitive variable "showGrid" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
335 |
Medium |
| Shared primitive variable "showing" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
599 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlGridPanel.getPreferredSize() may expose internal representation by returning HtmlGridPanel.preferredSize |
MALICIOUS_CODE |
EI_EXPOSE_REP |
554 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlGridPanel.getSize() may expose internal representation by returning HtmlGridPanel.size |
MALICIOUS_CODE |
EI_EXPOSE_REP |
500 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlGridPanel.setPreferredSize(Dimension) may expose internal representation by storing an externally mutable object into HtmlGridPanel.preferredSize |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
563 |
Medium |
| org.opentrafficsim.web.animation.d2.HtmlGridPanel.setSize(Dimension) may expose internal representation by storing an externally mutable object into HtmlGridPanel.size |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
509 |
Medium |
| Test for floating point equality in org.opentrafficsim.web.animation.d2.HtmlGridPanel.computeVisibleExtent(Bounds2d) |
STYLE |
FE_FLOATING_POINT_EQUALITY |
658 |
High |
| Inconsistent synchronization of org.opentrafficsim.web.animation.d2.HtmlGridPanel.extent; locked 92% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
180 |
Medium |
org.opentrafficsim.web.test.CircularRoadModel
| Bug |
Category |
Details |
Line |
Priority |
| Random object created and used only once in org.opentrafficsim.web.test.CircularRoadModel.constructModel() |
BAD_PRACTICE |
DMI_RANDOM_USED_ONLY_ONCE |
245 |
High |
| org.opentrafficsim.web.test.CircularRoadModel.getMinimumDistance() may expose internal representation by returning CircularRoadModel.minimumDistance |
MALICIOUS_CODE |
EI_EXPOSE_REP |
312 |
Medium |
| org.opentrafficsim.web.test.CircularRoadModel.getNetwork() may expose internal representation by returning CircularRoadModel.network |
MALICIOUS_CODE |
EI_EXPOSE_REP |
303 |
Medium |
| Exception is caught when Exception is not thrown in org.opentrafficsim.web.test.CircularRoadModel.constructModel() |
STYLE |
REC_CATCH_EXCEPTION |
252 |
Medium |
org.opentrafficsim.web.test.InputParameterHelper
| Bug |
Category |
Details |
Line |
Priority |
| new org.opentrafficsim.web.test.InputParameterHelper(InputParameterMap) may expose internal representation by storing an externally mutable object into InputParameterHelper.rootMap |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
41 |
Medium |
org.opentrafficsim.web.test.TJunctionModel
| Bug |
Category |
Details |
Line |
Priority |
| org.opentrafficsim.web.test.TJunctionModel.getNetwork() may expose internal representation by returning TJunctionModel.network |
MALICIOUS_CODE |
EI_EXPOSE_REP |
49 |
Medium |