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
516 347 0 0

Files

Class Bugs
org.opentrafficsim.road.definitions.DefaultsRoad 1
org.opentrafficsim.road.gtu.generator.GeneratorPositions 1
org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$BySpeed 3
org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$ByValue 1
org.opentrafficsim.road.gtu.generator.GtuSpawner 2
org.opentrafficsim.road.gtu.generator.Injections 4
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator 12
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement 2
org.opentrafficsim.road.gtu.generator.Platoons 5
org.opentrafficsim.road.gtu.generator.TtcRoomChecker 2
org.opentrafficsim.road.gtu.generator.characteristics.DefaultLaneBasedGtuCharacteristicsGeneratorOd$Factory 1
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics 4
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuTemplate 1
org.opentrafficsim.road.gtu.generator.headway.ArrivalsHeadwayGenerator 1
org.opentrafficsim.road.gtu.generator.headway.DemandPattern 4
org.opentrafficsim.road.gtu.generator.headway.HeadwayGenerator 2
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedMoveChecker 1
org.opentrafficsim.road.gtu.lane.AccelerationChecker 3
org.opentrafficsim.road.gtu.lane.Break 1
org.opentrafficsim.road.gtu.lane.CollisionDetector 1
org.opentrafficsim.road.gtu.lane.LaneBasedGtu 5
org.opentrafficsim.road.gtu.lane.MultiLaneBasedMoveChecker 1
org.opentrafficsim.road.gtu.lane.VehicleModel$MassBased 2
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable 1
org.opentrafficsim.road.gtu.lane.perception.CategoricalLanePerception 1
org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance 2
org.opentrafficsim.road.gtu.lane.perception.PerceptionIterableSet 1
org.opentrafficsim.road.gtu.lane.perception.PerceptionReiterable 1
org.opentrafficsim.road.gtu.lane.perception.RelativeLane 1
org.opentrafficsim.road.gtu.lane.perception.categories.AnticipationDensity$CountAndDistance 2
org.opentrafficsim.road.gtu.lane.perception.categories.LocalDistractionPerception$PerceivedLocalDistraction 2
org.opentrafficsim.road.gtu.lane.perception.categories.WienerProcess 1
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet 6
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.TaskHeadwayCollector 1
org.opentrafficsim.road.gtu.lane.perception.mental.DistractionField 3
org.opentrafficsim.road.gtu.lane.perception.mental.Fuller 2
org.opentrafficsim.road.gtu.lane.perception.mental.SumFuller 1
org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArFuller 1
org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArTaskExponential 1
org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArTaskLaneChanging 1
org.opentrafficsim.road.gtu.lane.perception.mental.channel.AttentionMatrix 1
org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskRoadSideDistraction 1
org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskSignal 1
org.opentrafficsim.road.gtu.lane.perception.mental.channel.IntersectionPerceptionChannel 1
org.opentrafficsim.road.gtu.lane.perception.mental.channel.NeighborsPerceptionChannel 1
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction 3
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction 3
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DistractionFactory 2
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel 4
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedBusStop 3
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull 11
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull$Width 3
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Maneuver 1
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Maneuver$Record 2
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Signals 1
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuBase 1
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuSimple 2
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedLaneBasedObjectBase 2
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record 6
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObjectBase 2
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedTrafficLight 2
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord 9
org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure 3
org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable 2
org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry 4
org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord 6
org.opentrafficsim.road.gtu.lane.plan.operational.LaneBasedOperationalPlan 1
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan 11
org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner 2
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedTacticalPlanner 2
org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory 4
org.opentrafficsim.road.gtu.lane.tactical.lmrs.PerceivedTrafficLightChannel 1
org.opentrafficsim.road.gtu.lane.tactical.lmrs.SocioDesiredSpeed 1
org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule 1
org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule$BusStopInfo 1
org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo 4
org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil$ConflictPlans 2
org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner 7
org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlannerFactory 2
org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator 4
org.opentrafficsim.road.network.LaneChangeInfo 2
org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph 2
org.opentrafficsim.road.network.control.rampmetering.AlineaSwitch 1
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController 5
org.opentrafficsim.road.network.control.rampmetering.RampMetering 1
org.opentrafficsim.road.network.control.rampmetering.RwsSwitch 1
org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch 4
org.opentrafficsim.road.network.factory.LaneFactory 10
org.opentrafficsim.road.network.lane.CrossSectionElement 3
org.opentrafficsim.road.network.lane.CrossSectionLink 1
org.opentrafficsim.road.network.lane.Lane 8
org.opentrafficsim.road.network.lane.LanePosition 4
org.opentrafficsim.road.network.lane.RoadMarkerAcross 2
org.opentrafficsim.road.network.lane.Stripe 4
org.opentrafficsim.road.network.lane.StripeData 3
org.opentrafficsim.road.network.lane.conflict.Conflict 4
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd 2
org.opentrafficsim.road.network.lane.conflict.Conflict$Reiterable 1
org.opentrafficsim.road.network.lane.conflict.ConflictBuilder 1
org.opentrafficsim.road.network.lane.conflict.DefaultConflictRule 2
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject 5
org.opentrafficsim.road.network.lane.object.BusStop 2
org.opentrafficsim.road.network.lane.object.LocalDistraction 3
org.opentrafficsim.road.network.lane.object.RoadSideDistraction 1
org.opentrafficsim.road.network.lane.object.RoadSideDistraction$TrapezoidProfile 4
org.opentrafficsim.road.network.lane.object.SpeedSign 5
org.opentrafficsim.road.network.lane.object.detector.LaneDetector 5
org.opentrafficsim.road.network.lane.object.detector.LoopDetector 6
org.opentrafficsim.road.network.lane.object.detector.LoopDetector$PlatoonSizes 1
org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector 3
org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector 2
org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight 2
org.opentrafficsim.road.network.sampling.GtuDataRoad 4
org.opentrafficsim.road.network.sampling.LaneDataRoad 2
org.opentrafficsim.road.network.sampling.LinkDataRoad 2
org.opentrafficsim.road.network.sampling.RoadSampler 6
org.opentrafficsim.road.network.sampling.RoadSampler$Factory 1
org.opentrafficsim.road.network.sampling.data.WorldDirData 1
org.opentrafficsim.road.network.speed.SpeedInfoCurvature 2
org.opentrafficsim.road.network.speed.SpeedLimitInfo 1
org.opentrafficsim.road.network.speed.SpeedLimitProspect 3
org.opentrafficsim.road.network.speed.SpeedLimitType 1
org.opentrafficsim.road.od.Categorization 2
org.opentrafficsim.road.od.Category 2
org.opentrafficsim.road.od.OdApplier 2
org.opentrafficsim.road.od.OdApplier$GeneratorObjects 2
org.opentrafficsim.road.od.OdMatrix 4
org.opentrafficsim.road.od.OdOptions$OptionSet 1
org.opentrafficsim.road.od.SplitFraction 3

org.opentrafficsim.road.definitions.DefaultsRoad

Bug Category Details Line Priority
The method 'getByName(Class, String)' in class 'DefaultsRoad' hides a method in class 'Defaults'. Declare the respective methods non-static or private to eradicate the problem. CORRECTNESS HSM_HIDING_METHOD 45 Medium

