SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.8.6
Threshold is medium
Effort is default
Summary
Classes |
Bugs |
Errors |
Missing Classes |
26 |
43 |
0 |
0 |
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 |
510 |
High |
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
515 |
High |
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
530 |
High |
Boxing/unboxing to parse a primitive nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
525 |
High |
Exception is caught when Exception is not thrown in nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.setParameters(DsolModel, String) |
STYLE |
REC_CATCH_EXCEPTION |
558 |
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 |
476 |
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 |
210 |
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 |
535 |
Medium |
Dead store to params in nl.tudelft.simulation.dsol.web.DsolWebServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) |
STYLE |
DLS_DEAD_LOCAL_STORE |
269 |
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 |
258 |
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 |
652 |
Medium |
nl.tudelft.simulation.dsol.web.animation.HtmlGraphics2D.getTransform() may expose internal representation by returning HtmlGraphics2D.affineTransform |
MALICIOUS_CODE |
EI_EXPOSE_REP |
723 |
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.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-67 |
Medium |
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel
Bug |
Category |
Details |
Line |
Priority |
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 |
110 |
Medium |
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getDragLine() may expose internal representation by returning HtmlAnimationPanel.dragLine |
MALICIOUS_CODE |
EI_EXPOSE_REP |
381 |
Medium |
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getElements() may expose internal representation by returning HtmlAnimationPanel.elements |
MALICIOUS_CODE |
EI_EXPOSE_REP |
373 |
Medium |
nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getToggleButtons() may expose internal representation by returning HtmlAnimationPanel.toggleButtons |
MALICIOUS_CODE |
EI_EXPOSE_REP |
571 |
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 |
109 |
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 |
180 |
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 |
504 |
Medium |
nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.getSize() may expose internal representation by returning HtmlGridPanel.size |
MALICIOUS_CODE |
EI_EXPOSE_REP |
456 |
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 |
512 |
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 |
464 |
Medium |
Inconsistent synchronization of nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.extent; locked 91% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
167 |
Medium |
Inconsistent synchronization of nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.renderableScale; locked 66% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
167 |
Medium |