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 |
| 33 |
76 |
0 |
0 |
nl.tudelft.simulation.dsol.formalisms.flow.AbstractFlowModel
| Bug |
Category |
Details |
Line |
Priority |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.flow.AbstractFlowModel at new nl.tudelft.simulation.dsol.formalisms.flow.AbstractFlowModel(SimulatorInterface, StreamInformation, FlowModel$BlockNamingType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
64 |
Medium |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.flow.AbstractFlowModel at new nl.tudelft.simulation.dsol.formalisms.flow.AbstractFlowModel(SimulatorInterface, FlowModel$BlockNamingType) 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 |
| nl.tudelft.simulation.dsol.formalisms.flow.AbstractFlowModel.getBlockMap() may expose internal representation by returning AbstractFlowModel.blockMap |
MALICIOUS_CODE |
EI_EXPOSE_REP |
84 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Block
| Bug |
Category |
Details |
Line |
Priority |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.flow.Block at new nl.tudelft.simulation.dsol.formalisms.flow.Block(String, DevsSimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
45 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Block.getSimulator() may expose internal representation by returning Block.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP |
63 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.flow.Block(String, DevsSimulatorInterface) may expose internal representation by storing an externally mutable object into Block.simulator |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
48 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.CapacityRequest
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.CapacityRequest.getEntity() may expose internal representation by returning CapacityRequest.entity |
MALICIOUS_CODE |
EI_EXPOSE_REP |
80 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.flow.CapacityRequest(long, Entity, Number, int, Number) may expose internal representation by storing an externally mutable object into CapacityRequest.entity |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
47 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Create
| Bug |
Category |
Details |
Line |
Priority |
| This write of the 64-bit primitive variable "maxNumberCreationEvents" may not be atomic |
MT_CORRECTNESS |
AT_NONATOMIC_64BIT_PRIMITIVE |
228 |
Medium |
| This write of the 64-bit primitive variable "maxNumberGeneratedEntities" may not be atomic |
MT_CORRECTNESS |
AT_NONATOMIC_64BIT_PRIMITIVE |
239 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Create.getBatchSizeDist() may expose internal representation by returning Create.batchSizeDist |
MALICIOUS_CODE |
EI_EXPOSE_REP |
284 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Create.getCountStatistic() may expose internal representation by returning Create.countStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
385 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Create.getIntervalDist() may expose internal representation by returning Create.intervalDist |
MALICIOUS_CODE |
EI_EXPOSE_REP |
293 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Create.getStartTimeDist() may expose internal representation by returning Create.startTimeDist |
MALICIOUS_CODE |
EI_EXPOSE_REP |
320 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Create.setBatchSizeDist(DistDiscrete) may expose internal representation by storing an externally mutable object into Create.batchSizeDist |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
217 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Create.setIntervalDist(DistContinuousSimulationTime) may expose internal representation by storing an externally mutable object into Create.intervalDist |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
183 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Create.setStartTimeDist(DistContinuousSimulationTime) may expose internal representation by storing an externally mutable object into Create.startTimeDist |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
144 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Create.endTime; locked 50% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
339 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Create.entitySupplier; locked 66% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
125 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Delay
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Delay.getDelayDistribution() may expose internal representation by returning Delay.delayDistribution |
MALICIOUS_CODE |
EI_EXPOSE_REP |
123 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Delay.getDelayedEntityList() may expose internal representation by returning Delay.delayedEntityList |
MALICIOUS_CODE |
EI_EXPOSE_REP |
132 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Delay.getNumberDelayedStatistic() may expose internal representation by returning Delay.numberDelayedStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
159 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Delay.setDelayDistribution(DistContinuousSimulationTime) may expose internal representation by storing an externally mutable object into Delay.delayDistribution |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
65 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Delay.delayDistribution; locked 50% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
65 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Delay.delayFunction; locked 75% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
75 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Destroy
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Destroy.getTimeInSystemStatistic() may expose internal representation by returning Destroy.timeInSystemStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
81 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Duplicate
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Duplicate.getCountDuplicateReleasedStatistic() may expose internal representation by returning Duplicate.countDuplicateReleasedStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
154 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Duplicate.getDuplicateDestination() may expose internal representation by returning Duplicate.duplicateDestination |
MALICIOUS_CODE |
EI_EXPOSE_REP |
163 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Duplicate.getNumberCopiesDist() may expose internal representation by returning Duplicate.numberCopiesDist |
MALICIOUS_CODE |
EI_EXPOSE_REP |
172 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Duplicate.setDuplicateDestination(FlowBlock) may expose internal representation by storing an externally mutable object into Duplicate.duplicateDestination |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
64 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Duplicate.setNumberCopiesDist(DistDiscrete) may expose internal representation by storing an externally mutable object into Duplicate.numberCopiesDist |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
76 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Duplicate.duplicateDestination; locked 50% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
163 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Duplicate.duplicateReleaseFunction; locked 66% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
100 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Entity
nl.tudelft.simulation.dsol.formalisms.flow.FlowBlock
| Bug |
Category |
Details |
Line |
Priority |
| Operation on the "numberEntitiesInMinusOut" shared variable in "FlowBlock" class is not atomic |
MT_CORRECTNESS |
AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE |
112 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.FlowBlock.getCountReceivedStatistic() may expose internal representation by returning FlowBlock.countReceivedStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
270 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.FlowBlock.getCountReleasedStatistic() may expose internal representation by returning FlowBlock.countReleasedStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
279 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.FlowBlock.getDestination() may expose internal representation by returning FlowBlock.destination |
MALICIOUS_CODE |
EI_EXPOSE_REP |
261 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.FlowBlock.setDestination(FlowBlock) may expose internal representation by storing an externally mutable object into FlowBlock.destination |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
127 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.FlowBlock.destination; locked 50% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
261 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.FlowBlock.releaseFunction; locked 66% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
102 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Queue
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Queue.getQueueLengthStatistic() may expose internal representation by returning Queue.queueLengthStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
175 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Queue.getTimeInQueueStatistic() may expose internal representation by returning Queue.timeInQueueStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
184 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Queue$FcfsPriorityRequestComparator
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Queue$FcfsPriorityRequestComparator implements Comparator but not Serializable |
BAD_PRACTICE |
SE_COMPARATOR_SHOULD_BE_SERIALIZABLE |
230-241 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Queue$FcfsRequestComparator
nl.tudelft.simulation.dsol.formalisms.flow.Queue$LcfsPriorityRequestComparator
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Queue$LcfsPriorityRequestComparator implements Comparator but not Serializable |
BAD_PRACTICE |
SE_COMPARATOR_SHOULD_BE_SERIALIZABLE |
250-261 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Queue$LcfsRequestComparator
nl.tudelft.simulation.dsol.formalisms.flow.Release$DoubleCapacity
| Bug |
Category |
Details |
Line |
Priority |
| This write of the 64-bit primitive variable "fixedCapacityRelease" may not be atomic |
MT_CORRECTNESS |
AT_NONATOMIC_64BIT_PRIMITIVE |
100 |
Medium |
| This write of the 64-bit primitive variable "fixedCapacityRelease" may not be atomic |
MT_CORRECTNESS |
AT_NONATOMIC_64BIT_PRIMITIVE |
116 |
Medium |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.flow.Release$DoubleCapacity at new nl.tudelft.simulation.dsol.formalisms.flow.Release$DoubleCapacity(String, DevsSimulatorInterface, Resource$DoubleCapacity) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
89 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Release$DoubleCapacity.getResource() may expose internal representation by returning Release$DoubleCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP |
128 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.flow.Release$DoubleCapacity(String, DevsSimulatorInterface, Resource$DoubleCapacity) may expose internal representation by storing an externally mutable object into Release$DoubleCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
88 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Release$IntegerCapacity
| Bug |
Category |
Details |
Line |
Priority |
| Shared primitive variable "fixedCapacityRelease" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
198 |
Medium |
| Shared primitive variable "fixedCapacityRelease" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
214 |
Medium |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.flow.Release$IntegerCapacity at new nl.tudelft.simulation.dsol.formalisms.flow.Release$IntegerCapacity(String, DevsSimulatorInterface, Resource$IntegerCapacity) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
187 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Release$IntegerCapacity.getResource() may expose internal representation by returning Release$IntegerCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP |
226 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.flow.Release$IntegerCapacity(String, DevsSimulatorInterface, Resource$IntegerCapacity) may expose internal representation by storing an externally mutable object into Release$IntegerCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
186 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Resource
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Resource.getRequestQueue() may expose internal representation by returning Resource.requestQueue |
MALICIOUS_CODE |
EI_EXPOSE_REP |
60 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Resource.getUtilizationStatistic() may expose internal representation by returning Resource.utilizationStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
130 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Resource$DoubleCapacity
| Bug |
Category |
Details |
Line |
Priority |
| This write of the 64-bit primitive variable "capacity" may not be atomic |
MT_CORRECTNESS |
AT_NONATOMIC_64BIT_PRIMITIVE |
205 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Resource$DoubleCapacity.claimedCapacity; locked 60% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
180 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Resource$IntegerCapacity
| Bug |
Category |
Details |
Line |
Priority |
| Shared primitive variable "capacity" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
367 |
Medium |
| Inconsistent synchronization of nl.tudelft.simulation.dsol.formalisms.flow.Resource$IntegerCapacity.claimedCapacity; locked 50% of time |
MT_CORRECTNESS |
IS2_INCONSISTENT_SYNC |
422 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Seize
| Bug |
Category |
Details |
Line |
Priority |
| nl.tudelft.simulation.dsol.formalisms.flow.Seize.getNumberStoredStatistic() may expose internal representation by returning Seize.numberStoredStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
116 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Seize.getStorage() may expose internal representation by returning Seize.storage |
MALICIOUS_CODE |
EI_EXPOSE_REP |
72 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Seize.getStorageTimeStatistic() may expose internal representation by returning Seize.storageTimeStatistic |
MALICIOUS_CODE |
EI_EXPOSE_REP |
125 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Seize$DoubleCapacity
| Bug |
Category |
Details |
Line |
Priority |
| This write of the 64-bit primitive variable "fixedCapacityClaim" may not be atomic |
MT_CORRECTNESS |
AT_NONATOMIC_64BIT_PRIMITIVE |
166 |
Medium |
| This write of the 64-bit primitive variable "fixedCapacityClaim" may not be atomic |
MT_CORRECTNESS |
AT_NONATOMIC_64BIT_PRIMITIVE |
182 |
Medium |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.flow.Seize$DoubleCapacity at new nl.tudelft.simulation.dsol.formalisms.flow.Seize$DoubleCapacity(String, DevsSimulatorInterface, Resource$DoubleCapacity) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
155 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Seize$DoubleCapacity.getResource() may expose internal representation by returning Seize$DoubleCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP |
194 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.flow.Seize$DoubleCapacity(String, DevsSimulatorInterface, Resource$DoubleCapacity) may expose internal representation by storing an externally mutable object into Seize$DoubleCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
154 |
Medium |
nl.tudelft.simulation.dsol.formalisms.flow.Seize$IntegerCapacity
| Bug |
Category |
Details |
Line |
Priority |
| Shared primitive variable "fixedCapacityClaim" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
291 |
Medium |
| Shared primitive variable "fixedCapacityClaim" in one thread may not yield the value of the most recent write from another thread |
MT_CORRECTNESS |
AT_STALE_THREAD_WRITE_OF_PRIMITIVE |
307 |
Medium |
| Exception thrown in class nl.tudelft.simulation.dsol.formalisms.flow.Seize$IntegerCapacity at new nl.tudelft.simulation.dsol.formalisms.flow.Seize$IntegerCapacity(String, DevsSimulatorInterface, Resource$IntegerCapacity) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
280 |
Medium |
| nl.tudelft.simulation.dsol.formalisms.flow.Seize$IntegerCapacity.getResource() may expose internal representation by returning Seize$IntegerCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP |
319 |
Medium |
| new nl.tudelft.simulation.dsol.formalisms.flow.Seize$IntegerCapacity(String, DevsSimulatorInterface, Resource$IntegerCapacity) may expose internal representation by storing an externally mutable object into Seize$IntegerCapacity.resource |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
279 |
Medium |