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
276 199 0 0

Files

Class Bugs
org.opentrafficsim.core.compatibility.GtuCompatibility 1
org.opentrafficsim.core.compatibility.GtuCompatibleInfraType 1
org.opentrafficsim.core.distributions.Distribution 3
org.opentrafficsim.core.dsol.AbstractOtsModel 2
org.opentrafficsim.core.dsol.OtsDevsRealTimeParallelMove 1
org.opentrafficsim.core.dsol.OtsLoggingAnimator 1
org.opentrafficsim.core.dsol.OtsReplication 2
org.opentrafficsim.core.geometry.ContinuousArc 5
org.opentrafficsim.core.geometry.ContinuousBezier 1
org.opentrafficsim.core.geometry.ContinuousClothoid 4
org.opentrafficsim.core.geometry.ContinuousPolyLine 2
org.opentrafficsim.core.geometry.ContinuousStraight 1
org.opentrafficsim.core.geometry.Flattener$MaxAngle 3
org.opentrafficsim.core.geometry.Flattener$MaxDeviation 1
org.opentrafficsim.core.geometry.Flattener$MaxDeviationAndAngle 3
org.opentrafficsim.core.geometry.Flattener$NumSegments 1
org.opentrafficsim.core.geometry.FractionalLengthData 3
org.opentrafficsim.core.geometry.Ots2dSet 2
org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeIterator 1
org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeNode 1
org.opentrafficsim.core.geometry.OtsLine2d 5
org.opentrafficsim.core.gtu.Gtu 39
org.opentrafficsim.core.gtu.GtuCharacteristics 14
org.opentrafficsim.core.gtu.GtuDumper 5
org.opentrafficsim.core.gtu.GtuTemplate 4
org.opentrafficsim.core.gtu.RelativePosition 6
org.opentrafficsim.core.gtu.perception.AbstractPerception 4
org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory 2
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan 9
org.opentrafficsim.core.gtu.plan.operational.Segment 7
org.opentrafficsim.core.math.Acceleration3d 2
org.opentrafficsim.core.math.Angle3d 2
org.opentrafficsim.core.math.Direction3d 2
org.opentrafficsim.core.math.Speed3d 2
org.opentrafficsim.core.network.CapacityLink 4
org.opentrafficsim.core.network.Connector 2
org.opentrafficsim.core.network.Link 12
org.opentrafficsim.core.network.LinkPosition 2
org.opentrafficsim.core.network.Network 4
org.opentrafficsim.core.network.Node 5
org.opentrafficsim.core.network.route.FixedRouteGenerator 1
org.opentrafficsim.core.network.route.Route 4
org.opentrafficsim.core.object.StaticObject 4
org.opentrafficsim.core.parameters.ParameterFactoryByType 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry 2
org.opentrafficsim.core.perception.AbstractHistorical 1
org.opentrafficsim.core.perception.HistoricalParameters 1
org.opentrafficsim.core.perception.HistoryManagerDevs 3
org.opentrafficsim.core.perception.collections.AbstractHistoricalList 1
org.opentrafficsim.core.perception.collections.AbstractHistoricalMap 1
org.opentrafficsim.core.units.distributions.AbstractContinuousDistScalar 1
org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar 1

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 114 Medium

