SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.9.8
Threshold is medium
Effort is default
Summary
| Classes |
Bugs |
Errors |
Missing Classes |
| 27 |
48 |
0 |
0 |
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 |
| HTTP parameter written to Servlet output in nl.tudelft.simulation.dsol.web.AbstractTestDemoServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) |
SECURITY |
XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER |
274 |
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 |
443 |
Medium |
| Dead store to params in nl.tudelft.simulation.dsol.web.DsolWebModel.handle(String, Request, HttpServletRequest, HttpServletResponse) |
STYLE |
DLS_DEAD_LOCAL_STORE |
200 |
Medium |
| nl.tudelft.simulation.dsol.web.DsolWebModel.getAnimationPanel() may expose internal representation by returning DsolWebModel.animationPanel |
MALICIOUS_CODE |
EI_EXPOSE_REP |
112 |
Medium |
| nl.tudelft.simulation.dsol.web.DsolWebModel.getSimulator() may expose internal representation by returning DsolWebModel.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP |
104 |
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 |
76 |
Medium |
| Unread field: nl.tudelft.simulation.dsol.web.DsolWebModel.dirtyControls |
PERFORMANCE |
URF_UNREAD_FIELD |
57 |
Medium |
| HTTP parameter written to Servlet output in nl.tudelft.simulation.dsol.web.DsolWebModel.handle(String, Request, HttpServletRequest, HttpServletResponse) |
SECURITY |
XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER |
487 |
Medium |
nl.tudelft.simulation.dsol.web.DsolWebServer
| Bug |
Category |
Details |
Line |
Priority |
| 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 |
| Unread field: nl.tudelft.simulation.dsol.web.DsolWebServer.dirtyControls |
PERFORMANCE |
URF_UNREAD_FIELD |
63 |
Medium |
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 |
| HTTP parameter written to Servlet output in nl.tudelft.simulation.dsol.web.DsolWebServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) |
SECURITY |
XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER |
583 |
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 |
139 |
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 |
389 |
Medium |
| nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getDragLine() may expose internal representation by returning HtmlAnimationPanel.dragLine |
MALICIOUS_CODE |
EI_EXPOSE_REP |
373 |
Medium |
| nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getElements() may expose internal representation by returning HtmlAnimationPanel.elements |
MALICIOUS_CODE |
EI_EXPOSE_REP |
365 |
Medium |
| nl.tudelft.simulation.dsol.web.animation.d2.HtmlAnimationPanel.getToggleButtons() may expose internal representation by returning HtmlAnimationPanel.toggleButtons |
MALICIOUS_CODE |
EI_EXPOSE_REP |
535 |
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 |
104 |
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 |
174 |
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 |
474 |
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 |
326 |
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 |
570 |
Medium |
| nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.getPreferredSize() may expose internal representation by returning HtmlGridPanel.preferredSize |
MALICIOUS_CODE |
EI_EXPOSE_REP |
530 |
Medium |
| nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.getSize() may expose internal representation by returning HtmlGridPanel.size |
MALICIOUS_CODE |
EI_EXPOSE_REP |
482 |
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 |
538 |
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 |
490 |
Medium |
| Test for floating point equality in nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.computeVisibleExtent(Bounds2d) |
STYLE |
FE_FLOATING_POINT_EQUALITY |
640 |
High |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.web.animation.d2.HtmlGridPanel.extent; locked 91% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
180 |
Medium |