SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
28 40 0 0

Files

Class Bugs
nl.tudelft.simulation.dsol.jetty.sse.OtsWebModel 2
nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer 2
nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$ServerThread 1
nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$XHRHandler 2
nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$ServerThread 1
nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$XHRHandler 5
nl.tudelft.simulation.dsol.web.animation.HtmlDevice 1
nl.tudelft.simulation.dsol.web.animation.HtmlGraphics2d 2
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration 5
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsEnvironment 2
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel 3
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel 6
org.opentrafficsim.web.test.CircularRoadModel 5
org.opentrafficsim.web.test.InputParameterHelper 1
org.opentrafficsim.web.test.TJunctionModel 2

nl.tudelft.simulation.dsol.jetty.sse.OtsWebModel

Bug Category Details Line Priority
Dead store to params in nl.tudelft.simulation.dsol.jetty.sse.OtsWebModel.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DLS_DEAD_LOCAL_STORE 244 Medium
nl.tudelft.simulation.dsol.jetty.sse.OtsWebModel.getAnimationPanel() may expose internal representation by returning OtsWebModel.animationPanel MALICIOUS_CODE EI_EXPOSE_REP 123 Medium

nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer

Bug Category Details Line Priority
nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer.getAnimationPanel() may expose internal representation by returning OtsWebServer.animationPanel MALICIOUS_CODE EI_EXPOSE_REP 158 Medium
new nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer(String, OtsSimulatorInterface, Bounds2d) invokes nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$ServerThread.start() MT_CORRECTNESS SC_START_IN_CTOR 100 High

nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$ServerThread

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$ServerThread.run() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 113 High

nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$XHRHandler

Bug Category Details Line Priority
Dead store to params in nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DLS_DEAD_LOCAL_STORE 277 Medium
new nl.tudelft.simulation.dsol.jetty.sse.OtsWebServer$XHRHandler(OtsWebServer) may expose internal representation by storing an externally mutable object into OtsWebServer$XHRHandler.webServer MALICIOUS_CODE EI_EXPOSE_REP2 266 Medium

nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$ServerThread

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$ServerThread.run() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 101 High

nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$XHRHandler

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 503 High
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 508 High
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 523 High
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 518 High
Exception is caught when Exception is not thrown in nl.tudelft.simulation.dsol.jetty.sse.TestDemoServer$XHRHandler.setParameters(OtsModelInterface, String) STYLE REC_CATCH_EXCEPTION 551 Medium

nl.tudelft.simulation.dsol.web.animation.HtmlDevice

Bug Category Details Line Priority
nl.tudelft.simulation.dsol.web.animation.HtmlDevice.getConfigurations() may expose internal representation by returning HtmlDevice.htmlGraphicsConfigurations MALICIOUS_CODE EI_EXPOSE_REP 53 Medium

nl.tudelft.simulation.dsol.web.animation.HtmlGraphics2d

Bug Category Details Line Priority
nl.tudelft.simulation.dsol.web.animation.HtmlGraphics2d.getRenderingHints() may expose internal representation by returning HtmlGraphics2d.renderingHints MALICIOUS_CODE EI_EXPOSE_REP 658 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphics2d.getTransform() may expose internal representation by returning HtmlGraphics2d.affineTransform MALICIOUS_CODE EI_EXPOSE_REP 729 Medium

nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration

Bug Category Details Line Priority
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.getBounds() may expose internal representation by returning HtmlGraphicsConfiguration.bounds MALICIOUS_CODE EI_EXPOSE_REP 98 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.getDefaultTransform() may expose internal representation by returning HtmlGraphicsConfiguration.identityTransform MALICIOUS_CODE EI_EXPOSE_REP 82 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.getDevice() may expose internal representation by returning HtmlGraphicsConfiguration.htmlDevice MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.getNormalizingTransform() may expose internal representation by returning HtmlGraphicsConfiguration.identityTransform MALICIOUS_CODE EI_EXPOSE_REP 90 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.setDevice(HtmlDevice) may expose internal representation by storing an externally mutable object into HtmlGraphicsConfiguration.htmlDevice MALICIOUS_CODE EI_EXPOSE_REP2 58 Medium

nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsEnvironment

Bug Category Details Line Priority
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsEnvironment.createGraphics(BufferedImage) may expose internal representation by returning HtmlGraphicsEnvironment.graphics2D MALICIOUS_CODE EI_EXPOSE_REP 67 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsEnvironment.getDefaultScreenDevice() may expose internal representation by returning HtmlGraphicsEnvironment.htmlDevice MALICIOUS_CODE EI_EXPOSE_REP 59 Medium

nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel

Bug Category Details Line Priority
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getDragLine() may expose internal representation by returning HtmlAnimationPanel.dragLine MALICIOUS_CODE EI_EXPOSE_REP 385 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getToggleButtons() may expose internal representation by returning HtmlAnimationPanel.toggleButtons MALICIOUS_CODE EI_EXPOSE_REP 575 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.isShowClass(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 187 Medium

nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel

Bug Category Details Line Priority
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.getPreferredSize() may expose internal representation by returning HtmlGridPanel.preferredSize MALICIOUS_CODE EI_EXPOSE_REP 519 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.getSize() may expose internal representation by returning HtmlGridPanel.size MALICIOUS_CODE EI_EXPOSE_REP 471 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.setPreferredSize(Dimension) may expose internal representation by storing an externally mutable object into HtmlGridPanel.preferredSize MALICIOUS_CODE EI_EXPOSE_REP2 527 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.setSize(Dimension) may expose internal representation by storing an externally mutable object into HtmlGridPanel.size MALICIOUS_CODE EI_EXPOSE_REP2 479 Medium
Inconsistent synchronization of nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.extent; locked 92% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 198 Medium
Inconsistent synchronization of nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.renderableScale; locked 60% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 454 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 216 High
org.opentrafficsim.web.test.CircularRoadModel.getMinimumDistance() may expose internal representation by returning CircularRoadModel.minimumDistance MALICIOUS_CODE EI_EXPOSE_REP 283 Medium
org.opentrafficsim.web.test.CircularRoadModel.getNetwork() may expose internal representation by returning CircularRoadModel.network MALICIOUS_CODE EI_EXPOSE_REP 275 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 211 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.web.test.CircularRoadModel.constructModel() STYLE REC_CATCH_EXCEPTION 223 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
Hard coded reference to an absolute pathname in org.opentrafficsim.web.test.TJunctionModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 57 Medium
org.opentrafficsim.web.test.TJunctionModel.getNetwork() may expose internal representation by returning TJunctionModel.network MALICIOUS_CODE EI_EXPOSE_REP 122 Medium