org.opentrafficsim.core.distributions.Distribution

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.distributions.Distribution at new org.opentrafficsim.core.distributions.Distribution(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 43 Medium
Exception thrown in class org.opentrafficsim.core.distributions.Distribution at new org.opentrafficsim.core.distributions.Distribution(StreamInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 58 Medium
Null passed for non-null parameter of java.util.List.addAll(Collection) in new org.opentrafficsim.core.distributions.Distribution(List, StreamInterface) CORRECTNESS NP_NULL_PARAM_DEREF 47 High

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, String, String) 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
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 62 Medium

org.opentrafficsim.core.dsol.OtsDevsRealTimeParallelMove

Bug Category Details Line Priority
Class org.opentrafficsim.core.dsol.OtsDevsRealTimeParallelMove defines non-transient non-serializable instance field executor BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.core.dsol.OtsLoggingAnimator

Bug Category Details Line Priority
Class org.opentrafficsim.core.dsol.OtsLoggingAnimator defines non-transient non-serializable instance field animationThread BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.core.dsol.OtsReplication

Bug Category Details Line Priority
org.opentrafficsim.core.dsol.OtsReplication.getStartTimeAbs() may expose internal representation by returning OtsReplication.startTimeAbs MALICIOUS_CODE EI_EXPOSE_REP 72 Medium
new org.opentrafficsim.core.dsol.OtsReplication(String, Time, Duration, Duration) may expose internal representation by storing an externally mutable object into OtsReplication.startTimeAbs MALICIOUS_CODE EI_EXPOSE_REP2 39 Medium

org.opentrafficsim.core.geometry.ContinuousArc

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousArc at new org.opentrafficsim.core.geometry.ContinuousArc(OrientedPoint2d, double, boolean, double) 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
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousArc at new org.opentrafficsim.core.geometry.ContinuousArc(OrientedPoint2d, double, boolean, Angle) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 57 Medium
new org.opentrafficsim.core.geometry.ContinuousArc(OrientedPoint2d, double, boolean, Angle) may expose internal representation by storing an externally mutable object into ContinuousArc.angle MALICIOUS_CODE EI_EXPOSE_REP2 63 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 138 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 142 Medium

org.opentrafficsim.core.geometry.ContinuousBezier

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousBezier at new org.opentrafficsim.core.geometry.ContinuousBezier(Point2d[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 61 Medium

org.opentrafficsim.core.geometry.ContinuousClothoid

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousClothoid at new org.opentrafficsim.core.geometry.ContinuousClothoid(OrientedPoint2d, double, double, double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 269 Medium
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousClothoid at new org.opentrafficsim.core.geometry.ContinuousClothoid(OrientedPoint2d, OrientedPoint2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 126 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 347 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 351 Medium

org.opentrafficsim.core.geometry.ContinuousPolyLine

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousPolyLine at new org.opentrafficsim.core.geometry.ContinuousPolyLine(PolyLine2d) 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
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousPolyLine at new org.opentrafficsim.core.geometry.ContinuousPolyLine(PolyLine2d, OrientedPoint2d, OrientedPoint2d) 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

org.opentrafficsim.core.geometry.ContinuousStraight

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.ContinuousStraight at new org.opentrafficsim.core.geometry.ContinuousStraight(OrientedPoint2d, double) 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

org.opentrafficsim.core.geometry.Flattener$MaxAngle

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.Flattener$MaxAngle at new org.opentrafficsim.core.geometry.Flattener$MaxAngle(double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 291 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 319 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 323 Medium

org.opentrafficsim.core.geometry.Flattener$MaxDeviation

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.Flattener$MaxDeviation at new org.opentrafficsim.core.geometry.Flattener$MaxDeviation(double) 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

org.opentrafficsim.core.geometry.Flattener$MaxDeviationAndAngle

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.Flattener$MaxDeviationAndAngle at new org.opentrafficsim.core.geometry.Flattener$MaxDeviationAndAngle(double, double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 182 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 224 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 228 Medium

org.opentrafficsim.core.geometry.Flattener$NumSegments

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.Flattener$NumSegments at new org.opentrafficsim.core.geometry.Flattener$NumSegments(int) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 57 Medium

org.opentrafficsim.core.geometry.FractionalLengthData

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.FractionalLengthData at new org.opentrafficsim.core.geometry.FractionalLengthData(Map) 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
Exception thrown in class org.opentrafficsim.core.geometry.FractionalLengthData at new org.opentrafficsim.core.geometry.FractionalLengthData(double[]) 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
Possible null pointer dereference of data in new org.opentrafficsim.core.geometry.FractionalLengthData(Map) CORRECTNESS NP_NULL_ON_SOME_PATH 55 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 59 Medium
Possible null pointer dereference of boundingBox in new org.opentrafficsim.core.geometry.Ots2dSet(Bounds2d, double) CORRECTNESS NP_NULL_ON_SOME_PATH 60 High

org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeIterator

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeIterator is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 276-320 Medium

org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeNode

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeNode is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 334-752 Medium

org.opentrafficsim.core.geometry.OtsLine2d

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.geometry.OtsLine2d at new org.opentrafficsim.core.geometry.OtsLine2d(Path2D) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 347 Medium
Exception thrown in class org.opentrafficsim.core.geometry.OtsLine2d at new org.opentrafficsim.core.geometry.OtsLine2d(PolyLine2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 90 Medium
Exception thrown in class org.opentrafficsim.core.geometry.OtsLine2d at new org.opentrafficsim.core.geometry.OtsLine2d(Point2d[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 81 Medium
org.opentrafficsim.core.geometry.OtsLine2d.noiseFilterRamerDouglasPeucker(double, boolean) uses the same code for two branches STYLE DB_DUPLICATE_BRANCHES 139 Medium
org.opentrafficsim.core.geometry.OtsLine2d.getLength() may expose internal representation by returning OtsLine2d.length MALICIOUS_CODE EI_EXPOSE_REP 399 Medium

org.opentrafficsim.core.gtu.Gtu

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.core.gtu.Gtu at new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 203 Medium
org.opentrafficsim.core.gtu.Gtu.getAcceleration(Time) may expose internal representation by returning Gtu.cachedAcceleration MALICIOUS_CODE EI_EXPOSE_REP 739 Medium
org.opentrafficsim.core.gtu.Gtu.getLength() may expose internal representation by returning Gtu.length MALICIOUS_CODE EI_EXPOSE_REP 320 Medium
org.opentrafficsim.core.gtu.Gtu.getMaximumAcceleration() may expose internal representation by returning Gtu.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP 748 Medium
org.opentrafficsim.core.gtu.Gtu.getMaximumDeceleration() may expose internal representation by returning Gtu.maximumDeceleration MALICIOUS_CODE EI_EXPOSE_REP 768 Medium
org.opentrafficsim.core.gtu.Gtu.getMaximumSpeed() may expose internal representation by returning Gtu.maximumSpeed MALICIOUS_CODE EI_EXPOSE_REP 332 Medium
org.opentrafficsim.core.gtu.Gtu.getParameters() may expose internal representation by returning Gtu.parameters MALICIOUS_CODE EI_EXPOSE_REP 536 Medium
org.opentrafficsim.core.gtu.Gtu.getParent() may expose internal representation by returning Gtu.parent MALICIOUS_CODE EI_EXPOSE_REP 949 Medium
org.opentrafficsim.core.gtu.Gtu.getPerceivableContext() may expose internal representation by returning Gtu.perceivableContext MALICIOUS_CODE EI_EXPOSE_REP 901 Medium
org.opentrafficsim.core.gtu.Gtu.getSpeed(Time) may expose internal representation by returning Gtu.cachedSpeed MALICIOUS_CODE EI_EXPOSE_REP 684 Medium
org.opentrafficsim.core.gtu.Gtu.getType() may expose internal representation by returning Gtu.gtuType MALICIOUS_CODE EI_EXPOSE_REP 518 Medium
org.opentrafficsim.core.gtu.Gtu.getWidth() may expose internal representation by returning Gtu.width MALICIOUS_CODE EI_EXPOSE_REP 326 Medium
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.gtuType MALICIOUS_CODE EI_EXPOSE_REP2 221 Medium
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.length MALICIOUS_CODE EI_EXPOSE_REP2 210 Medium
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.maximumSpeed MALICIOUS_CODE EI_EXPOSE_REP2 216 Medium
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.perceivableContext MALICIOUS_CODE EI_EXPOSE_REP2 224 Medium
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.width MALICIOUS_CODE EI_EXPOSE_REP2 211 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 760 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 782 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 542 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 940 Medium
org.opentrafficsim.core.gtu.Gtu.ALIGN_COUNT should be package protected MALICIOUS_CODE MS_PKGPROTECT 133 Medium
org.opentrafficsim.core.gtu.Gtu.ALIGNED isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 129 High
org.opentrafficsim.core.gtu.Gtu.DESTROY_EVENT isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 1040 High
org.opentrafficsim.core.gtu.Gtu.MOVE_EVENT isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 1027 High
Primitive field org.opentrafficsim.core.gtu.Gtu.ALIGN_COUNT is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. BAD_PRACTICE PA_PUBLIC_PRIMITIVE_ATTRIBUTE 133 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.core.gtu.Gtu.move(OrientedPoint2d) STYLE REC_CATCH_EXCEPTION 454 Medium
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field bounds BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field odometer BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field operationalPlan BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field strategicalPlanner BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field tacticalPlanner BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field errorHandler BAD_PRACTICE SE_BAD_FIELD Not available Medium
org.opentrafficsim.base.geometry.BoundingRectangle stored into non-transient field Gtu.bounds BAD_PRACTICE SE_BAD_FIELD_STORE 239 High
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.odometer BAD_PRACTICE SE_BAD_FIELD_STORE 223 High
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.operationalPlan BAD_PRACTICE SE_BAD_FIELD_STORE 228 High
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.strategicalPlanner BAD_PRACTICE SE_BAD_FIELD_STORE 226 High
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.tacticalPlanner BAD_PRACTICE SE_BAD_FIELD_STORE 227 High
Write to static field org.opentrafficsim.core.gtu.Gtu.staticUNIQUENUMBER from instance method new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 220 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 127 Medium
org.opentrafficsim.core.gtu.GtuCharacteristics.getGtuType() may expose internal representation by returning GtuCharacteristics.gtuType MALICIOUS_CODE EI_EXPOSE_REP 73 Medium
org.opentrafficsim.core.gtu.GtuCharacteristics.getLength() may expose internal representation by returning GtuCharacteristics.length MALICIOUS_CODE EI_EXPOSE_REP 82 Medium
org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumAcceleration() may expose internal representation by returning GtuCharacteristics.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP 109 Medium
org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumDeceleration() may expose internal representation by returning GtuCharacteristics.maximumDeceleration MALICIOUS_CODE EI_EXPOSE_REP 118 Medium
org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumSpeed() may expose internal representation by returning GtuCharacteristics.maximumSpeed MALICIOUS_CODE EI_EXPOSE_REP 100 Medium
org.opentrafficsim.core.gtu.GtuCharacteristics.getWidth() may expose internal representation by returning GtuCharacteristics.width MALICIOUS_CODE EI_EXPOSE_REP 91 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 64 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.gtuType 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.length 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.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP2 62 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 63 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 61 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 60 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(Time, 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(Time, 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(Time, 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, Generator, Generator, Generator) 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
Exception thrown in class org.opentrafficsim.core.gtu.GtuTemplate at new org.opentrafficsim.core.gtu.GtuTemplate(GtuType, Generator, Generator, Generator, Generator, Generator) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 81 Medium
org.opentrafficsim.core.gtu.GtuTemplate.getGtuType() may expose internal representation by returning GtuTemplate.gtuType MALICIOUS_CODE EI_EXPOSE_REP 133 Medium
new org.opentrafficsim.core.gtu.GtuTemplate(GtuType, Generator, Generator, Generator, Generator, Generator) may expose internal representation by storing an externally mutable object into GtuTemplate.gtuType MALICIOUS_CODE EI_EXPOSE_REP2 88 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 23 Medium
org.opentrafficsim.core.gtu.RelativePosition.dy() may expose internal representation by returning RelativePosition.dy MALICIOUS_CODE EI_EXPOSE_REP 23 Medium
org.opentrafficsim.core.gtu.RelativePosition.dz() may expose internal representation by returning RelativePosition.dz MALICIOUS_CODE EI_EXPOSE_REP 23 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 23 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 23 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 23 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 51 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 43 Medium
org.opentrafficsim.core.gtu.perception.AbstractPerception.contains(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 77 Medium
org.opentrafficsim.core.gtu.perception.AbstractPerception.getPerceptionCategoryOrNull(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 113 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 60 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 50 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, Time, Segments) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 125 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getStartTime() may expose internal representation by returning OperationalPlan.startTime MALICIOUS_CODE EI_EXPOSE_REP 164 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalDuration() may expose internal representation by returning OperationalPlan.totalDuration MALICIOUS_CODE EI_EXPOSE_REP 191 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalLength() may expose internal representation by returning OperationalPlan.totalLength MALICIOUS_CODE EI_EXPOSE_REP 200 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(Gtu, OtsLine2d, Time, Segments) may expose internal representation by storing an externally mutable object into OperationalPlan.gtu MALICIOUS_CODE EI_EXPOSE_REP2 99 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(Gtu, OtsLine2d, Time, Segments) may expose internal representation by storing an externally mutable object into OperationalPlan.segments MALICIOUS_CODE EI_EXPOSE_REP2 101 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(Gtu, OtsLine2d, Time, Segments) may expose internal representation by storing an externally mutable object into OperationalPlan.startTime MALICIOUS_CODE EI_EXPOSE_REP2 100 Medium
Redundant nullcheck of p, which is known to be non-null in org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.timeAtPoint(OrientedPoint2d, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 424 Medium
Class org.opentrafficsim.core.gtu.plan.operational.OperationalPlan defines non-transient non-serializable instance field segments BAD_PRACTICE SE_BAD_FIELD Not available High

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 29 Medium
org.opentrafficsim.core.gtu.plan.operational.Segment.duration() may expose internal representation by returning Segment.duration MALICIOUS_CODE EI_EXPOSE_REP 29 Medium
org.opentrafficsim.core.gtu.plan.operational.Segment.durationAtDistance(Length) may expose internal representation by returning Segment.duration MALICIOUS_CODE EI_EXPOSE_REP 123 Medium
org.opentrafficsim.core.gtu.plan.operational.Segment.startSpeed() may expose internal representation by returning Segment.startSpeed MALICIOUS_CODE EI_EXPOSE_REP 29 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 29 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 29 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 29 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 47 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 49 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 38 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 40 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 38 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 40 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 46 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 48 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 50 Medium
new org.opentrafficsim.core.network.CapacityLink(Network, String, Node, Node, LinkType, OtsLine2d, FractionalLengthData, Frequency) may expose internal representation by storing an externally mutable object into CapacityLink.capacity MALICIOUS_CODE EI_EXPOSE_REP2 43 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 57 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 42 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, FractionalLengthData) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 111 Medium
org.opentrafficsim.core.network.Link.getEndNode() may expose internal representation by returning Link.endNode MALICIOUS_CODE EI_EXPOSE_REP 224 Medium
org.opentrafficsim.core.network.Link.getNetwork() may expose internal representation by returning Link.network MALICIOUS_CODE EI_EXPOSE_REP 199 Medium
org.opentrafficsim.core.network.Link.getStartNode() may expose internal representation by returning Link.startNode MALICIOUS_CODE EI_EXPOSE_REP 215 Medium
org.opentrafficsim.core.network.Link.getType() may expose internal representation by returning Link.linkType MALICIOUS_CODE EI_EXPOSE_REP 231 Medium
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, FractionalLengthData) may expose internal representation by storing an externally mutable object into Link.endNode MALICIOUS_CODE EI_EXPOSE_REP2 121 Medium
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, FractionalLengthData) may expose internal representation by storing an externally mutable object into Link.linkType MALICIOUS_CODE EI_EXPOSE_REP2 122 Medium
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, FractionalLengthData) may expose internal representation by storing an externally mutable object into Link.network MALICIOUS_CODE EI_EXPOSE_REP2 118 Medium
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine2d, FractionalLengthData) may expose internal representation by storing an externally mutable object into Link.startNode MALICIOUS_CODE EI_EXPOSE_REP2 120 Medium
Class org.opentrafficsim.core.network.Link defines non-transient non-serializable instance field elevation BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.opentrafficsim.core.network.Link defines non-transient non-serializable instance field bounds BAD_PRACTICE SE_BAD_FIELD Not available Medium
org.opentrafficsim.base.geometry.BoundingPolygon stored into non-transient field Link.bounds BAD_PRACTICE SE_BAD_FIELD_STORE 130 High

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 20 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 20 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 926 Medium
Class org.opentrafficsim.core.network.Network defines non-transient non-serializable instance field linkGraphs BAD_PRACTICE SE_BAD_FIELD Not available High
org.opentrafficsim.core.network.Network.getObjectMap(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 392 Medium
org.opentrafficsim.core.network.Network.getRoute(String) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 691 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, OrientedPoint2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 102 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 77 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 90 Medium
org.opentrafficsim.core.network.Node.getNetwork() may expose internal representation by returning Node.network MALICIOUS_CODE EI_EXPOSE_REP 124 Medium
new org.opentrafficsim.core.network.Node(Network, String, OrientedPoint2d) may expose internal representation by storing an externally mutable object into Node.network MALICIOUS_CODE EI_EXPOSE_REP2 106 Medium

org.opentrafficsim.core.network.route.FixedRouteGenerator

Bug Category Details Line Priority
org.opentrafficsim.core.network.route.FixedRouteGenerator is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 28-45 High

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 79 Medium
org.opentrafficsim.core.network.route.Route.getNodes() may expose internal representation by returning Route.nodes MALICIOUS_CODE EI_EXPOSE_REP 159 Medium
new org.opentrafficsim.core.network.route.Route(String, GtuType) may expose internal representation by storing an externally mutable object into Route.gtuType MALICIOUS_CODE EI_EXPOSE_REP2 54 Medium
new org.opentrafficsim.core.network.route.Route(String, GtuType, List) may expose internal representation by storing an externally mutable object into Route.gtuType MALICIOUS_CODE EI_EXPOSE_REP2 71 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, OrientedPoint2d, PolyLine2d, Length) 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
org.opentrafficsim.core.object.StaticObject.getHeight() may expose internal representation by returning StaticObject.height MALICIOUS_CODE EI_EXPOSE_REP 116 Medium
Class org.opentrafficsim.core.object.StaticObject defines non-transient non-serializable instance field bounds BAD_PRACTICE SE_BAD_FIELD Not available Medium
org.opentrafficsim.base.geometry.BoundingPolygon stored into non-transient field StaticObject.bounds BAD_PRACTICE SE_BAD_FIELD_STORE 60 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType.setParameter(ParameterType, Object, Parameters, Map) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 186 Medium
org.opentrafficsim.core.parameters.ParameterFactoryByType.setValues(Parameters, GtuType) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 92 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 452-492 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 452-492 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 507-546 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 507-546 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 561-600 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 561-600 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 411-434 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 411-434 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) 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

org.opentrafficsim.core.perception.HistoricalParameters

Bug Category Details Line Priority
new org.opentrafficsim.core.perception.HistoricalParameters(HistoryManager, Parameters) may expose internal representation by storing an externally mutable object into HistoricalParameters.params MALICIOUS_CODE EI_EXPOSE_REP2 35 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 53 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 52 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 51 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 113 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, Map) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 47 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 58 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 58 Medium