SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.9.1
Threshold is medium
Effort is default
Summary
| Classes | Bugs | Errors | Missing Classes |
|---|---|---|---|
| 237 | 129 | 0 | 0 |
Files
org.opentrafficsim.core.compatibility.GtuCompatibility
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.compatibility.GtuCompatibility at new org.opentrafficsim.core.compatibility.GtuCompatibility(HierarchicalType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 41 | Medium |
org.opentrafficsim.core.compatibility.GtuCompatibleInfraType
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.compatibility.GtuCompatibleInfraType.getGtuCompatibility() may expose internal representation by returning GtuCompatibleInfraType.gtuCompatibility | MALICIOUS_CODE | EI_EXPOSE_REP | 107 | Medium |
org.opentrafficsim.core.distributions.ObjectDistribution
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.distributions.ObjectDistribution at new org.opentrafficsim.core.distributions.ObjectDistribution(List, StreamInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 41 | Medium |
| Exception thrown in class org.opentrafficsim.core.distributions.ObjectDistribution at new org.opentrafficsim.core.distributions.ObjectDistribution(StreamInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 56 | Medium |
| new org.opentrafficsim.core.distributions.ObjectDistribution(StreamInterface) may expose internal representation by storing an externally mutable object into ObjectDistribution.stream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 57 | Medium |
org.opentrafficsim.core.dsol.AbstractOtsModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.dsol.AbstractOtsModel at new org.opentrafficsim.core.dsol.AbstractOtsModel(OtsSimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 32 | Medium |
| Exception thrown in class org.opentrafficsim.core.dsol.AbstractOtsModel at new org.opentrafficsim.core.dsol.AbstractOtsModel(OtsSimulatorInterface, String, String, StreamInformation) 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 |
org.opentrafficsim.core.dsol.OtsAnimator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Shared primitive variable "lastReplication" in one thread may not yield the value of the most recent write from another thread | MT_CORRECTNESS | AT_STALE_THREAD_WRITE_OF_PRIMITIVE | 46 | Medium |
org.opentrafficsim.core.dsol.OtsReplication
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.dsol.OtsReplication at new org.opentrafficsim.core.dsol.OtsReplication(String, Time, Duration, Duration, HistoryManager) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 41 | Medium |
| org.opentrafficsim.core.dsol.OtsReplication.getStartTimeAbs() may expose internal representation by returning OtsReplication.startTimeAbs | MALICIOUS_CODE | EI_EXPOSE_REP | 62 | Medium |
| new org.opentrafficsim.core.dsol.OtsReplication(String, Time, Duration, Duration, HistoryManager) may expose internal representation by storing an externally mutable object into OtsReplication.startTimeAbs | MALICIOUS_CODE | EI_EXPOSE_REP2 | 42 | Medium |
org.opentrafficsim.core.dsol.OtsSimulator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Shared primitive variable "lastReplication" in one thread may not yield the value of the most recent write from another thread | MT_CORRECTNESS | AT_STALE_THREAD_WRITE_OF_PRIMITIVE | 44 | Medium |
org.opentrafficsim.core.geometry.Ots2dSet
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.geometry.Ots2dSet at new org.opentrafficsim.core.geometry.Ots2dSet(Bounds2d, double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 54 | Medium |
| Possible null pointer dereference of boundingBox in new org.opentrafficsim.core.geometry.Ots2dSet(Bounds2d, double) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 55 | High |
org.opentrafficsim.core.gtu.Gtu
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| This write of the 64-bit primitive variable "alignStep" may not atomic | MT_CORRECTNESS | AT_NONATOMIC_64BIT_PRIMITIVE | 1057 | Medium |
| Shared primitive variable "destroyed" in one thread may not yield the value of the most recent write from another thread | MT_CORRECTNESS | AT_STALE_THREAD_WRITE_OF_PRIMITIVE | 407 | Medium |
| Exception thrown in class org.opentrafficsim.core.gtu.Gtu at new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Length, Speed) 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 |
| Exception thrown in class org.opentrafficsim.core.gtu.Gtu at new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Length, Polygon2d, Speed) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 186 | Medium |
| Exception thrown in class org.opentrafficsim.core.gtu.Gtu at new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Polygon2d, Speed) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 257 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getAcceleration(Duration) may expose internal representation by returning Gtu.cachedAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 803 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getLength() may expose internal representation by returning Gtu.length | MALICIOUS_CODE | EI_EXPOSE_REP | 360 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getMaximumAcceleration() may expose internal representation by returning Gtu.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 813 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getMaximumDeceleration() may expose internal representation by returning Gtu.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 835 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getMaximumSpeed() may expose internal representation by returning Gtu.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 378 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getParameters() may expose internal representation by returning Gtu.parameters | MALICIOUS_CODE | EI_EXPOSE_REP | 575 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getPerceivableContext() may expose internal representation by returning Gtu.perceivableContext | MALICIOUS_CODE | EI_EXPOSE_REP | 964 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getSpeed(Duration) may expose internal representation by returning Gtu.cachedSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 744 | Medium |
| org.opentrafficsim.core.gtu.Gtu.getWidth() may expose internal representation by returning Gtu.width | MALICIOUS_CODE | EI_EXPOSE_REP | 369 | Medium |
| org.opentrafficsim.core.gtu.Gtu.setMaximumAcceleration(Acceleration) may expose internal representation by storing an externally mutable object into Gtu.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 826 | Medium |
| org.opentrafficsim.core.gtu.Gtu.setMaximumDeceleration(Acceleration) may expose internal representation by storing an externally mutable object into Gtu.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 849 | Medium |
| org.opentrafficsim.core.gtu.Gtu.setParameters(Parameters) may expose internal representation by storing an externally mutable object into Gtu.parameters | MALICIOUS_CODE | EI_EXPOSE_REP2 | 584 | Medium |
| org.opentrafficsim.core.gtu.Gtu.setParent(Gtu) may expose internal representation by storing an externally mutable object into Gtu.parent | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1003 | Medium |
| Exception is caught when Exception is not thrown in org.opentrafficsim.core.gtu.Gtu.move(DirectedPoint2d) | STYLE | REC_CATCH_EXCEPTION | 490 | Medium |
org.opentrafficsim.core.gtu.GtuCharacteristics
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.gtu.GtuCharacteristics.getFront() may expose internal representation by returning GtuCharacteristics.front | MALICIOUS_CODE | EI_EXPOSE_REP | 122 | Medium |
| org.opentrafficsim.core.gtu.GtuCharacteristics.getLength() may expose internal representation by returning GtuCharacteristics.length | MALICIOUS_CODE | EI_EXPOSE_REP | 77 | Medium |
| org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumAcceleration() may expose internal representation by returning GtuCharacteristics.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 104 | Medium |
| org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumDeceleration() may expose internal representation by returning GtuCharacteristics.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 113 | Medium |
| org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumSpeed() may expose internal representation by returning GtuCharacteristics.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 95 | Medium |
| org.opentrafficsim.core.gtu.GtuCharacteristics.getWidth() may expose internal representation by returning GtuCharacteristics.width | MALICIOUS_CODE | EI_EXPOSE_REP | 86 | Medium |
| new org.opentrafficsim.core.gtu.GtuCharacteristics(GtuType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GtuCharacteristics.front | MALICIOUS_CODE | EI_EXPOSE_REP2 | 59 | Medium |
| new org.opentrafficsim.core.gtu.GtuCharacteristics(GtuType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GtuCharacteristics.length | MALICIOUS_CODE | EI_EXPOSE_REP2 | 54 | Medium |
| new org.opentrafficsim.core.gtu.GtuCharacteristics(GtuType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GtuCharacteristics.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 57 | Medium |
| new org.opentrafficsim.core.gtu.GtuCharacteristics(GtuType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GtuCharacteristics.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 58 | Medium |
| new org.opentrafficsim.core.gtu.GtuCharacteristics(GtuType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GtuCharacteristics.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
| new org.opentrafficsim.core.gtu.GtuCharacteristics(GtuType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GtuCharacteristics.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
org.opentrafficsim.core.gtu.GtuDumper
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.gtu.GtuDumper at new org.opentrafficsim.core.gtu.GtuDumper(Duration, Duration, Network, String) 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 |
| Found reliance on default encoding in org.opentrafficsim.core.gtu.GtuDumper.dump(): new java.io.PrintWriter(File) | I18N | DM_DEFAULT_ENCODING | 36 | High |
| new org.opentrafficsim.core.gtu.GtuDumper(Duration, Duration, Network, String) may expose internal representation by storing an externally mutable object into GtuDumper.interval | MALICIOUS_CODE | EI_EXPOSE_REP2 | 84 | Medium |
| new org.opentrafficsim.core.gtu.GtuDumper(Duration, Duration, Network, String) may expose internal representation by storing an externally mutable object into GtuDumper.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 85 | Medium |
| Format string should use %n rather than \n in org.opentrafficsim.core.gtu.GtuDumper.dump() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 40 | Medium |
org.opentrafficsim.core.gtu.GtuTemplate
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.gtu.GtuTemplate at new org.opentrafficsim.core.gtu.GtuTemplate(GtuType, Supplier, Supplier, Supplier) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 51 | Medium |
| Exception thrown in class org.opentrafficsim.core.gtu.GtuTemplate at new org.opentrafficsim.core.gtu.GtuTemplate(GtuType, Supplier, Supplier, Supplier, Supplier, Supplier) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 69 | Medium |
org.opentrafficsim.core.gtu.RelativePosition
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.gtu.RelativePosition.dx() may expose internal representation by returning RelativePosition.dx | MALICIOUS_CODE | EI_EXPOSE_REP | 21 | Medium |
| org.opentrafficsim.core.gtu.RelativePosition.dy() may expose internal representation by returning RelativePosition.dy | MALICIOUS_CODE | EI_EXPOSE_REP | 21 | Medium |
| org.opentrafficsim.core.gtu.RelativePosition.dz() may expose internal representation by returning RelativePosition.dz | MALICIOUS_CODE | EI_EXPOSE_REP | 21 | Medium |
| new org.opentrafficsim.core.gtu.RelativePosition(Length, Length, Length, RelativePosition$Type) may expose internal representation by storing an externally mutable object into RelativePosition.dx | MALICIOUS_CODE | EI_EXPOSE_REP2 | 21 | Medium |
| new org.opentrafficsim.core.gtu.RelativePosition(Length, Length, Length, RelativePosition$Type) may expose internal representation by storing an externally mutable object into RelativePosition.dy | MALICIOUS_CODE | EI_EXPOSE_REP2 | 21 | Medium |
| new org.opentrafficsim.core.gtu.RelativePosition(Length, Length, Length, RelativePosition$Type) may expose internal representation by storing an externally mutable object into RelativePosition.dz | MALICIOUS_CODE | EI_EXPOSE_REP2 | 21 | Medium |
org.opentrafficsim.core.gtu.perception.AbstractPerception
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.gtu.perception.AbstractPerception.getGtu() may expose internal representation by returning AbstractPerception.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 47 | Medium |
| new org.opentrafficsim.core.gtu.perception.AbstractPerception(Gtu) may expose internal representation by storing an externally mutable object into AbstractPerception.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 40 | Medium |
| org.opentrafficsim.core.gtu.perception.AbstractPerception.contains(Class) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 71 | Medium |
| org.opentrafficsim.core.gtu.perception.AbstractPerception.getPerceptionCategoryOrNull(Class) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 105 | Medium |
org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory.getPerception() may expose internal representation by returning AbstractPerceptionCategory.perception | MALICIOUS_CODE | EI_EXPOSE_REP | 57 | Medium |
| new org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory(Perception) may expose internal representation by storing an externally mutable object into AbstractPerceptionCategory.perception | MALICIOUS_CODE | EI_EXPOSE_REP2 | 47 | Medium |
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.gtu.plan.operational.OperationalPlan at new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(Gtu, OtsLine2d, Duration, Segments) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 128 | Medium |
| org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getStartTime() may expose internal representation by returning OperationalPlan.startTime | MALICIOUS_CODE | EI_EXPOSE_REP | 183 | Medium |
| org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalDuration() may expose internal representation by returning OperationalPlan.totalDuration | MALICIOUS_CODE | EI_EXPOSE_REP | 210 | Medium |
| org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalLength() may expose internal representation by returning OperationalPlan.totalLength | MALICIOUS_CODE | EI_EXPOSE_REP | 219 | Medium |
| new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(Gtu, OtsLine2d, Duration, Segments) may expose internal representation by storing an externally mutable object into OperationalPlan.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 101 | Medium |
| new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(Gtu, OtsLine2d, Duration, Segments) may expose internal representation by storing an externally mutable object into OperationalPlan.segments | MALICIOUS_CODE | EI_EXPOSE_REP2 | 131 | Medium |
| new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(Gtu, OtsLine2d, Duration, Segments) may expose internal representation by storing an externally mutable object into OperationalPlan.startTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 102 | Medium |
| Redundant nullcheck of p, which is known to be non-null in org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.timeAtPoint(DirectedPoint2d, boolean) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 472 | Medium |
org.opentrafficsim.core.gtu.plan.operational.Segment
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.gtu.plan.operational.Segment.acceleration() may expose internal representation by returning Segment.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 27 | Medium |
| org.opentrafficsim.core.gtu.plan.operational.Segment.duration() may expose internal representation by returning Segment.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 27 | Medium |
| org.opentrafficsim.core.gtu.plan.operational.Segment.durationAtDistance(Length) may expose internal representation by returning Segment.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 119 | Medium |
| org.opentrafficsim.core.gtu.plan.operational.Segment.startSpeed() may expose internal representation by returning Segment.startSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 27 | Medium |
| new org.opentrafficsim.core.gtu.plan.operational.Segment(boolean, Speed, Duration, Acceleration) may expose internal representation by storing an externally mutable object into Segment.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 27 | Medium |
| new org.opentrafficsim.core.gtu.plan.operational.Segment(boolean, Speed, Duration, Acceleration) may expose internal representation by storing an externally mutable object into Segment.duration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 27 | Medium |
| new org.opentrafficsim.core.gtu.plan.operational.Segment(boolean, Speed, Duration, Acceleration) may expose internal representation by storing an externally mutable object into Segment.startSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 27 | Medium |
org.opentrafficsim.core.math.Acceleration3d
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.math.Acceleration3d at new org.opentrafficsim.core.math.Acceleration3d(AccelerationVector) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 44 | Medium |
| new org.opentrafficsim.core.math.Acceleration3d(AccelerationVector) may expose internal representation by storing an externally mutable object into Acceleration3d.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 | Medium |
org.opentrafficsim.core.math.Angle3d
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.math.Angle3d at new org.opentrafficsim.core.math.Angle3d(AngleVector) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 36 | Medium |
| new org.opentrafficsim.core.math.Angle3d(AngleVector) may expose internal representation by storing an externally mutable object into Angle3d.rotation | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
org.opentrafficsim.core.math.Direction3d
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.math.Direction3d at new org.opentrafficsim.core.math.Direction3d(DirectionVector) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 36 | Medium |
| new org.opentrafficsim.core.math.Direction3d(DirectionVector) may expose internal representation by storing an externally mutable object into Direction3d.rotation | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
org.opentrafficsim.core.math.Speed3d
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.math.Speed3d at new org.opentrafficsim.core.math.Speed3d(SpeedVector) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 43 | Medium |
| new org.opentrafficsim.core.math.Speed3d(SpeedVector) may expose internal representation by storing an externally mutable object into Speed3d.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | Medium |
org.opentrafficsim.core.network.CapacityLink
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.network.CapacityLink.getCapacity() may expose internal representation by returning CapacityLink.capacity | MALICIOUS_CODE | EI_EXPOSE_REP | 46 | Medium |
| new org.opentrafficsim.core.network.CapacityLink(Network, String, Node, Node, LinkType, OtsLine2d, ContinuousPiecewiseLinearFunction, Frequency) may expose internal representation by storing an externally mutable object into CapacityLink.capacity | MALICIOUS_CODE | EI_EXPOSE_REP2 | 40 | Medium |
| org.opentrafficsim.core.network.CapacityLink.setCapacity(Frequency) may expose internal representation by storing an externally mutable object into CapacityLink.capacity | MALICIOUS_CODE | EI_EXPOSE_REP2 | 52 | Medium |
| org.opentrafficsim.core.network.CapacityLink doesn't override Link.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
org.opentrafficsim.core.network.Connector
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.network.Connector at new org.opentrafficsim.core.network.Connector(Network, String, Node, Node, LinkType) 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 |
| org.opentrafficsim.core.network.Connector doesn't override Link.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
org.opentrafficsim.core.network.Link
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.network.Link at new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, ContinuousPiecewiseLinearFunction) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 103 | Medium |
| org.opentrafficsim.core.network.Link.getEndNode() may expose internal representation by returning Link.endNode | MALICIOUS_CODE | EI_EXPOSE_REP | 215 | Medium |
| org.opentrafficsim.core.network.Link.getNetwork() may expose internal representation by returning Link.network | MALICIOUS_CODE | EI_EXPOSE_REP | 191 | Medium |
| org.opentrafficsim.core.network.Link.getStartNode() may expose internal representation by returning Link.startNode | MALICIOUS_CODE | EI_EXPOSE_REP | 206 | Medium |
| org.opentrafficsim.core.network.Link.getType() may expose internal representation by returning Link.linkType | MALICIOUS_CODE | EI_EXPOSE_REP | 221 | Medium |
| new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, ContinuousPiecewiseLinearFunction) may expose internal representation by storing an externally mutable object into Link.endNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 113 | Medium |
| new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, ContinuousPiecewiseLinearFunction) may expose internal representation by storing an externally mutable object into Link.linkType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 114 | Medium |
| new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, ContinuousPiecewiseLinearFunction) may expose internal representation by storing an externally mutable object into Link.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 110 | Medium |
| new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, ContinuousPiecewiseLinearFunction) may expose internal representation by storing an externally mutable object into Link.startNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 112 | Medium |
org.opentrafficsim.core.network.LinkPosition
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.network.LinkPosition.link() may expose internal representation by returning LinkPosition.link | MALICIOUS_CODE | EI_EXPOSE_REP | 18 | Medium |
| new org.opentrafficsim.core.network.LinkPosition(Link, double) may expose internal representation by storing an externally mutable object into LinkPosition.link | MALICIOUS_CODE | EI_EXPOSE_REP2 | 18 | Medium |
org.opentrafficsim.core.network.Network
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.network.Network.setRawRouteMap(Map) may expose internal representation by storing an externally mutable object into Network.routeMap | MALICIOUS_CODE | EI_EXPOSE_REP2 | 920 | Medium |
| org.opentrafficsim.core.network.Network.getObjectMap(Class) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 384 | Medium |
| org.opentrafficsim.core.network.Network.getRoute(String) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 683 | Medium |
org.opentrafficsim.core.network.Node
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.network.Node at new org.opentrafficsim.core.network.Node(Network, String, DirectedPoint2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 97 | Medium |
| Exception thrown in class org.opentrafficsim.core.network.Node at new org.opentrafficsim.core.network.Node(Network, String, Point2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 72 | Medium |
| Exception thrown in class org.opentrafficsim.core.network.Node at new org.opentrafficsim.core.network.Node(Network, String, Point2d, Direction) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 85 | Medium |
| org.opentrafficsim.core.network.Node.getNetwork() may expose internal representation by returning Node.network | MALICIOUS_CODE | EI_EXPOSE_REP | 121 | Medium |
| new org.opentrafficsim.core.network.Node(Network, String, DirectedPoint2d) may expose internal representation by storing an externally mutable object into Node.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 101 | Medium |
org.opentrafficsim.core.network.route.Route
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.network.route.Route at new org.opentrafficsim.core.network.route.Route(String, GtuType, List) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 65 | Medium |
| org.opentrafficsim.core.network.route.Route.getNodes() may expose internal representation by returning Route.nodes | MALICIOUS_CODE | EI_EXPOSE_REP | 154 | Medium |
org.opentrafficsim.core.object.StaticObject
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.object.StaticObject at new org.opentrafficsim.core.object.StaticObject(String, DirectedPoint2d, Polygon2d, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 49 | Medium |
| org.opentrafficsim.core.object.StaticObject.getHeight() may expose internal representation by returning StaticObject.height | MALICIOUS_CODE | EI_EXPOSE_REP | 117 | Medium |
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 509-542 | Medium |
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 557-590 | Medium |
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 605-638 | Medium |
org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 471-491 | Medium |
org.opentrafficsim.core.perception.AbstractHistorical
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.perception.AbstractHistorical at new org.opentrafficsim.core.perception.AbstractHistorical(HistoryManager, Object) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 72 | Medium |
org.opentrafficsim.core.perception.HistoricalParameters
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.core.perception.HistoricalParameters(HistoryManager, Object, Parameters) may expose internal representation by storing an externally mutable object into HistoricalParameters.params | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
org.opentrafficsim.core.perception.HistoryManagerDevs
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.perception.HistoryManagerDevs at new org.opentrafficsim.core.perception.HistoryManagerDevs(OtsSimulatorInterface, Duration, Duration) 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 |
| new org.opentrafficsim.core.perception.HistoryManagerDevs(OtsSimulatorInterface, Duration, Duration) may expose internal representation by storing an externally mutable object into HistoryManagerDevs.cleanUpInterval | MALICIOUS_CODE | EI_EXPOSE_REP2 | 44 | Medium |
| new org.opentrafficsim.core.perception.HistoryManagerDevs(OtsSimulatorInterface, Duration, Duration) may expose internal representation by storing an externally mutable object into HistoryManagerDevs.history | MALICIOUS_CODE | EI_EXPOSE_REP2 | 43 | Medium |
org.opentrafficsim.core.perception.collections.AbstractHistoricalList
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.perception.collections.AbstractHistoricalList.get(int) is unsynchronized, org.opentrafficsim.core.perception.collections.AbstractHistoricalList.set(int, Object) is synchronized | MT_CORRECTNESS | UG_SYNC_SET_UNSYNC_GET | 107 | Medium |
org.opentrafficsim.core.perception.collections.AbstractHistoricalMap
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.core.perception.collections.AbstractHistoricalMap at new org.opentrafficsim.core.perception.collections.AbstractHistoricalMap(HistoryManager, Object, Map) 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 |
org.opentrafficsim.core.units.distributions.AbstractContinuousDistScalar
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.units.distributions.AbstractContinuousDistScalar.getDistribution() may expose internal representation by returning AbstractContinuousDistScalar.distribution | MALICIOUS_CODE | EI_EXPOSE_REP | 56 | Medium |
org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar.getDistribution() may expose internal representation by returning AbstractDiscreteDistScalar.distribution | MALICIOUS_CODE | EI_EXPOSE_REP | 56 | Medium |