org.opentrafficsim.road.gtu.generator.GeneratorPositions

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.GeneratorPositions.create(Set, StreamInterface, GeneratorPositions$LaneBiases, Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 146 Medium

org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$BySpeed

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$BySpeed at new org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$BySpeed(Speed, Speed) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 957 Medium
new org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$BySpeed(Speed, Speed) may expose internal representation by storing an externally mutable object into GeneratorPositions$RoadPosition$BySpeed.leftSpeed MALICIOUS_CODE EI_EXPOSE_REP2 959 Medium
new org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$BySpeed(Speed, Speed) may expose internal representation by storing an externally mutable object into GeneratorPositions$RoadPosition$BySpeed.rightSpeed MALICIOUS_CODE EI_EXPOSE_REP2 960 Medium

org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$ByValue

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$ByValue at new org.opentrafficsim.road.gtu.generator.GeneratorPositions$RoadPosition$ByValue(double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 891 Medium

org.opentrafficsim.road.gtu.generator.GtuSpawner

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.GtuSpawner.setNoLaneChangeDistance(Length) may expose internal representation by storing an externally mutable object into GtuSpawner.noLaneChangeDistance MALICIOUS_CODE EI_EXPOSE_REP2 89 Medium
org.opentrafficsim.road.gtu.generator.GtuSpawner.setStream(StreamInterface) may expose internal representation by storing an externally mutable object into GtuSpawner.stream MALICIOUS_CODE EI_EXPOSE_REP2 78 Medium

org.opentrafficsim.road.gtu.generator.Injections

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.generator.Injections at new org.opentrafficsim.road.gtu.generator.Injections(Table, Network, ImmutableMap, BiFunction, LaneBasedStrategicalPlannerFactory, StreamInterface, Duration) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 213 Medium
new org.opentrafficsim.road.gtu.generator.Injections(Table, Network, ImmutableMap, BiFunction, LaneBasedStrategicalPlannerFactory, StreamInterface, Duration) may expose internal representation by storing an externally mutable object into Injections.network MALICIOUS_CODE EI_EXPOSE_REP2 218 Medium
new org.opentrafficsim.road.gtu.generator.Injections(Table, Network, ImmutableMap, BiFunction, LaneBasedStrategicalPlannerFactory, StreamInterface, Duration) may expose internal representation by storing an externally mutable object into Injections.stream MALICIOUS_CODE EI_EXPOSE_REP2 223 Medium
new org.opentrafficsim.road.gtu.generator.Injections(Table, Network, ImmutableMap, BiFunction, LaneBasedStrategicalPlannerFactory, StreamInterface, Duration) may expose internal representation by storing an externally mutable object into Injections.timeToCollision MALICIOUS_CODE EI_EXPOSE_REP2 222 Medium

org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator

Bug Category Details Line Priority
Operation on the "generatedGTUs" shared variable in "LaneBasedGtuGenerator" class is not atomic MT_CORRECTNESS AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE 413 Medium
Shared primitive variable "firstCharacteristicsDrawn" in one thread may not yield the value of the most recent write from another thread MT_CORRECTNESS AT_STALE_THREAD_WRITE_OF_PRIMITIVE 233 Medium
Shared primitive variable "idsInCharacteristicsOrder" in one thread may not yield the value of the most recent write from another thread MT_CORRECTNESS AT_STALE_THREAD_WRITE_OF_PRIMITIVE 220 Medium
Exception thrown in class org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator at new org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator(String, Supplier, LaneBasedGtuCharacteristicsGenerator, GeneratorPositions, RoadNetwork, OtsSimulatorInterface, LaneBasedGtuGenerator$RoomChecker, Supplier) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 172 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.getPositions() may expose internal representation by returning LaneBasedGtuGenerator.positions MALICIOUS_CODE EI_EXPOSE_REP 557 Medium
new org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator(String, Supplier, LaneBasedGtuCharacteristicsGenerator, GeneratorPositions, RoadNetwork, OtsSimulatorInterface, LaneBasedGtuGenerator$RoomChecker, Supplier) may expose internal representation by storing an externally mutable object into LaneBasedGtuGenerator.network MALICIOUS_CODE EI_EXPOSE_REP2 164 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.setNoLaneChangeDistance(Length) may expose internal representation by storing an externally mutable object into LaneBasedGtuGenerator.noLaneChangeDistance MALICIOUS_CODE EI_EXPOSE_REP2 188 Medium
Possible null pointer dereference of LaneBasedGtuGenerator.disabled in org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.disable(Lane) CORRECTNESS NP_NULL_ON_SOME_PATH 501 Medium
Null passed for non-null parameter of queueGtu(GeneratorPositions$GeneratorLanePosition, LaneBasedGtuCharacteristics) in org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.queueGtu(LaneBasedGtuCharacteristics, Lane) CORRECTNESS NP_NULL_PARAM_DEREF 350 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 244 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 247 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.getQueueSize(GeneratorPositions$GeneratorLanePosition) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 569 Medium

org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement.getSpeed() may expose internal representation by returning LaneBasedGtuGenerator$Placement.speed MALICIOUS_CODE EI_EXPOSE_REP 663 Medium
new org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement(Speed, LanePosition) may expose internal representation by storing an externally mutable object into LaneBasedGtuGenerator$Placement.speed MALICIOUS_CODE EI_EXPOSE_REP2 644 Medium

org.opentrafficsim.road.gtu.generator.Platoons

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.Platoons.addPlatoon(Duration, Duration) may expose internal representation by storing an externally mutable object into Platoons.endTime MALICIOUS_CODE EI_EXPOSE_REP2 174 Medium
org.opentrafficsim.road.gtu.generator.Platoons.addPlatoon(Duration, Duration) may expose internal representation by storing an externally mutable object into Platoons.startTime MALICIOUS_CODE EI_EXPOSE_REP2 173 Medium
org.opentrafficsim.road.gtu.generator.Platoons.fixInfo(Node, Node, Object) may expose internal representation by storing an externally mutable object into Platoons.fixedDestination MALICIOUS_CODE EI_EXPOSE_REP2 189 Medium
org.opentrafficsim.road.gtu.generator.Platoons.fixInfo(Node, Node, Object) may expose internal representation by storing an externally mutable object into Platoons.fixedOrigin MALICIOUS_CODE EI_EXPOSE_REP2 188 Medium
org.opentrafficsim.road.gtu.generator.Platoons.start(LaneBasedGtuGenerator) may expose internal representation by storing an externally mutable object into Platoons.gen MALICIOUS_CODE EI_EXPOSE_REP2 237 Medium

org.opentrafficsim.road.gtu.generator.TtcRoomChecker

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.TtcRoomChecker.getTtc() may expose internal representation by returning TtcRoomChecker.ttc MALICIOUS_CODE EI_EXPOSE_REP 74 Medium
new org.opentrafficsim.road.gtu.generator.TtcRoomChecker(Duration) may expose internal representation by storing an externally mutable object into TtcRoomChecker.ttc MALICIOUS_CODE EI_EXPOSE_REP2 45 Medium

org.opentrafficsim.road.gtu.generator.characteristics.DefaultLaneBasedGtuCharacteristicsGeneratorOd$Factory

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.characteristics.DefaultLaneBasedGtuCharacteristicsGeneratorOd$Factory.setTemplates(Set) may expose internal representation by storing an externally mutable object into DefaultLaneBasedGtuCharacteristicsGeneratorOd$Factory.templates MALICIOUS_CODE EI_EXPOSE_REP2 196 Medium

org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics.getDestination() may expose internal representation by returning LaneBasedGtuCharacteristics.destination MALICIOUS_CODE EI_EXPOSE_REP 91 Medium
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics.getOrigin() may expose internal representation by returning LaneBasedGtuCharacteristics.origin MALICIOUS_CODE EI_EXPOSE_REP 82 Medium
new org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics(GtuCharacteristics, LaneBasedStrategicalPlannerFactory, Route, Node, Node, VehicleModel) may expose internal representation by storing an externally mutable object into LaneBasedGtuCharacteristics.destination MALICIOUS_CODE EI_EXPOSE_REP2 54 Medium
new org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics(GtuCharacteristics, LaneBasedStrategicalPlannerFactory, Route, Node, Node, VehicleModel) may expose internal representation by storing an externally mutable object into LaneBasedGtuCharacteristics.origin MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium

org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuTemplate

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuTemplate at new org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuTemplate(GtuType, Supplier, Supplier, Supplier, LaneBasedStrategicalPlannerFactory, Supplier) 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.road.gtu.generator.headway.ArrivalsHeadwayGenerator

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.generator.headway.ArrivalsHeadwayGenerator(Arrivals, OtsSimulatorInterface, StreamInterface, ArrivalsHeadwayGenerator$HeadwayDistribution) may expose internal representation by storing an externally mutable object into ArrivalsHeadwayGenerator.stream MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium

org.opentrafficsim.road.gtu.generator.headway.DemandPattern

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.headway.DemandPattern.demandVector() may expose internal representation by returning DemandPattern.demandVector MALICIOUS_CODE EI_EXPOSE_REP 24 Medium
org.opentrafficsim.road.gtu.generator.headway.DemandPattern.timeVector() may expose internal representation by returning DemandPattern.timeVector MALICIOUS_CODE EI_EXPOSE_REP 24 Medium
new org.opentrafficsim.road.gtu.generator.headway.DemandPattern(FrequencyVector, DurationVector, Interpolation) may expose internal representation by storing an externally mutable object into DemandPattern.demandVector MALICIOUS_CODE EI_EXPOSE_REP2 24 Medium
new org.opentrafficsim.road.gtu.generator.headway.DemandPattern(FrequencyVector, DurationVector, Interpolation) may expose internal representation by storing an externally mutable object into DemandPattern.timeVector MALICIOUS_CODE EI_EXPOSE_REP2 24 Medium

org.opentrafficsim.road.gtu.generator.headway.HeadwayGenerator

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.generator.headway.HeadwayGenerator(Frequency, StreamInterface) may expose internal representation by storing an externally mutable object into HeadwayGenerator.demand MALICIOUS_CODE EI_EXPOSE_REP2 36 Medium
new org.opentrafficsim.road.gtu.generator.headway.HeadwayGenerator(Frequency, StreamInterface) may expose internal representation by storing an externally mutable object into HeadwayGenerator.stream MALICIOUS_CODE EI_EXPOSE_REP2 37 Medium

org.opentrafficsim.road.gtu.lane.AbstractLaneBasedMoveChecker

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.AbstractLaneBasedMoveChecker(Network) may expose internal representation by storing an externally mutable object into AbstractLaneBasedMoveChecker.network MALICIOUS_CODE EI_EXPOSE_REP2 31 Medium

org.opentrafficsim.road.gtu.lane.AccelerationChecker

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.AccelerationChecker(Network, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.max MALICIOUS_CODE EI_EXPOSE_REP2 51 Medium
new org.opentrafficsim.road.gtu.lane.AccelerationChecker(Network, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.min MALICIOUS_CODE EI_EXPOSE_REP2 50 Medium
new org.opentrafficsim.road.gtu.lane.AccelerationChecker(Network, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.minSpeed MALICIOUS_CODE EI_EXPOSE_REP2 52 Medium

org.opentrafficsim.road.gtu.lane.Break

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive org.opentrafficsim.road.gtu.lane.Break.timeFromString(String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 112 High

org.opentrafficsim.road.gtu.lane.CollisionDetector

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.CollisionDetector.getEventListenerMap() may expose internal representation by returning CollisionDetector.listenerMap MALICIOUS_CODE EI_EXPOSE_REP 87 Medium

org.opentrafficsim.road.gtu.lane.LaneBasedGtu

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getCarFollowingAcceleration() may expose internal representation by returning LaneBasedGtu.cachedCarFollowingAcceleration MALICIOUS_CODE EI_EXPOSE_REP 1393 Medium
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getDesiredSpeed() may expose internal representation by returning LaneBasedGtu.cachedDesiredSpeed MALICIOUS_CODE EI_EXPOSE_REP 1361 Medium
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.setNoLaneChangeDistance(Length) may expose internal representation by storing an externally mutable object into LaneBasedGtu.noLaneChangeDistance MALICIOUS_CODE EI_EXPOSE_REP2 1472 Medium
org.opentrafficsim.road.gtu.lane.LaneBasedGtu doesn't override org.opentrafficsim.core.gtu.Gtu.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium
Possible null pointer dereference of exitLanePosition in org.opentrafficsim.road.gtu.lane.LaneBasedGtu.exitLane() CORRECTNESS NP_NULL_ON_SOME_PATH 313 Medium

org.opentrafficsim.road.gtu.lane.MultiLaneBasedMoveChecker

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.MultiLaneBasedMoveChecker at new org.opentrafficsim.road.gtu.lane.MultiLaneBasedMoveChecker(Network, AbstractLaneBasedMoveChecker[]) 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

org.opentrafficsim.road.gtu.lane.VehicleModel$MassBased

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.VehicleModel$MassBased.getMass() may expose internal representation by returning VehicleModel$MassBased.mass MALICIOUS_CODE EI_EXPOSE_REP 147 Medium
new org.opentrafficsim.road.gtu.lane.VehicleModel$MassBased(Mass, double) may expose internal representation by storing an externally mutable object into VehicleModel$MassBased.mass MALICIOUS_CODE EI_EXPOSE_REP2 134 Medium

org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable

Bug Category Details Line Priority
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.first; locked 50% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 175 Medium

org.opentrafficsim.road.gtu.lane.perception.CategoricalLanePerception

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.CategoricalLanePerception.getLaneStructure() may expose internal representation by returning CategoricalLanePerception.laneStructure MALICIOUS_CODE EI_EXPOSE_REP 80 Medium

org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance.distance() may expose internal representation by returning PerceptionCollectable$UnderlyingDistance.distance MALICIOUS_CODE EI_EXPOSE_REP 188 Medium
new org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance(Object, Length) may expose internal representation by storing an externally mutable object into PerceptionCollectable$UnderlyingDistance.distance MALICIOUS_CODE EI_EXPOSE_REP2 188 Medium

org.opentrafficsim.road.gtu.lane.perception.PerceptionIterableSet

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.PerceptionIterableSet(SortedSet) may expose internal representation by storing an externally mutable object into PerceptionIterableSet.set MALICIOUS_CODE EI_EXPOSE_REP2 52 Medium

org.opentrafficsim.road.gtu.lane.perception.PerceptionReiterable

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.PerceptionReiterable at new org.opentrafficsim.road.gtu.lane.perception.PerceptionReiterable(LaneBasedObject, Iterable, BiFunction) 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.road.gtu.lane.perception.RelativeLane

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.RelativeLane at new org.opentrafficsim.road.gtu.lane.perception.RelativeLane(LateralDirectionality, int) 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.road.gtu.lane.perception.categories.AnticipationDensity$CountAndDistance

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.categories.AnticipationDensity$CountAndDistance.getDistance() may expose internal representation by returning AnticipationDensity$CountAndDistance.distance MALICIOUS_CODE EI_EXPOSE_REP 128 Medium
org.opentrafficsim.road.gtu.lane.perception.categories.AnticipationDensity$CountAndDistance.setDistance(Length) may expose internal representation by storing an externally mutable object into AnticipationDensity$CountAndDistance.distance MALICIOUS_CODE EI_EXPOSE_REP2 137 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.LocalDistractionPerception$PerceivedLocalDistraction

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.categories.LocalDistractionPerception$PerceivedLocalDistraction doesn't override org.opentrafficsim.road.gtu.lane.perception.object.PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium
Should org.opentrafficsim.road.gtu.lane.perception.categories.LocalDistractionPerception$PerceivedLocalDistraction be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 100-130 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.WienerProcess

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.categories.WienerProcess(StreamInterface, double, double, Duration, OtsSimulatorInterface) may expose internal representation by storing an externally mutable object into WienerProcess.tau MALICIOUS_CODE EI_EXPOSE_REP2 64 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.acceleration() may expose internal representation by returning NeighborTriplet.acceleration MALICIOUS_CODE EI_EXPOSE_REP 20 Medium
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.headway() may expose internal representation by returning NeighborTriplet.headway MALICIOUS_CODE EI_EXPOSE_REP 20 Medium
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.speed() may expose internal representation by returning NeighborTriplet.speed MALICIOUS_CODE EI_EXPOSE_REP 20 Medium
new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet(Length, Speed, Acceleration) may expose internal representation by storing an externally mutable object into NeighborTriplet.acceleration MALICIOUS_CODE EI_EXPOSE_REP2 20 Medium
new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet(Length, Speed, Acceleration) may expose internal representation by storing an externally mutable object into NeighborTriplet.headway MALICIOUS_CODE EI_EXPOSE_REP2 20 Medium
new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet(Length, Speed, Acceleration) may expose internal representation by storing an externally mutable object into NeighborTriplet.speed MALICIOUS_CODE EI_EXPOSE_REP2 20 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.TaskHeadwayCollector

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.TaskHeadwayCollector(Speed) may expose internal representation by storing an externally mutable object into TaskHeadwayCollector.speed MALICIOUS_CODE EI_EXPOSE_REP2 36 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.DistractionField

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.mental.DistractionField(LaneBasedGtu) may expose internal representation by storing an externally mutable object into DistractionField.gtu MALICIOUS_CODE EI_EXPOSE_REP2 60 Medium
org.opentrafficsim.road.gtu.lane.perception.mental.DistractionField.getDistraction(BiFunction) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 86 Medium
org.opentrafficsim.road.gtu.lane.perception.mental.DistractionField.perceiveDistractions() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 128 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.Fuller

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.Fuller at new org.opentrafficsim.road.gtu.lane.perception.mental.Fuller(Set) 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
new org.opentrafficsim.road.gtu.lane.perception.mental.Fuller(Set) may expose internal representation by storing an externally mutable object into Fuller.behavioralAdapatations MALICIOUS_CODE EI_EXPOSE_REP2 60 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.SumFuller

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.SumFuller at new org.opentrafficsim.road.gtu.lane.perception.mental.SumFuller(Set, Set) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 80 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArFuller

Bug Category Details Line Priority
Possible null pointer dereference of primary in org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArFuller.manage(LanePerception) CORRECTNESS NP_NULL_ON_SOME_PATH 75 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArTaskExponential

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArTaskExponential(String, double, double, Duration, OtsSimulatorInterface) may expose internal representation by storing an externally mutable object into ArTaskExponential.tau MALICIOUS_CODE EI_EXPOSE_REP2 45 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArTaskLaneChanging

Bug Category Details Line Priority
Redundant nullcheck of h1, which is known to be non-null in org.opentrafficsim.road.gtu.lane.perception.mental.ar.ArTaskLaneChanging.getHeadway(LanePerception, LaneBasedGtu, Parameters) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 72 High

org.opentrafficsim.road.gtu.lane.perception.mental.channel.AttentionMatrix

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.channel.AttentionMatrix at new org.opentrafficsim.road.gtu.lane.perception.mental.channel.AttentionMatrix(double[]) 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.road.gtu.lane.perception.mental.channel.ChannelTaskRoadSideDistraction

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskRoadSideDistraction at new org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskRoadSideDistraction(DistractionField, LateralDirectionality) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 50 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskSignal

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskSignal at new org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskSignal(Object) 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.road.gtu.lane.perception.mental.channel.IntersectionPerceptionChannel

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.channel.IntersectionPerceptionChannel at new org.opentrafficsim.road.gtu.lane.perception.mental.channel.IntersectionPerceptionChannel(LanePerception, Estimation, Anticipation) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 68 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.channel.NeighborsPerceptionChannel

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.channel.NeighborsPerceptionChannel at new org.opentrafficsim.road.gtu.lane.perception.mental.channel.NeighborsPerceptionChannel(LanePerception, Estimation, Anticipation) 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.road.gtu.lane.perception.mental.sdm.DefaultDistraction

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getAverageDuration() may expose internal representation by returning DefaultDistraction.averageDuration MALICIOUS_CODE EI_EXPOSE_REP 174 Medium
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getFrequency() may expose internal representation by returning DefaultDistraction.frequency MALICIOUS_CODE EI_EXPOSE_REP 156 Medium
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getStdDuration() may expose internal representation by returning DefaultDistraction.stdDuration MALICIOUS_CODE EI_EXPOSE_REP 183 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction at new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction(String, String, Frequency, double, Duration, Duration, double, StreamInterface) 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
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction(String, String, Frequency, double, Duration, Duration, double, StreamInterface) may expose internal representation by storing an externally mutable object into Distraction.frequency MALICIOUS_CODE EI_EXPOSE_REP2 70 Medium
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction(String, String, Frequency, double, Duration, Duration, double, StreamInterface) may expose internal representation by storing an externally mutable object into Distraction.stream MALICIOUS_CODE EI_EXPOSE_REP2 72 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DistractionFactory

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DistractionFactory.build() may expose internal representation by returning DistractionFactory.list MALICIOUS_CODE EI_EXPOSE_REP 77 Medium
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DistractionFactory(StreamInterface) may expose internal representation by storing an externally mutable object into DistractionFactory.stream MALICIOUS_CODE EI_EXPOSE_REP2 36 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel at new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, RoadNetwork, Set) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 84 Medium
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, RoadNetwork, Set) may expose internal representation by storing an externally mutable object into StochasticDistractionModel.distractions MALICIOUS_CODE EI_EXPOSE_REP2 88 Medium
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, RoadNetwork, Set) may expose internal representation by storing an externally mutable object into StochasticDistractionModel.gtuTypes MALICIOUS_CODE EI_EXPOSE_REP2 90 Medium
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, RoadNetwork, Set) may expose internal representation by storing an externally mutable object into StochasticDistractionModel.network MALICIOUS_CODE EI_EXPOSE_REP2 89 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedBusStop

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedBusStop.getConflictIds() may expose internal representation by returning PerceivedBusStop.conflictIds MALICIOUS_CODE EI_EXPOSE_REP 76 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedBusStop(BusStop, Length, RelativeLane, Set, Lane) may expose internal representation by storing an externally mutable object into PerceivedBusStop.conflictIds MALICIOUS_CODE EI_EXPOSE_REP2 49 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedBusStop doesn't override PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull at new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, Lane) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 109 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull.getConflictingLength() may expose internal representation by returning PerceivedConflictFull.conflictingLength MALICIOUS_CODE EI_EXPOSE_REP 189 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull.getConflictingLink() may expose internal representation by returning PerceivedConflictFull.conflictingLink MALICIOUS_CODE EI_EXPOSE_REP 243 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull.getConflictingSpeedLimit() may expose internal representation by returning PerceivedConflictFull.conflictingSpeedLimit MALICIOUS_CODE EI_EXPOSE_REP 233 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull.getConflictingVisibility() may expose internal representation by returning PerceivedConflictFull.conflictingVisibility MALICIOUS_CODE EI_EXPOSE_REP 223 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, Lane) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingLength MALICIOUS_CODE EI_EXPOSE_REP2 121 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, Lane) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingLink MALICIOUS_CODE EI_EXPOSE_REP2 126 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, Lane) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingSpeedLimit MALICIOUS_CODE EI_EXPOSE_REP2 125 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, Lane) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingVisibility MALICIOUS_CODE EI_EXPOSE_REP2 124 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull.setConflictingTrafficLight(Length, boolean) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingTrafficLightDistance MALICIOUS_CODE EI_EXPOSE_REP2 303 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull doesn't override PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull$Width

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull$Width at new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull$Width(double[], LengthVector) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 352 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull$Width(double[], LengthVector) may expose internal representation by storing an externally mutable object into PerceivedConflictFull$Width.fractions MALICIOUS_CODE EI_EXPOSE_REP2 363 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedConflictFull$Width(double[], LengthVector) may expose internal representation by storing an externally mutable object into PerceivedConflictFull$Width.width MALICIOUS_CODE EI_EXPOSE_REP2 364 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Maneuver

Bug Category Details Line Priority
Possible null pointer dereference of lat in org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Maneuver.isChangingLane(LateralDirectionality) CORRECTNESS NP_NULL_ON_SOME_PATH 175 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Maneuver$Record

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Maneuver$Record.getDeviation() may expose internal representation by returning PerceivedGtu$Maneuver$Record.getDeviation MALICIOUS_CODE EI_EXPOSE_REP 244 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Maneuver$Record(boolean, boolean, Length) may expose internal representation by storing an externally mutable object into PerceivedGtu$Maneuver$Record.getDeviation MALICIOUS_CODE EI_EXPOSE_REP2 255 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Signals

Bug Category Details Line Priority
Possible null pointer dereference of lat in org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtu$Signals.isIndicatorOn(LateralDirectionality) CORRECTNESS NP_NULL_ON_SOME_PATH 86 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuBase

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuBase at new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuBase(String, GtuType, Length, Length, PerceivedObject$Kinematics, PerceivedGtu$Signals, PerceivedGtu$Maneuver, PerceivedGtu$Behavior) 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.road.gtu.lane.perception.object.PerceivedGtuSimple

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuSimple at new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuSimple(String, GtuType, Length, Length, PerceivedObject$Kinematics, PerceivedGtu$Signals, PerceivedGtu$Maneuver) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 50 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuSimple.getWidth() may expose internal representation by returning PerceivedGtuSimple.width MALICIOUS_CODE EI_EXPOSE_REP 59 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedLaneBasedObjectBase

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedLaneBasedObjectBase.getLane() may expose internal representation by returning PerceivedLaneBasedObjectBase.lane MALICIOUS_CODE EI_EXPOSE_REP 46 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedLaneBasedObjectBase(String, PerceivedObject$ObjectType, Length, PerceivedObject$Kinematics, Lane) may expose internal representation by storing an externally mutable object into PerceivedLaneBasedObjectBase.lane MALICIOUS_CODE EI_EXPOSE_REP2 36 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record.getAcceleration() may expose internal representation by returning PerceivedObject$Kinematics$Record.getAcceleration MALICIOUS_CODE EI_EXPOSE_REP 312 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record.getDistance() may expose internal representation by returning PerceivedObject$Kinematics$Record.getDistance MALICIOUS_CODE EI_EXPOSE_REP 312 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record.getSpeed() may expose internal representation by returning PerceivedObject$Kinematics$Record.getSpeed MALICIOUS_CODE EI_EXPOSE_REP 312 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record(Length, Speed, Acceleration, boolean, PerceivedObject$Kinematics$Overlap) may expose internal representation by storing an externally mutable object into PerceivedObject$Kinematics$Record.getAcceleration MALICIOUS_CODE EI_EXPOSE_REP2 323 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record(Length, Speed, Acceleration, boolean, PerceivedObject$Kinematics$Overlap) may expose internal representation by storing an externally mutable object into PerceivedObject$Kinematics$Record.getDistance MALICIOUS_CODE EI_EXPOSE_REP2 323 Medium
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject$Kinematics$Record(Length, Speed, Acceleration, boolean, PerceivedObject$Kinematics$Overlap) may expose internal representation by storing an externally mutable object into PerceivedObject$Kinematics$Record.getSpeed MALICIOUS_CODE EI_EXPOSE_REP2 323 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObjectBase

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObjectBase at new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObjectBase(String, PerceivedObject$ObjectType, Length, PerceivedObject$Kinematics) 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
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObjectBase.getLength() may expose internal representation by returning PerceivedObjectBase.length MALICIOUS_CODE EI_EXPOSE_REP 64 Medium

org.opentrafficsim.road.gtu.lane.perception.object.PerceivedTrafficLight

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.object.PerceivedTrafficLight(TrafficLight, Length, boolean) may expose internal representation by storing an externally mutable object into PerceivedTrafficLight.trafficLight MALICIOUS_CODE EI_EXPOSE_REP2 36 Medium
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedTrafficLight doesn't override PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getLane() may expose internal representation by returning LaneRecord.lane MALICIOUS_CODE EI_EXPOSE_REP 66 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getMergeDistance() may expose internal representation by returning LaneRecord.mergeDistance MALICIOUS_CODE EI_EXPOSE_REP 100 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getNext() may expose internal representation by returning LaneRecord.next MALICIOUS_CODE EI_EXPOSE_REP 115 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getPrev() may expose internal representation by returning LaneRecord.prev MALICIOUS_CODE EI_EXPOSE_REP 130 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getStartDistance() may expose internal representation by returning LaneRecord.startDistance MALICIOUS_CODE EI_EXPOSE_REP 85 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.lateral() may expose internal representation by returning LaneRecord.lat MALICIOUS_CODE EI_EXPOSE_REP 145 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord(Lane, RelativeLane, Length, Length) may expose internal representation by storing an externally mutable object into LaneRecord.lane MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord(Lane, RelativeLane, Length, Length) may expose internal representation by storing an externally mutable object into LaneRecord.mergeDistance MALICIOUS_CODE EI_EXPOSE_REP2 56 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord(Lane, RelativeLane, Length, Length) may expose internal representation by storing an externally mutable object into LaneRecord.startDistance MALICIOUS_CODE EI_EXPOSE_REP2 55 Medium

org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure(LaneBasedGtu, Length, Length) may expose internal representation by storing an externally mutable object into LaneStructure.downstream MALICIOUS_CODE EI_EXPOSE_REP2 71 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure(LaneBasedGtu, Length, Length) may expose internal representation by storing an externally mutable object into LaneStructure.egoGtu MALICIOUS_CODE EI_EXPOSE_REP2 69 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure(LaneBasedGtu, Length, Length) may expose internal representation by storing an externally mutable object into LaneStructure.upstream MALICIOUS_CODE EI_EXPOSE_REP2 70 Medium

org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable(Class, Length, Collection, Function, Function, BiFunction) may expose internal representation by storing an externally mutable object into NavigatingIterable.range MALICIOUS_CODE EI_EXPOSE_REP2 71 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable(Class, Length, Collection, Function, Function, BiFunction) may expose internal representation by storing an externally mutable object into NavigatingIterable.start MALICIOUS_CODE EI_EXPOSE_REP2 72 Medium

org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry.distance() may expose internal representation by returning NavigatingIterable$Entry.distance MALICIOUS_CODE EI_EXPOSE_REP 269 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry.merge() may expose internal representation by returning NavigatingIterable$Entry.merge MALICIOUS_CODE EI_EXPOSE_REP 269 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry(Length, Length, Object) may expose internal representation by storing an externally mutable object into NavigatingIterable$Entry.distance MALICIOUS_CODE EI_EXPOSE_REP2 269 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry(Length, Length, Object) may expose internal representation by storing an externally mutable object into NavigatingIterable$Entry.merge MALICIOUS_CODE EI_EXPOSE_REP2 269 Medium

org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getLane() may expose internal representation by returning SimpleLaneRecord.lane MALICIOUS_CODE EI_EXPOSE_REP 94 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getNext() may expose internal representation by returning SimpleLaneRecord.next MALICIOUS_CODE EI_EXPOSE_REP 67 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getPrev() may expose internal representation by returning SimpleLaneRecord.prev MALICIOUS_CODE EI_EXPOSE_REP 82 Medium
org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getStartDistance() may expose internal representation by returning SimpleLaneRecord.startDistance MALICIOUS_CODE EI_EXPOSE_REP 88 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord(Lane, Length, GtuType) may expose internal representation by storing an externally mutable object into SimpleLaneRecord.lane MALICIOUS_CODE EI_EXPOSE_REP2 49 Medium
new org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord(Lane, Length, GtuType) may expose internal representation by storing an externally mutable object into SimpleLaneRecord.startDistance MALICIOUS_CODE EI_EXPOSE_REP2 50 Medium

org.opentrafficsim.road.gtu.lane.plan.operational.LaneBasedOperationalPlan

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.plan.operational.LaneBasedOperationalPlan doesn't override org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, 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
Exception thrown in class org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration, Length) 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 org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration, Length, LateralDirectionality) 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
Exception thrown in class org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration, LateralDirectionality) 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
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.getAcceleration() may expose internal representation by returning SimpleOperationalPlan.acceleration MALICIOUS_CODE EI_EXPOSE_REP 106 Medium
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.getDeviation() may expose internal representation by returning SimpleOperationalPlan.deviation MALICIOUS_CODE EI_EXPOSE_REP 134 Medium
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.getDuration() may expose internal representation by returning SimpleOperationalPlan.duration MALICIOUS_CODE EI_EXPOSE_REP 125 Medium
new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration, Length, LateralDirectionality) may expose internal representation by storing an externally mutable object into SimpleOperationalPlan.deviation MALICIOUS_CODE EI_EXPOSE_REP2 96 Medium
new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration, Length, LateralDirectionality) may expose internal representation by storing an externally mutable object into SimpleOperationalPlan.duration MALICIOUS_CODE EI_EXPOSE_REP2 95 Medium
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.setAcceleration(Acceleration) may expose internal representation by storing an externally mutable object into SimpleOperationalPlan.acceleration MALICIOUS_CODE EI_EXPOSE_REP2 116 Medium
Field only ever set to null: org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.indicatorObjectDistance CORRECTNESS UWF_NULL_FIELD 44 Medium

