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
26 48 1 0

Files

Class Bugs
nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$ServerThread 1
nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler 5
nl.tudelft.simulation.dsol.web.DsolWebModel 6
nl.tudelft.simulation.dsol.web.DsolWebServer 4
nl.tudelft.simulation.dsol.web.DsolWebServer$ServerThread 1
nl.tudelft.simulation.dsol.web.DsolWebServer$XHRHandler 3
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.TestSwing$CustomPanel 1
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel 8
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel 9

nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$ServerThread

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$ServerThread.run() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 87 High

nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 507 High
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 512 High
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 527 High
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 522 High
Exception is caught when Exception is not thrown in nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) STYLE REC_CATCH_EXCEPTION 555 Medium

nl.tudelft.simulation.dsol.web.DsolWebModel

Bug Category Details Line Priority
instanceof will always return false in nl.tudelft.simulation.dsol.web.DsolWebModel.handle(String, Request, HttpServletRequest, HttpServletResponse), since a Number cannot be a java.util.Calendar CORRECTNESS BC_IMPOSSIBLE_INSTANCEOF 475 Medium
Exception thrown in class nl.tudelft.simulation.dsol.web.DsolWebModel at new nl.tudelft.simulation.dsol.web.DsolWebModel(String, SimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 78 Medium
Dead store to params in nl.tudelft.simulation.dsol.web.DsolWebModel.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DLS_DEAD_LOCAL_STORE 209 Medium
nl.tudelft.simulation.dsol.web.DsolWebModel.getAnimationPanel() may expose internal representation by returning DsolWebModel.animationPanel MALICIOUS_CODE EI_EXPOSE_REP 111 Medium
nl.tudelft.simulation.dsol.web.DsolWebModel.getSimulator() may expose internal representation by returning DsolWebModel.simulator MALICIOUS_CODE EI_EXPOSE_REP 103 Medium
new nl.tudelft.simulation.dsol.web.DsolWebModel(String, SimulatorInterface) may expose internal representation by storing an externally mutable object into DsolWebModel.simulator MALICIOUS_CODE EI_EXPOSE_REP2 75 Medium

nl.tudelft.simulation.dsol.web.DsolWebServer

Bug Category Details Line Priority
Exception thrown in class nl.tudelft.simulation.dsol.web.DsolWebServer at new nl.tudelft.simulation.dsol.web.DsolWebServer(String, SimulatorInterface, Bounds2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 80 Medium
nl.tudelft.simulation.dsol.web.DsolWebServer.getAnimationPanel() may expose internal representation by returning DsolWebServer.animationPanel MALICIOUS_CODE EI_EXPOSE_REP 150 Medium
nl.tudelft.simulation.dsol.web.DsolWebServer.getSimulator() may expose internal representation by returning DsolWebServer.simulator MALICIOUS_CODE EI_EXPOSE_REP 142 Medium
new nl.tudelft.simulation.dsol.web.DsolWebServer(String, SimulatorInterface, Bounds2d) may expose internal representation by storing an externally mutable object into DsolWebServer.simulator MALICIOUS_CODE EI_EXPOSE_REP2 78 Medium

nl.tudelft.simulation.dsol.web.DsolWebServer$ServerThread

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in nl.tudelft.simulation.dsol.web.DsolWebServer$ServerThread.run() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 105 High

nl.tudelft.simulation.dsol.web.DsolWebServer$XHRHandler

Bug Category Details Line Priority
instanceof will always return false in nl.tudelft.simulation.dsol.web.DsolWebServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse), since a Number cannot be a java.util.Calendar CORRECTNESS BC_IMPOSSIBLE_INSTANCEOF 534 Medium
Dead store to params in nl.tudelft.simulation.dsol.web.DsolWebServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DLS_DEAD_LOCAL_STORE 268 Medium
new nl.tudelft.simulation.dsol.web.DsolWebServer$XHRHandler(DsolWebServer) may expose internal representation by storing an externally mutable object into DsolWebServer$XHRHandler.webServer MALICIOUS_CODE EI_EXPOSE_REP2 257 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 50 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 631 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphics2D.getTransform() may expose internal representation by returning HtmlGraphics2D.affineTransform MALICIOUS_CODE EI_EXPOSE_REP 693 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 92 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.getDefaultTransform() may expose internal representation by returning HtmlGraphicsConfiguration.identityTransform MALICIOUS_CODE EI_EXPOSE_REP 78 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.getDevice() may expose internal representation by returning HtmlGraphicsConfiguration.htmlDevice MALICIOUS_CODE EI_EXPOSE_REP 46 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsConfiguration.getNormalizingTransform() may expose internal representation by returning HtmlGraphicsConfiguration.identityTransform MALICIOUS_CODE EI_EXPOSE_REP 85 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 57 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 64 Medium
nl.tudelft.simulation.dsol.web.animation.HtmlGraphicsEnvironment.getDefaultScreenDevice() may expose internal representation by returning HtmlGraphicsEnvironment.htmlDevice MALICIOUS_CODE EI_EXPOSE_REP 57 Medium

nl.tudelft.simulation.dsol.web.animation.TestSwing$CustomPanel

Bug Category Details Line Priority
Should nl.tudelft.simulation.dsol.web.animation.TestSwing$CustomPanel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 57-66 Medium

nl.tudelft.simulation.dsol.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 143 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 394 Medium
Exception thrown in class nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel at new nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel(Bounds2d, Dimension, SimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 109 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getDragLine() may expose internal representation by returning HtmlAnimationPanel.dragLine MALICIOUS_CODE EI_EXPOSE_REP 378 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getElements() may expose internal representation by returning HtmlAnimationPanel.elements MALICIOUS_CODE EI_EXPOSE_REP 370 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getToggleButtons() may expose internal representation by returning HtmlAnimationPanel.toggleButtons MALICIOUS_CODE EI_EXPOSE_REP 568 Medium
new nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel(Bounds2d, Dimension, SimulatorInterface) may expose internal representation by storing an externally mutable object into HtmlAnimationPanel.simulator MALICIOUS_CODE EI_EXPOSE_REP2 108 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 178 Medium

nl.tudelft.simulation.dsol.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 447 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 309 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 543 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.getPreferredSize() may expose internal representation by returning HtmlGridPanel.preferredSize MALICIOUS_CODE EI_EXPOSE_REP 503 Medium
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.getSize() may expose internal representation by returning HtmlGridPanel.size MALICIOUS_CODE EI_EXPOSE_REP 455 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 511 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 463 Medium
Inconsistent synchronization of nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.extent; locked 91% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 166 Medium
Inconsistent synchronization of nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.renderableScale; locked 66% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 166 Medium