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
29 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 54 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 99 Medium
nl.tudelft.simulation.dsol.web.animation.HTMLGraphicsConfiguration.getDefaultTransform() may expose internal representation by returning HTMLGraphicsConfiguration.identityTransform MALICIOUS_CODE EI_EXPOSE_REP 83 Medium
nl.tudelft.simulation.dsol.web.animation.HTMLGraphicsConfiguration.getDevice() may expose internal representation by returning HTMLGraphicsConfiguration.htmlDevice MALICIOUS_CODE EI_EXPOSE_REP 48 Medium
nl.tudelft.simulation.dsol.web.animation.HTMLGraphicsConfiguration.getNormalizingTransform() may expose internal representation by returning HTMLGraphicsConfiguration.identityTransform MALICIOUS_CODE EI_EXPOSE_REP 91 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 59 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 68 Medium
nl.tudelft.simulation.dsol.web.animation.HTMLGraphicsEnvironment.getDefaultScreenDevice() may expose internal representation by returning HTMLGraphicsEnvironment.htmlDevice MALICIOUS_CODE EI_EXPOSE_REP 60 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 386 Medium
nl.tudelft.simulation.dsol.web.animation.D2.HTMLAnimationPanel.getToggleButtons() may expose internal representation by returning HTMLAnimationPanel.toggleButtons MALICIOUS_CODE EI_EXPOSE_REP 576 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 188 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 219 High
org.opentrafficsim.web.test.CircularRoadModel.getMinimumDistance() may expose internal representation by returning CircularRoadModel.minimumDistance MALICIOUS_CODE EI_EXPOSE_REP 286 Medium
org.opentrafficsim.web.test.CircularRoadModel.getNetwork() may expose internal representation by returning CircularRoadModel.network MALICIOUS_CODE EI_EXPOSE_REP 278 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 214 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.web.test.CircularRoadModel.constructModel() STYLE REC_CATCH_EXCEPTION 226 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 40 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 59 Medium
org.opentrafficsim.web.test.TJunctionModel.getNetwork() may expose internal representation by returning TJunctionModel.network MALICIOUS_CODE EI_EXPOSE_REP 133 Medium