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 |
| 21 |
26 |
0 |
0 |
nl.tudelft.simulation.dsol.formalisms.devs.AtomicModel
| Bug |
Category |
Details |
Line |
Priority |
| new nl.tudelft.simulation.dsol.formalisms.devs.AtomicModel(String, CoupledModel, Number, Phase, boolean) may expose internal representation by storing an externally mutable object into AtomicModel.phase |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
152 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.devs.AtomicModel(String, DevsSimulatorInterface, Number, Phase, boolean) may expose internal representation by storing an externally mutable object into AtomicModel.phase |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
135 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.Phase
| Bug |
Category |
Details |
Line |
Priority |
| new nl.tudelft.simulation.dsol.formalisms.devs.Phase(String) invokes inefficient new String(String) constructor |
PERFORMANCE |
DM_STRING_CTOR |
36 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsModel
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsModel.getParentModel() may expose internal representation by returning AbstractDevsModel.parentModel |
MALICIOUS_CODE |
EI_EXPOSE_REP |
132 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsModel.getSimulator() may expose internal representation by returning AbstractDevsModel.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP |
116 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsModel(String, DevsSimulatorInterface, CoupledModel) may expose internal representation by storing an externally mutable object into AbstractDevsModel.parentModel |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
103 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsModel(String, DevsSimulatorInterface, CoupledModel) may expose internal representation by storing an externally mutable object into AbstractDevsModel.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
102 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsModel.setSimulator(DevsSimulatorInterface) may expose internal representation by storing an externally mutable object into AbstractDevsModel.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
124 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsPortModel
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsPortModel.getInputPortMap() may expose internal representation by returning AbstractDevsPortModel.inputPortMap |
MALICIOUS_CODE |
EI_EXPOSE_REP |
119 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.AbstractDevsPortModel.getOutputPortMap() may expose internal representation by returning AbstractDevsPortModel.outputPortMap |
MALICIOUS_CODE |
EI_EXPOSE_REP |
127 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.CoupledModel
| Bug |
Category |
Details |
Line |
Priority |
| Using pointer equality to compare a InputPortInterface<T,TYPE> with a AbstractDevsModel<T> in nl.tudelft.simulation.dsol.formalisms.devs.esdevs.CoupledModel.removeInternalCoupling(OutputPortInterface, InputPortInterface) |
CORRECTNESS |
EC_UNRELATED_TYPES_USING_POINTER_EQUALITY |
173 |
Medium |
| Using pointer equality to compare a OutputPortInterface<T,TYPE> with a AbstractDevsModel<T> in nl.tudelft.simulation.dsol.formalisms.devs.esdevs.CoupledModel.removeInternalCoupling(OutputPortInterface, InputPortInterface) |
CORRECTNESS |
EC_UNRELATED_TYPES_USING_POINTER_EQUALITY |
173 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.CoupledModel.getExternalInputCouplingSet() may expose internal representation by returning CoupledModel.externalInputCouplingSet |
MALICIOUS_CODE |
EI_EXPOSE_REP |
401 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.CoupledModel.getExternalOutputCouplingSet() may expose internal representation by returning CoupledModel.externalOutputCouplingSet |
MALICIOUS_CODE |
EI_EXPOSE_REP |
393 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.CoupledModel.getInternalCouplingSet() may expose internal representation by returning CoupledModel.internalCouplingSet |
MALICIOUS_CODE |
EI_EXPOSE_REP |
385 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.CoupledModel.getModelComponents() may expose internal representation by returning CoupledModel.modelComponents |
MALICIOUS_CODE |
EI_EXPOSE_REP |
409 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.ExternalInputCoupling
| Bug |
Category |
Details |
Line |
Priority |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.devs.esdevs.ExternalInputCoupling at new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.ExternalInputCoupling(InputPortInterface, InputPortInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
39 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.ExternalOutputCoupling
| Bug |
Category |
Details |
Line |
Priority |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.devs.esdevs.ExternalOutputCoupling at new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.ExternalOutputCoupling(OutputPortInterface, OutputPortInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
39 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InputPort
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InputPort.getModel() may expose internal representation by returning InputPort.model |
MALICIOUS_CODE |
EI_EXPOSE_REP |
165 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InputPort(AtomicModel) may expose internal representation by storing an externally mutable object into InputPort.model |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
51 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InputPort(CoupledModel) may expose internal representation by storing an externally mutable object into InputPort.model |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
41 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InputPort.receive(Object, Number) calls Thread.sleep() with a lock held |
MT_CORRECTNESS |
SWL_SLEEP_WITH_LOCK_HELD |
72 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InternalCoupling
| Bug |
Category |
Details |
Line |
Priority |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InternalCoupling at new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.InternalCoupling(OutputPortInterface, InputPortInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
38 |
Medium |
nl.tudelft.simulation.dsol.formalisms.devs.esdevs.OutputPort
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.devs.esdevs.OutputPort.getModel() may expose internal representation by returning OutputPort.model |
MALICIOUS_CODE |
EI_EXPOSE_REP |
73 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.OutputPort(AtomicModel) may expose internal representation by storing an externally mutable object into OutputPort.model |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
43 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.devs.esdevs.OutputPort(CoupledModel) may expose internal representation by storing an externally mutable object into OutputPort.model |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
34 |
Medium |