org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner.getGtu() may expose internal representation by returning AbstractLaneBasedTacticalPlanner.gtu MALICIOUS_CODE EI_EXPOSE_REP 62 Medium
new org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner(CarFollowingModel, LaneBasedGtu, LanePerception) may expose internal representation by storing an externally mutable object into AbstractLaneBasedTacticalPlanner.gtu MALICIOUS_CODE EI_EXPOSE_REP2 55 Medium

org.opentrafficsim.road.gtu.lane.tactical.LaneBasedTacticalPlanner

Bug Category Details Line Priority
Load of known null value in org.opentrafficsim.road.gtu.lane.tactical.LaneBasedTacticalPlanner.chooseLaneAtSplit(Lane, Set) STYLE NP_LOAD_OF_KNOWN_NULL_VALUE 57 Medium
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedTacticalPlanner.chooseLaneAtSplit(Lane, Set) negates the return value of org.opentrafficsim.road.network.LaneChangeInfo.compareTo(LaneChangeInfo) BAD_PRACTICE RV_NEGATING_RESULT_OF_COMPARETO 57 Medium

org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory at new org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory(List, List) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 591 Medium
Exception thrown in class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory at new org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory(List, LmrsFactory$TacticalPlannerProvider) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 575 Medium
Exception thrown in class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory at new org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory(LmrsFactory$TacticalPlannerProvider) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 564 Medium
org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory.setStream(StreamInterface) may expose internal representation by storing an externally mutable object into LmrsFactory.stream MALICIOUS_CODE EI_EXPOSE_REP2 640 Medium

