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 |
92 |
67 |
0 |
0 |
nl.tudelft.simulation.dsol.demo.event.mm1.MM1Application
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.dsol.demo.event.mm1.MM1Application at new nl.tudelft.simulation.dsol.demo.event.mm1.MM1Application() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
33 |
Medium |
nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model at new nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model(DevsSimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
76 |
Medium |
Class nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model defines non-transient non-serializable instance field queue |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model$Entity
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model$Entity(MM1Model, int, double) may expose internal representation by storing an externally mutable object into MM1Model$Entity.this$0 |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
193 |
Medium |
Should nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model$Entity be a _static_ inner class? |
PERFORMANCE |
SIC_INNER_SHOULD_BE_STATIC |
193-219 |
Medium |
nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model$QueueEntry
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model$QueueEntry(MM1Model, Object, double) may expose internal representation by storing an externally mutable object into MM1Model$QueueEntry.this$0 |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
242 |
Medium |
Should nl.tudelft.simulation.dsol.demo.event.mm1.MM1Model$QueueEntry be a _static_ inner class? |
PERFORMANCE |
SIC_INNER_SHOULD_BE_STATIC |
242-268 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1Application
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.dsol.demo.flow.mm1.MM1Application at new nl.tudelft.simulation.dsol.demo.flow.mm1.MM1Application() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
46 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1Application.terminate() invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
58 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1ExperimentApplication
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.dsol.demo.flow.mm1.MM1ExperimentApplication at new nl.tudelft.simulation.dsol.demo.flow.mm1.MM1ExperimentApplication() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
60 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1ExperimentApplication.reportFinalStatistics() invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
114 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1ExperimentApplication.reportFinalStatistics() makes inefficient use of keySet iterator instead of entrySet iterator |
PERFORMANCE |
WMI_WRONG_MAP_ITERATOR |
105 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1Model
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.dsol.demo.flow.mm1.MM1Model at new nl.tudelft.simulation.dsol.demo.flow.mm1.MM1Model(DevsSimulator) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
75 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1SwingApplication
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.demo.flow.mm1.MM1SwingApplication(MM1Panel, MM1Model, DevsSimulator) may expose internal representation by storing an externally mutable object into MM1SwingApplication.model |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
44 |
Medium |
nl.tudelft.simulation.dsol.demo.flow.mm1.MM1SwingApplicationEvents
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.demo.flow.mm1.MM1SwingApplicationEvents(MM1Panel, MM1Model, DevsSimulator) may expose internal representation by storing an externally mutable object into MM1SwingApplicationEvents.model |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
51 |
Medium |
nl.tudelft.simulation.dsol.demo.visualization.VisualizationDemo
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.dsol.demo.visualization.VisualizationDemo at new nl.tudelft.simulation.dsol.demo.visualization.VisualizationDemo() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
52 |
Medium |
new nl.tudelft.simulation.dsol.demo.visualization.VisualizationDemo() invokes nl.tudelft.simulation.dsol.demo.visualization.VisualizationDemo$DrawObjectsThread.start() |
MT_CORRECTNESS |
SC_START_IN_CTOR |
64 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section25.Customer
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.tutorial.section25.Customer(DevsSimulatorInterface) may expose internal representation by storing an externally mutable object into Customer.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
30 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section25.CustomerOrderApp
Bug |
Category |
Details |
Line |
Priority |
nl.tudelft.simulation.dsol.tutorial.section25.CustomerOrderApp.notify(Event) invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
50 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section42.Customer
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.tutorial.section42.Customer(DevsSimulatorInterface, SellerInterface) may expose internal representation by storing an externally mutable object into Customer.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
48 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section42.Retailer
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.tutorial.section42.Retailer(DevsSimulatorInterface, SellerInterface) invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
87 |
Medium |
new nl.tudelft.simulation.dsol.tutorial.section42.Retailer(DevsSimulatorInterface, SellerInterface) may expose internal representation by storing an externally mutable object into Retailer.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
73 |
Medium |
Class nl.tudelft.simulation.dsol.tutorial.section42.Retailer defines non-transient non-serializable instance field orderingPolicy |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
nl.tudelft.simulation.dsol.tutorial.section42.policies.StationaryPolicy stored into non-transient field Retailer.orderingPolicy |
BAD_PRACTICE |
SE_BAD_FIELD_STORE |
75 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section42.Warehouse
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.tutorial.section42.Warehouse(DevsSimulatorInterface) may expose internal representation by storing an externally mutable object into Warehouse.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
35 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section42.Warehouse42Model
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.dsol.tutorial.section42.Warehouse42Model at new nl.tudelft.simulation.dsol.tutorial.section42.Warehouse42Model(DevsSimulator) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
50 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section42.policies.StationaryPolicy
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.dsol.tutorial.section42.policies.StationaryPolicy(SimulatorInterface) invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
42 |
Medium |
nl.tudelft.simulation.dsol.tutorial.section43.PredatorPreyModel
Bug |
Category |
Details |
Line |
Priority |
nl.tudelft.simulation.dsol.tutorial.section43.PredatorPreyModel.getChart() may expose internal representation by returning PredatorPreyModel.chart |
MALICIOUS_CODE |
EI_EXPOSE_REP |
88 |
Medium |
nl.tudelft.simulation.examples.dsol.animation.BallAnimation
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.examples.dsol.animation.BallAnimation at new nl.tudelft.simulation.examples.dsol.animation.BallAnimation(Ball, SimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
48 |
Medium |
Check for oddness that won't work for negative numbers in new nl.tudelft.simulation.examples.dsol.animation.BallAnimation(Ball, SimulatorInterface) |
STYLE |
IM_BAD_CHECK_FOR_ODD |
50 |
Medium |
nl.tudelft.simulation.examples.dsol.animation.BallModel
Bug |
Category |
Details |
Line |
Priority |
Class nl.tudelft.simulation.examples.dsol.animation.BallModel defines non-transient non-serializable instance field ballList |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
nl.tudelft.simulation.examples.dsol.animation.BallSwingApplication
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.examples.dsol.animation.BallSwingApplication at new nl.tudelft.simulation.examples.dsol.animation.BallSwingApplication(String, DsolPanel) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
46 |
Medium |
nl.tudelft.simulation.examples.dsol.animation.BallSwingApplication$1
Bug |
Category |
Details |
Line |
Priority |
Boxing/unboxing to parse a primitive nl.tudelft.simulation.examples.dsol.animation.BallSwingApplication$1.searchObject(String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
60 |
High |
nl.tudelft.simulation.examples.dsol.animation.DiscreteBall
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.examples.dsol.animation.DiscreteBall at new nl.tudelft.simulation.examples.dsol.animation.DiscreteBall(int, DevsSimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
66 |
Medium |
new nl.tudelft.simulation.examples.dsol.animation.DiscreteBall(int, DevsSimulatorInterface) may expose internal representation by storing an externally mutable object into DiscreteBall.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
55 |
Medium |
nl.tudelft.simulation.examples.dsol.animation.continuous.Ball
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.examples.dsol.animation.continuous.Ball(int, DessSimulatorInterface) may expose internal representation by storing an externally mutable object into Ball.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
49 |
Medium |
The class name nl.tudelft.simulation.examples.dsol.animation.continuous.Ball shadows the simple name of the superclass nl.tudelft.simulation.examples.dsol.animation.Ball |
BAD_PRACTICE |
NM_SAME_SIMPLE_NAME_AS_SUPERCLASS |
22-87 |
High |
nl.tudelft.simulation.examples.dsol.animation.gis.EsriCsvSwingApplication$EmptyModel
Bug |
Category |
Details |
Line |
Priority |
Hard coded reference to an absolute pathname in nl.tudelft.simulation.examples.dsol.animation.gis.EsriCsvSwingApplication$EmptyModel.constructModel() |
STYLE |
DMI_HARDCODED_ABSOLUTE_FILENAME |
104 |
Medium |
nl.tudelft.simulation.examples.dsol.animation.gis.EsriXmlSwingApplication$EmptyModel
Bug |
Category |
Details |
Line |
Priority |
Hard coded reference to an absolute pathname in nl.tudelft.simulation.examples.dsol.animation.gis.EsriXmlSwingApplication$EmptyModel.constructModel() |
STYLE |
DMI_HARDCODED_ABSOLUTE_FILENAME |
104 |
Medium |
nl.tudelft.simulation.examples.dsol.animation.gis.OsmSwingApplication$EmptyModel
Bug |
Category |
Details |
Line |
Priority |
Hard coded reference to an absolute pathname in nl.tudelft.simulation.examples.dsol.animation.gis.OsmSwingApplication$EmptyModel.constructModel() |
STYLE |
DMI_HARDCODED_ABSOLUTE_FILENAME |
104 |
Medium |
Hard coded reference to an absolute pathname in nl.tudelft.simulation.examples.dsol.animation.gis.OsmSwingApplication$EmptyModel.constructModel() |
STYLE |
DMI_HARDCODED_ABSOLUTE_FILENAME |
106 |
Medium |
nl.tudelft.simulation.examples.dsol.dess.DessModel
Bug |
Category |
Details |
Line |
Priority |
nl.tudelft.simulation.examples.dsol.dess.DessModel.getDistanceChart() may expose internal representation by returning DessModel.distanceChart |
MALICIOUS_CODE |
EI_EXPOSE_REP |
60 |
Medium |
nl.tudelft.simulation.examples.dsol.dess.DessPanel
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.examples.dsol.dess.DessPanel at new nl.tudelft.simulation.examples.dsol.dess.DessPanel(DessModel, DessSimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
42 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.Agv
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.examples.dsol.terminal.Agv(DevsSimulatorInterface, String, long, DistContinuous) may expose internal representation by storing an externally mutable object into Agv.agvTime |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
36 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.ConsoleRunnerTerminal
Bug |
Category |
Details |
Line |
Priority |
Dead store to seed in new nl.tudelft.simulation.examples.dsol.terminal.ConsoleRunnerTerminal() |
STYLE |
DLS_DEAD_LOCAL_STORE |
52 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.ConsoleRunnerTerminal.notify(Event) invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
87 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.ConsoleRunnerTerminal.terminate(DevsSimulator, int, int, int) invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
75 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.Container
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.examples.dsol.terminal.Container(DevsSimulatorInterface, int, QuayCrane, Agv, Ship) may expose internal representation by storing an externally mutable object into Container.agv |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
53 |
Medium |
new nl.tudelft.simulation.examples.dsol.terminal.Container(DevsSimulatorInterface, int, QuayCrane, Agv, Ship) may expose internal representation by storing an externally mutable object into Container.qc |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
52 |
Medium |
new nl.tudelft.simulation.examples.dsol.terminal.Container(DevsSimulatorInterface, int, QuayCrane, Agv, Ship) may expose internal representation by storing an externally mutable object into Container.ship |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
54 |
Medium |
new nl.tudelft.simulation.examples.dsol.terminal.Container(DevsSimulatorInterface, int, QuayCrane, Agv, Ship) may expose internal representation by storing an externally mutable object into Container.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
50 |
Medium |
Inconsistent synchronization of nl.tudelft.simulation.examples.dsol.terminal.Container.phase; locked 80% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
148 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.ExperimentRunnerTerminal
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.examples.dsol.terminal.ExperimentRunnerTerminal at new nl.tudelft.simulation.examples.dsol.terminal.ExperimentRunnerTerminal() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
82 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.ExperimentRunnerTerminal.notify(Event) invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
129 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.ExperimentRunnerTerminal.terminate(DevsSimulator, int, int, int, Terminal) invokes System.exit(...), which shuts down the entire virtual machine |
BAD_PRACTICE |
DM_EXIT |
112 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.IntResource
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.examples.dsol.terminal.IntResource(DevsSimulatorInterface, String, long) may expose internal representation by storing an externally mutable object into IntResource.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
85 |
Medium |
Inconsistent synchronization of nl.tudelft.simulation.examples.dsol.terminal.IntResource.claimedCapacity; locked 57% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
124 |
Medium |
Class nl.tudelft.simulation.examples.dsol.terminal.IntResource defines non-transient non-serializable instance field requests |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.QuayCrane
Bug |
Category |
Details |
Line |
Priority |
new nl.tudelft.simulation.examples.dsol.terminal.QuayCrane(DevsSimulatorInterface, String, long, DistContinuous) may expose internal representation by storing an externally mutable object into QuayCrane.qcTime |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
36 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.Terminal
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class nl.tudelft.simulation.examples.dsol.terminal.Terminal at new nl.tudelft.simulation.examples.dsol.terminal.Terminal(DevsSimulatorInterface, int) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
59 |
Medium |
nl.tudelft.simulation.examples.dsol.terminal.Terminal.getShip() may expose internal representation by returning Terminal.ship |
MALICIOUS_CODE |
EI_EXPOSE_REP |
100 |
Medium |
nl.tudelft.simulation.examples.dsol.timesharedcomputer.Cpu
Bug |
Category |
Details |
Line |
Priority |
nl.tudelft.simulation.examples.dsol.timesharedcomputer.Cpu.getQueue() may expose internal representation by returning Cpu.queue |
MALICIOUS_CODE |
EI_EXPOSE_REP |
80 |
Medium |
nl.tudelft.simulation.examples.dsol.timesharedcomputer.Job
Bug |
Category |
Details |
Line |
Priority |
nl.tudelft.simulation.examples.dsol.timesharedcomputer.Job.getOwner() may expose internal representation by returning Job.source |
MALICIOUS_CODE |
EI_EXPOSE_REP |
64 |
Medium |
new nl.tudelft.simulation.examples.dsol.timesharedcomputer.Job(String, DistContinuous, FlowObject, double) may expose internal representation by storing an externally mutable object into Job.source |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
35 |
Medium |
nl.tudelft.simulation.examples.dsol.timesharedcomputer.Terminal
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from nl.tudelft.simulation.dsol.formalisms.flow.Entity<java.lang.Double> to nl.tudelft.simulation.examples.dsol.timesharedcomputer.Job in nl.tudelft.simulation.examples.dsol.timesharedcomputer.Terminal.receiveEntity(Entity) |
STYLE |
BC_UNCONFIRMED_CAST |
60 |
Medium |
new nl.tudelft.simulation.examples.dsol.timesharedcomputer.Terminal(DevsSimulatorInterface, FlowObject, DistContinuous, DistContinuous) may expose internal representation by storing an externally mutable object into Terminal.jobSize |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
51 |
Medium |
new nl.tudelft.simulation.examples.dsol.timesharedcomputer.Terminal(DevsSimulatorInterface, FlowObject, DistContinuous, DistContinuous) may expose internal representation by storing an externally mutable object into Terminal.thinkDelay |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
50 |
Medium |