org.opentrafficsim.road.gtu.lane.tactical.lmrs.PerceivedTrafficLightChannel

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.tactical.lmrs.PerceivedTrafficLightChannel doesn't override org.opentrafficsim.road.gtu.lane.perception.object.PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.lane.tactical.lmrs.SocioDesiredSpeed

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.tactical.lmrs.SocioDesiredSpeed.init(LaneBasedGtu) may expose internal representation by storing an externally mutable object into SocioDesiredSpeed.gtu MALICIOUS_CODE EI_EXPOSE_REP2 86 Medium

org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule doesn't override org.opentrafficsim.core.network.route.Route.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule$BusStopInfo

Bug Category Details Line Priority
Should org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule$BusStopInfo be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 218-251 Medium

org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo.duration() may expose internal representation by returning AnticipationInfo.duration MALICIOUS_CODE EI_EXPOSE_REP 27 Medium
org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo.endSpeed() may expose internal representation by returning AnticipationInfo.endSpeed MALICIOUS_CODE EI_EXPOSE_REP 27 Medium
new org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo(Duration, Speed) may expose internal representation by storing an externally mutable object into AnticipationInfo.duration MALICIOUS_CODE EI_EXPOSE_REP2 27 Medium
new org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo(Duration, Speed) may expose internal representation by storing an externally mutable object into AnticipationInfo.endSpeed MALICIOUS_CODE EI_EXPOSE_REP2 27 Medium

org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil$ConflictPlans

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil$ConflictPlans.getIndicatorObjectDistance() may expose internal representation by returning ConflictUtil$ConflictPlans.indicatorObjectDistance MALICIOUS_CODE EI_EXPOSE_REP 1016 Medium
org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil$ConflictPlans.setIndicatorIntent(TurnIndicatorIntent, Length) may expose internal representation by storing an externally mutable object into ConflictUtil$ConflictPlans.indicatorObjectDistance MALICIOUS_CODE EI_EXPOSE_REP2 1029 Medium

org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner at new org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner, Route, LaneBasedGtu, Node, Node, RouteGenerator) 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.road.gtu.strategical.LaneBasedStrategicalRoutePlanner at new org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner, LaneBasedGtu) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 67 Medium
org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.getGtu() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.gtu MALICIOUS_CODE EI_EXPOSE_REP 98 Medium
new org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner, Route, LaneBasedGtu, Node, Node, RouteGenerator) may expose internal representation by storing an externally mutable object into LaneBasedStrategicalRoutePlanner.destination MALICIOUS_CODE EI_EXPOSE_REP2 88 Medium
new org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner, Route, LaneBasedGtu, Node, Node, RouteGenerator) may expose internal representation by storing an externally mutable object into LaneBasedStrategicalRoutePlanner.gtu MALICIOUS_CODE EI_EXPOSE_REP2 85 Medium
new org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner, Route, LaneBasedGtu, Node, Node, RouteGenerator) may expose internal representation by storing an externally mutable object into LaneBasedStrategicalRoutePlanner.origin MALICIOUS_CODE EI_EXPOSE_REP2 87 Medium
Nullcheck of previousLink at line 125 of value previously dereferenced in org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.nextLink(Link, GtuType) CORRECTNESS RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE 118 High

org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlannerFactory

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory, ParameterFactory) may expose internal representation by storing an externally mutable object into LaneBasedStrategicalRoutePlannerFactory.parameterFactory MALICIOUS_CODE EI_EXPOSE_REP2 68 Medium
new org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory, ParameterFactory, RouteGenerator) may expose internal representation by storing an externally mutable object into LaneBasedStrategicalRoutePlannerFactory.parameterFactory MALICIOUS_CODE EI_EXPOSE_REP2 82 Medium

org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator at new org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator(StreamInterface, LinkWeight) 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.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator.getRoute(Node, Node, GtuType) uses the same code for two branches STYLE DB_DUPLICATE_BRANCHES 135 Medium
new org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator(StreamInterface, LinkWeight) may expose internal representation by storing an externally mutable object into RouteGenerator$DefaultRouteGenerator.stream MALICIOUS_CODE EI_EXPOSE_REP2 87 Medium
Useless object stored in variable testViaNode of method org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator.getRoute(Node, Node, GtuType) STYLE UC_USELESS_OBJECT 103 Medium

org.opentrafficsim.road.network.LaneChangeInfo

Bug Category Details Line Priority
org.opentrafficsim.road.network.LaneChangeInfo.remainingDistance() may expose internal representation by returning LaneChangeInfo.remainingDistance MALICIOUS_CODE EI_EXPOSE_REP 21 Medium
new org.opentrafficsim.road.network.LaneChangeInfo(int, Length, boolean, LateralDirectionality) may expose internal representation by storing an externally mutable object into LaneChangeInfo.remainingDistance MALICIOUS_CODE EI_EXPOSE_REP2 32 Medium

org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph

Bug Category Details Line Priority
Possible null pointer dereference of lane in org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph.getNoRouteDestinationNode(GtuType) CORRECTNESS NP_NULL_ON_SOME_PATH 490 Medium
Should org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 406-507 Medium

org.opentrafficsim.road.network.control.rampmetering.AlineaSwitch

Bug Category Details Line Priority
org.opentrafficsim.road.network.control.rampmetering.AlineaSwitch.getCycleTime() may expose internal representation by returning AlineaSwitch.cycleTime MALICIOUS_CODE EI_EXPOSE_REP 73 Medium

org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController at new org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController(OtsSimulatorInterface, List, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 74 Medium
new org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController(OtsSimulatorInterface, List, DetectorType) may expose internal representation by storing an externally mutable object into CycleTimeLightController.trafficLights MALICIOUS_CODE EI_EXPOSE_REP2 71 Medium
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.enable(Duration) may expose internal representation by storing an externally mutable object into CycleTimeLightController.cTime MALICIOUS_CODE EI_EXPOSE_REP2 112 Medium
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 94 Medium
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 87 Medium

org.opentrafficsim.road.network.control.rampmetering.RampMetering

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.control.rampmetering.RampMetering at new org.opentrafficsim.road.network.control.rampmetering.RampMetering(OtsSimulatorInterface, RampMeteringSwitch, RampMeteringLightController) 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

org.opentrafficsim.road.network.control.rampmetering.RwsSwitch

Bug Category Details Line Priority
org.opentrafficsim.road.network.control.rampmetering.RwsSwitch.getCycleTime() may expose internal representation by returning RwsSwitch.cycleTime MALICIOUS_CODE EI_EXPOSE_REP 84 Medium

org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch at new org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch(Duration, List) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 37 Medium
org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch.getInterval() may expose internal representation by returning SingleCrossSectionSwitch.interval MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
new org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch(Duration, List) may expose internal representation by storing an externally mutable object into SingleCrossSectionSwitch.detectors MALICIOUS_CODE EI_EXPOSE_REP2 41 Medium
new org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch(Duration, List) may expose internal representation by storing an externally mutable object into SingleCrossSectionSwitch.interval MALICIOUS_CODE EI_EXPOSE_REP2 40 Medium

org.opentrafficsim.road.network.factory.LaneFactory

Bug Category Details Line Priority
org.opentrafficsim.road.network.factory.LaneFactory.getLanes() may expose internal representation by returning LaneFactory.lanes MALICIOUS_CODE EI_EXPOSE_REP 363 Medium
org.opentrafficsim.road.network.factory.LaneFactory.leftToRight(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.laneType0 MALICIOUS_CODE EI_EXPOSE_REP2 180 Medium
org.opentrafficsim.road.network.factory.LaneFactory.leftToRight(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.speedLimit0 MALICIOUS_CODE EI_EXPOSE_REP2 181 Medium
org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.laneType0 MALICIOUS_CODE EI_EXPOSE_REP2 208 Medium
org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.laneWidth0 MALICIOUS_CODE EI_EXPOSE_REP2 207 Medium
org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.speedLimit0 MALICIOUS_CODE EI_EXPOSE_REP2 209 Medium
org.opentrafficsim.road.network.factory.LaneFactory.setOffsetEnd(Length) may expose internal representation by storing an externally mutable object into LaneFactory.offsetEnd MALICIOUS_CODE EI_EXPOSE_REP2 241 Medium
org.opentrafficsim.road.network.factory.LaneFactory.setOffsetStart(Length) may expose internal representation by storing an externally mutable object into LaneFactory.offsetStart MALICIOUS_CODE EI_EXPOSE_REP2 230 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 147 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 151 Medium

org.opentrafficsim.road.network.lane.CrossSectionElement

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.CrossSectionElement at new org.opentrafficsim.road.network.lane.CrossSectionElement(CrossSectionLink, String, CrossSectionGeometry) 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.road.network.lane.CrossSectionElement.getLink() may expose internal representation by returning CrossSectionElement.link MALICIOUS_CODE EI_EXPOSE_REP 87 Medium
new org.opentrafficsim.road.network.lane.CrossSectionElement(CrossSectionLink, String, CrossSectionGeometry) may expose internal representation by storing an externally mutable object into CrossSectionElement.link MALICIOUS_CODE EI_EXPOSE_REP2 65 Medium

org.opentrafficsim.road.network.lane.CrossSectionLink

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.CrossSectionLink doesn't override org.opentrafficsim.core.network.Link.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.network.lane.Lane

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.Lane.getGtuList(Duration) may expose internal representation by returning Lane.gtuListAtTime MALICIOUS_CODE EI_EXPOSE_REP 1262 Medium
org.opentrafficsim.road.network.lane.Lane.getType() may expose internal representation by returning Lane.laneType MALICIOUS_CODE EI_EXPOSE_REP 1239 Medium
new org.opentrafficsim.road.network.lane.Lane(CrossSectionLink, String, CrossSectionGeometry, LaneType, Map) may expose internal representation by storing an externally mutable object into Lane.laneType MALICIOUS_CODE EI_EXPOSE_REP2 191 Medium
org.opentrafficsim.road.network.lane.Lane.getGtuList(Duration) may expose internal representation by storing an externally mutable object into Lane.gtuListTime MALICIOUS_CODE EI_EXPOSE_REP2 1264 Medium
org.opentrafficsim.road.network.lane.Lane.getHighestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1197 Medium
org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 599 Medium
org.opentrafficsim.road.network.lane.Lane.getLowestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1181 Medium
org.opentrafficsim.road.network.lane.Lane.getObjectAhead(Length) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 896 Medium

org.opentrafficsim.road.network.lane.LanePosition

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.LanePosition.lane() may expose internal representation by returning LanePosition.lane MALICIOUS_CODE EI_EXPOSE_REP 18 Medium
org.opentrafficsim.road.network.lane.LanePosition.position() may expose internal representation by returning LanePosition.position MALICIOUS_CODE EI_EXPOSE_REP 18 Medium
new org.opentrafficsim.road.network.lane.LanePosition(Lane, Length) may expose internal representation by storing an externally mutable object into LanePosition.lane MALICIOUS_CODE EI_EXPOSE_REP2 18 Medium
new org.opentrafficsim.road.network.lane.LanePosition(Lane, Length) may expose internal representation by storing an externally mutable object into LanePosition.position MALICIOUS_CODE EI_EXPOSE_REP2 18 Medium

org.opentrafficsim.road.network.lane.RoadMarkerAcross

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.RoadMarkerAcross.getLongitudinalPosition() may expose internal representation by returning RoadMarkerAcross.longitudinalPosition MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
new org.opentrafficsim.road.network.lane.RoadMarkerAcross(CrossSectionElement, Length) may expose internal representation by storing an externally mutable object into RoadMarkerAcross.longitudinalPosition MALICIOUS_CODE EI_EXPOSE_REP2 29 Medium

org.opentrafficsim.road.network.lane.Stripe

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.Stripe at new org.opentrafficsim.road.network.lane.Stripe(String, StripeData, CrossSectionLink, CrossSectionGeometry) 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.road.network.lane.Stripe.getDashOffset() may expose internal representation by returning Stripe.dashOffset MALICIOUS_CODE EI_EXPOSE_REP 99 Medium
new org.opentrafficsim.road.network.lane.Stripe(String, StripeData, CrossSectionLink, CrossSectionGeometry) may expose internal representation by storing an externally mutable object into Stripe.data MALICIOUS_CODE EI_EXPOSE_REP2 49 Medium
org.opentrafficsim.road.network.lane.Stripe.setDashOffset(Length) may expose internal representation by storing an externally mutable object into Stripe.dashOffset MALICIOUS_CODE EI_EXPOSE_REP2 90 Medium

org.opentrafficsim.road.network.lane.StripeData

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.StripeData.getElements() may expose internal representation by returning StripeData.elements MALICIOUS_CODE EI_EXPOSE_REP 71 Medium
new org.opentrafficsim.road.network.lane.StripeData(List, boolean, boolean) may expose internal representation by storing an externally mutable object into StripeData.elements MALICIOUS_CODE EI_EXPOSE_REP2 60 Medium
org.opentrafficsim.road.network.lane.StripeData.setElements(List) may expose internal representation by storing an externally mutable object into StripeData.elements MALICIOUS_CODE EI_EXPOSE_REP2 80 Medium

org.opentrafficsim.road.network.lane.conflict.Conflict

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.conflict.Conflict.getLength() may expose internal representation by returning Conflict.length MALICIOUS_CODE EI_EXPOSE_REP 416 Medium
org.opentrafficsim.road.network.lane.conflict.Conflict.getOtherConflict() may expose internal representation by returning Conflict.otherConflict MALICIOUS_CODE EI_EXPOSE_REP 425 Medium
org.opentrafficsim.road.network.lane.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by returning Conflict.trafficLightDistance MALICIOUS_CODE EI_EXPOSE_REP 483 Medium
org.opentrafficsim.road.network.lane.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by storing an externally mutable object into Conflict.maxMaxTrafficLightDistance MALICIOUS_CODE EI_EXPOSE_REP2 448 Medium

org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd.getConflict() may expose internal representation by returning Conflict$ConflictEnd.conflict MALICIOUS_CODE EI_EXPOSE_REP 562 Medium
Should org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 544-568 Medium

org.opentrafficsim.road.network.lane.conflict.Conflict$Reiterable

Bug Category Details Line Priority
Should org.opentrafficsim.road.network.lane.conflict.Conflict$Reiterable be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 679-693 Medium

org.opentrafficsim.road.network.lane.conflict.ConflictBuilder

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.conflict.ConflictBuilder.buildConflictsParallel(RoadNetwork, Map, OtsSimulatorInterface, ConflictBuilder$WidthGenerator) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1228 Medium

org.opentrafficsim.road.network.lane.conflict.DefaultConflictRule

Bug Category Details Line Priority
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 123 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 127 Medium

org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject(String, Lane, Length, 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 53 Medium
Exception thrown in class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject(String, Lane, Length, PolyLine2d, Polygon2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 113 Medium
Exception thrown in class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject(String, Lane, Length, PolyLine2d, 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 74 Medium
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject.getLane() may expose internal representation by returning AbstractLaneBasedObject.lane MALICIOUS_CODE EI_EXPOSE_REP 148 Medium
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject.getLongitudinalPosition() may expose internal representation by returning AbstractLaneBasedObject.longitudinalPosition MALICIOUS_CODE EI_EXPOSE_REP 154 Medium

org.opentrafficsim.road.network.lane.object.BusStop

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.BusStop at new org.opentrafficsim.road.network.lane.object.BusStop(String, Lane, Length, String, GtuType) 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.road.network.lane.object.BusStop.getConflicts() may expose internal representation by returning BusStop.conflicts MALICIOUS_CODE EI_EXPOSE_REP 131 Medium

org.opentrafficsim.road.network.lane.object.LocalDistraction

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.LocalDistraction at new org.opentrafficsim.road.network.lane.object.LocalDistraction(String, LanePosition, Length, double, LateralDirectionality) 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
org.opentrafficsim.road.network.lane.object.LocalDistraction.getRange() may expose internal representation by returning LocalDistraction.range MALICIOUS_CODE EI_EXPOSE_REP 60 Medium
new org.opentrafficsim.road.network.lane.object.LocalDistraction(String, LanePosition, Length, double, LateralDirectionality) may expose internal representation by storing an externally mutable object into LocalDistraction.range MALICIOUS_CODE EI_EXPOSE_REP2 48 Medium

org.opentrafficsim.road.network.lane.object.RoadSideDistraction

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.RoadSideDistraction at new org.opentrafficsim.road.network.lane.object.RoadSideDistraction(String, Lane, Length, RoadSideDistraction$DistractionProfile, LateralDirectionality) 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

org.opentrafficsim.road.network.lane.object.RoadSideDistraction$TrapezoidProfile

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.RoadSideDistraction$TrapezoidProfile at new org.opentrafficsim.road.network.lane.object.RoadSideDistraction$TrapezoidProfile(double, Length, 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 123 Medium
new org.opentrafficsim.road.network.lane.object.RoadSideDistraction$TrapezoidProfile(double, Length, Length, Length) may expose internal representation by storing an externally mutable object into RoadSideDistraction$TrapezoidProfile.dMax MALICIOUS_CODE EI_EXPOSE_REP2 130 Medium
new org.opentrafficsim.road.network.lane.object.RoadSideDistraction$TrapezoidProfile(double, Length, Length, Length) may expose internal representation by storing an externally mutable object into RoadSideDistraction$TrapezoidProfile.dMed MALICIOUS_CODE EI_EXPOSE_REP2 129 Medium
new org.opentrafficsim.road.network.lane.object.RoadSideDistraction$TrapezoidProfile(double, Length, Length, Length) may expose internal representation by storing an externally mutable object into RoadSideDistraction$TrapezoidProfile.dMin MALICIOUS_CODE EI_EXPOSE_REP2 128 Medium

org.opentrafficsim.road.network.lane.object.SpeedSign

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.SpeedSign at new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, 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 56 Medium
org.opentrafficsim.road.network.lane.object.SpeedSign.getSpeed() may expose internal representation by returning SpeedSign.speed MALICIOUS_CODE EI_EXPOSE_REP 76 Medium
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.endTimeOfDay MALICIOUS_CODE EI_EXPOSE_REP2 54 Medium
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.speed MALICIOUS_CODE EI_EXPOSE_REP2 51 Medium
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.startTimeOfDay MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium

org.opentrafficsim.road.network.lane.object.detector.LaneDetector

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.object.detector.LaneDetector.compareTo(LaneDetector) incorrectly handles double value BAD_PRACTICE CO_COMPARETO_INCORRECT_FLOATING 220 Medium
Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LaneDetector at new org.opentrafficsim.road.network.lane.object.detector.LaneDetector(String, Lane, Length, RelativePosition$Type, PolyLine2d, Length, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 73 Medium
Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LaneDetector at new org.opentrafficsim.road.network.lane.object.detector.LaneDetector(String, Lane, Length, RelativePosition$Type, PolyLine2d, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 100 Medium
org.opentrafficsim.road.network.lane.object.detector.LaneDetector.getType() may expose internal representation by returning LaneDetector.detectorType MALICIOUS_CODE EI_EXPOSE_REP 125 Medium
new org.opentrafficsim.road.network.lane.object.detector.LaneDetector(String, Lane, Length, RelativePosition$Type, PolyLine2d, Length, DetectorType) may expose internal representation by storing an externally mutable object into LaneDetector.detectorType MALICIOUS_CODE EI_EXPOSE_REP2 77 Medium

org.opentrafficsim.road.network.lane.object.detector.LoopDetector

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LoopDetector at new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, Lane, Length, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 240 Medium
Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LoopDetector at new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 260 Medium
org.opentrafficsim.road.network.lane.object.detector.LoopDetector.getLength() may expose internal representation by returning LoopDetector.length MALICIOUS_CODE EI_EXPOSE_REP 334 Medium
new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.aggregation MALICIOUS_CODE EI_EXPOSE_REP2 263 Medium
new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.firstAggregation MALICIOUS_CODE EI_EXPOSE_REP2 264 Medium
new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.length MALICIOUS_CODE EI_EXPOSE_REP2 261 Medium

org.opentrafficsim.road.network.lane.object.detector.LoopDetector$PlatoonSizes

Bug Category Details Line Priority
new org.opentrafficsim.road.network.lane.object.detector.LoopDetector$PlatoonSizes(Duration) may expose internal representation by storing an externally mutable object into LoopDetector$PlatoonSizes.threshold MALICIOUS_CODE EI_EXPOSE_REP2 1070 Medium

org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector at new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector(String, Lane, Length, Lane, Length, List, RelativePosition$Type, RelativePosition$Type, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 122 Medium
org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector.getType() may expose internal representation by returning TrafficLightDetector.type MALICIOUS_CODE EI_EXPOSE_REP 425 Medium
new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector(String, Lane, Length, Lane, Length, List, RelativePosition$Type, RelativePosition$Type, DetectorType) may expose internal representation by storing an externally mutable object into TrafficLightDetector.type MALICIOUS_CODE EI_EXPOSE_REP2 125 Medium

org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector.getParent() may expose internal representation by returning TrafficLightDetector$StartEndDetector.this$0 MALICIOUS_CODE EI_EXPOSE_REP 481 Medium
new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector(TrafficLightDetector, String, Lane, Length, RelativePosition$Type, DetectorType) may expose internal representation by storing an externally mutable object into TrafficLightDetector$StartEndDetector.this$0 MALICIOUS_CODE EI_EXPOSE_REP2 459 Medium

org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight at new org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight(String, Lane, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 82 Medium
Exception thrown in class org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight at new org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight(String, Lane, 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 70 Medium

org.opentrafficsim.road.network.sampling.GtuDataRoad

Bug Category Details Line Priority
Do not catch NullPointerException like in org.opentrafficsim.road.network.sampling.GtuDataRoad.getDestinationId() STYLE DCN_NULLPOINTER_EXCEPTION 69 Medium
Do not catch NullPointerException like in org.opentrafficsim.road.network.sampling.GtuDataRoad.getOriginId() STYLE DCN_NULLPOINTER_EXCEPTION 56 Medium
org.opentrafficsim.road.network.sampling.GtuDataRoad.getGtu() may expose internal representation by returning GtuDataRoad.gtu MALICIOUS_CODE EI_EXPOSE_REP 40 Medium
new org.opentrafficsim.road.network.sampling.GtuDataRoad(LaneBasedGtu) may expose internal representation by storing an externally mutable object into GtuDataRoad.gtu MALICIOUS_CODE EI_EXPOSE_REP2 31 Medium

org.opentrafficsim.road.network.sampling.LaneDataRoad

Bug Category Details Line Priority
org.opentrafficsim.road.network.sampling.LaneDataRoad.getLane() may expose internal representation by returning LaneDataRoad.lane MALICIOUS_CODE EI_EXPOSE_REP 38 Medium
new org.opentrafficsim.road.network.sampling.LaneDataRoad(Lane) may expose internal representation by storing an externally mutable object into LaneDataRoad.lane MALICIOUS_CODE EI_EXPOSE_REP2 29 Medium

org.opentrafficsim.road.network.sampling.LinkDataRoad

Bug Category Details Line Priority
org.opentrafficsim.road.network.sampling.LinkDataRoad.getLink() may expose internal representation by returning LinkDataRoad.link MALICIOUS_CODE EI_EXPOSE_REP 42 Medium
new org.opentrafficsim.road.network.sampling.LinkDataRoad(CrossSectionLink) may expose internal representation by storing an externally mutable object into LinkDataRoad.link MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium

org.opentrafficsim.road.network.sampling.RoadSampler

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.sampling.RoadSampler at new org.opentrafficsim.road.network.sampling.RoadSampler(Set, Set, RoadNetwork) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 87 Medium
Exception thrown in class org.opentrafficsim.road.network.sampling.RoadSampler at new org.opentrafficsim.road.network.sampling.RoadSampler(Set, Set, RoadNetwork, Frequency) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 119 Medium
Exception thrown in class org.opentrafficsim.road.network.sampling.RoadSampler at new org.opentrafficsim.road.network.sampling.RoadSampler(RoadNetwork) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 73 Medium
Exception thrown in class org.opentrafficsim.road.network.sampling.RoadSampler at new org.opentrafficsim.road.network.sampling.RoadSampler(RoadNetwork, Frequency) 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
new org.opentrafficsim.road.network.sampling.RoadSampler(Set, Set, RoadNetwork) may expose internal representation by storing an externally mutable object into RoadSampler.network MALICIOUS_CODE EI_EXPOSE_REP2 88 Medium
new org.opentrafficsim.road.network.sampling.RoadSampler(Set, Set, RoadNetwork, Frequency) may expose internal representation by storing an externally mutable object into RoadSampler.network MALICIOUS_CODE EI_EXPOSE_REP2 123 Medium

org.opentrafficsim.road.network.sampling.RoadSampler$Factory

Bug Category Details Line Priority
org.opentrafficsim.road.network.sampling.RoadSampler$Factory.setFrequency(Frequency) may expose internal representation by storing an externally mutable object into RoadSampler$Factory.freq MALICIOUS_CODE EI_EXPOSE_REP2 434 Medium

org.opentrafficsim.road.network.sampling.data.WorldDirData

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive org.opentrafficsim.road.network.sampling.data.WorldDirData.parseValue(String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 47 High

org.opentrafficsim.road.network.speed.SpeedInfoCurvature

Bug Category Details Line Priority
org.opentrafficsim.road.network.speed.SpeedInfoCurvature.radius() may expose internal representation by returning SpeedInfoCurvature.radius MALICIOUS_CODE EI_EXPOSE_REP 19 Medium
new org.opentrafficsim.road.network.speed.SpeedInfoCurvature(Length) may expose internal representation by storing an externally mutable object into SpeedInfoCurvature.radius MALICIOUS_CODE EI_EXPOSE_REP2 27 Medium

org.opentrafficsim.road.network.speed.SpeedLimitInfo

Bug Category Details Line Priority
org.opentrafficsim.road.network.speed.SpeedLimitInfo.toString() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 128 Medium

org.opentrafficsim.road.network.speed.SpeedLimitProspect

Bug Category Details Line Priority
org.opentrafficsim.road.network.speed.SpeedLimitProspect.getOdometer() may expose internal representation by returning SpeedLimitProspect.odometer MALICIOUS_CODE EI_EXPOSE_REP 90 Medium
new org.opentrafficsim.road.network.speed.SpeedLimitProspect(Length) may expose internal representation by storing an externally mutable object into SpeedLimitProspect.odometer MALICIOUS_CODE EI_EXPOSE_REP2 47 Medium
org.opentrafficsim.road.network.speed.SpeedLimitProspect.update(Length) may expose internal representation by storing an externally mutable object into SpeedLimitProspect.odometer MALICIOUS_CODE EI_EXPOSE_REP2 61 Medium

org.opentrafficsim.road.network.speed.SpeedLimitType

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.speed.SpeedLimitType at new org.opentrafficsim.road.network.speed.SpeedLimitType(String, Class) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 34 Medium

org.opentrafficsim.road.od.Categorization

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.od.Categorization at new org.opentrafficsim.road.od.Categorization(String) 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
Exception thrown in class org.opentrafficsim.road.od.Categorization at new org.opentrafficsim.road.od.Categorization(String, Class, Class[]) 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.road.od.Category

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.od.Category at new org.opentrafficsim.road.od.Category(Categorization) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 37 Medium
Exception thrown in class org.opentrafficsim.road.od.Category at new org.opentrafficsim.road.od.Category(Categorization, Object, Object[]) 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

org.opentrafficsim.road.od.OdApplier

Bug Category Details Line Priority
org.opentrafficsim.road.od.OdApplier.createGenerators(RoadNetwork, OdOptions, OtsSimulatorInterface, boolean, StreamInterface, Map, Map, Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 387 Medium
org.opentrafficsim.road.od.OdApplier.gatherPositionsLaneBased(Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 291 Medium

org.opentrafficsim.road.od.OdApplier$GeneratorObjects

Bug Category Details Line Priority
org.opentrafficsim.road.od.OdApplier$GeneratorObjects.generator() may expose internal representation by returning OdApplier$GeneratorObjects.generator MALICIOUS_CODE EI_EXPOSE_REP 915 Medium
new org.opentrafficsim.road.od.OdApplier$GeneratorObjects(LaneBasedGtuGenerator, Supplier, LaneBasedGtuCharacteristicsGenerator) may expose internal representation by storing an externally mutable object into OdApplier$GeneratorObjects.generator MALICIOUS_CODE EI_EXPOSE_REP2 915 Medium

org.opentrafficsim.road.od.OdMatrix

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.od.OdMatrix at new org.opentrafficsim.road.od.OdMatrix(String, List, List, Categorization, DurationVector, Interpolation) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 91 Medium
org.opentrafficsim.road.od.OdMatrix.getGlobalTimeVector() may expose internal representation by returning OdMatrix.globalTimeVector MALICIOUS_CODE EI_EXPOSE_REP 173 Medium
new org.opentrafficsim.road.od.OdMatrix(String, List, List, Categorization, DurationVector, Interpolation) may expose internal representation by storing an externally mutable object into OdMatrix.globalTimeVector MALICIOUS_CODE EI_EXPOSE_REP2 105 Medium
org.opentrafficsim.road.od.OdMatrix.print() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 863 Medium

org.opentrafficsim.road.od.OdOptions$OptionSet

Bug Category Details Line Priority
Should org.opentrafficsim.road.od.OdOptions$OptionSet be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 284-326 Medium

org.opentrafficsim.road.od.SplitFraction

Bug Category Details Line Priority
new org.opentrafficsim.road.od.SplitFraction(Node, Interpolation, StreamInterface, OtsSimulatorInterface) may expose internal representation by storing an externally mutable object into SplitFraction.node MALICIOUS_CODE EI_EXPOSE_REP2 61 Medium
new org.opentrafficsim.road.od.SplitFraction(Node, Interpolation, StreamInterface, OtsSimulatorInterface) may expose internal representation by storing an externally mutable object into SplitFraction.random MALICIOUS_CODE EI_EXPOSE_REP2 63 Medium
org.opentrafficsim.road.od.SplitFraction.draw(GtuType) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 143 Medium