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
522 336 0 0

Files

Class Bugs
org.opentrafficsim.road.definitions.DefaultsRoad 1
org.opentrafficsim.road.gtu.AbstractLaneBasedMoveChecker 1
org.opentrafficsim.road.gtu.AccelerationChecker 3
org.opentrafficsim.road.gtu.Break 1
org.opentrafficsim.road.gtu.CollisionDetector 1
org.opentrafficsim.road.gtu.LaneBasedGtu 2
org.opentrafficsim.road.gtu.MultiLaneBasedMoveChecker 1
org.opentrafficsim.road.gtu.VehicleModel$MassBased 2
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.operational.LaneBasedOperationalPlan 1
org.opentrafficsim.road.gtu.operational.SimpleOperationalPlan 6
org.opentrafficsim.road.gtu.perception.AbstractPerceptionReiterable 1
org.opentrafficsim.road.gtu.perception.CategoricalLanePerception 1
org.opentrafficsim.road.gtu.perception.FilteredIterable 1
org.opentrafficsim.road.gtu.perception.PerceptionIterableSet 1
org.opentrafficsim.road.gtu.perception.PerceptionReiterable 1
org.opentrafficsim.road.gtu.perception.RelativeLane 1
org.opentrafficsim.road.gtu.perception.categories.AnticipationDensity$CountAndDistance 2
org.opentrafficsim.road.gtu.perception.categories.LocalDistractionPerception$PerceivedLocalDistraction 2
org.opentrafficsim.road.gtu.perception.categories.WienerProcess 1
org.opentrafficsim.road.gtu.perception.categories.neighbors.NeighborTriplet 6
org.opentrafficsim.road.gtu.perception.categories.neighbors.TaskHeadwayCollector 1
org.opentrafficsim.road.gtu.perception.mental.DistractionField 3
org.opentrafficsim.road.gtu.perception.mental.Fuller 2
org.opentrafficsim.road.gtu.perception.mental.SumFuller 1
org.opentrafficsim.road.gtu.perception.mental.ar.ArFuller 1
org.opentrafficsim.road.gtu.perception.mental.ar.ArTaskExponential 1
org.opentrafficsim.road.gtu.perception.mental.ar.ArTaskLaneChanging 1
org.opentrafficsim.road.gtu.perception.mental.channel.AttentionMatrix 1
org.opentrafficsim.road.gtu.perception.mental.channel.ChannelTaskRoadSideDistraction 1
org.opentrafficsim.road.gtu.perception.mental.channel.ChannelTaskSignal 1
org.opentrafficsim.road.gtu.perception.mental.channel.IntersectionPerceptionChannel 1
org.opentrafficsim.road.gtu.perception.mental.channel.NeighborsPerceptionChannel 1
org.opentrafficsim.road.gtu.perception.mental.sdm.DefaultDistraction 3
org.opentrafficsim.road.gtu.perception.mental.sdm.Distraction 3
org.opentrafficsim.road.gtu.perception.mental.sdm.DistractionFactory 2
org.opentrafficsim.road.gtu.perception.mental.sdm.StochasticDistractionModel 4
org.opentrafficsim.road.gtu.perception.object.PerceivedBusStop 3
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull 9
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull$Width 3
org.opentrafficsim.road.gtu.perception.object.PerceivedGtu$Maneuver 1
org.opentrafficsim.road.gtu.perception.object.PerceivedGtu$Maneuver$Record 2
org.opentrafficsim.road.gtu.perception.object.PerceivedGtu$Signals 1
org.opentrafficsim.road.gtu.perception.object.PerceivedGtuBase 1
org.opentrafficsim.road.gtu.perception.object.PerceivedGtuSimple 2
org.opentrafficsim.road.gtu.perception.object.PerceivedLaneBasedObjectBase 2
org.opentrafficsim.road.gtu.perception.object.PerceivedObject$Kinematics$Record 6
org.opentrafficsim.road.gtu.perception.object.PerceivedObjectBase 2
org.opentrafficsim.road.gtu.perception.object.PerceivedTrafficLight 2
org.opentrafficsim.road.gtu.perception.object.PerceivedTrafficLightChannel 1
org.opentrafficsim.road.gtu.perception.structure.LaneRecord 9
org.opentrafficsim.road.gtu.perception.structure.LaneStructure 3
org.opentrafficsim.road.gtu.perception.structure.NavigatingIterable 2
org.opentrafficsim.road.gtu.perception.structure.NavigatingIterable$Entry 4
org.opentrafficsim.road.gtu.perception.structure.SimpleLaneRecord 6
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.gtu.tactical.AbstractLaneBasedTacticalPlanner 2
org.opentrafficsim.road.gtu.tactical.LaneBasedTacticalPlanner 2
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo 10
org.opentrafficsim.road.gtu.tactical.lmrs.LmrsFactory 4
org.opentrafficsim.road.gtu.tactical.lmrs.SocioDesiredSpeed 1
org.opentrafficsim.road.gtu.tactical.pt.BusSchedule 1
org.opentrafficsim.road.gtu.tactical.pt.BusSchedule$BusStopInfo 1
org.opentrafficsim.road.gtu.tactical.util.AnticipationInfo 4
org.opentrafficsim.road.gtu.tactical.util.lmrs.LmrsData 2
org.opentrafficsim.road.network.CrossSectionElement 3
org.opentrafficsim.road.network.CrossSectionLink 1
org.opentrafficsim.road.network.Lane 6
org.opentrafficsim.road.network.LaneChangeInfo 2
org.opentrafficsim.road.network.LanePosition 4
org.opentrafficsim.road.network.RoadMarkerAcross 2
org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph 2
org.opentrafficsim.road.network.Shoulder 1
org.opentrafficsim.road.network.Stripe 3
org.opentrafficsim.road.network.StripeData 3
org.opentrafficsim.road.network.conflict.Conflict 5
org.opentrafficsim.road.network.conflict.Conflict$ConflictEnd 2
org.opentrafficsim.road.network.conflict.Conflict$Reiterable 1
org.opentrafficsim.road.network.conflict.ConflictBuilder 1
org.opentrafficsim.road.network.conflict.DefaultConflictRule 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 8
org.opentrafficsim.road.network.object.AbstractLaneBasedObject 5
org.opentrafficsim.road.network.object.BusStop 2
org.opentrafficsim.road.network.object.LocalDistraction 3
org.opentrafficsim.road.network.object.RoadSideDistraction 1
org.opentrafficsim.road.network.object.RoadSideDistraction$TrapezoidProfile 4
org.opentrafficsim.road.network.object.detector.LaneDetector 5
org.opentrafficsim.road.network.object.detector.LoopDetector 6
org.opentrafficsim.road.network.object.detector.LoopDetector$PlatoonSizes 1
org.opentrafficsim.road.network.object.detector.TrafficLightDetector 3
org.opentrafficsim.road.network.object.detector.TrafficLightDetector$StartEndDetector 2
org.opentrafficsim.road.network.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.LaneSpeedLimits 3
org.opentrafficsim.road.network.speed.SpeedLimit 2
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.AbstractLaneBasedMoveChecker

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.AccelerationChecker

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.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.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.Break

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

org.opentrafficsim.road.gtu.CollisionDetector

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

org.opentrafficsim.road.gtu.LaneBasedGtu

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.LaneBasedGtu.setNoLaneChangeDistance(Length) may expose internal representation by storing an externally mutable object into LaneBasedGtu.noLaneChangeDistance MALICIOUS_CODE EI_EXPOSE_REP2 1362 Medium
org.opentrafficsim.road.gtu.LaneBasedGtu doesn't override org.opentrafficsim.core.gtu.Gtu.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.MultiLaneBasedMoveChecker

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.MultiLaneBasedMoveChecker at new org.opentrafficsim.road.gtu.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.VehicleModel$MassBased

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.VehicleModel$MassBased.getMass() may expose internal representation by returning VehicleModel$MassBased.mass MALICIOUS_CODE EI_EXPOSE_REP 147 Medium
new org.opentrafficsim.road.gtu.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.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 149 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 939 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 941 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 942 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 873 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 410 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 230 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 217 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 169 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.getPositions() may expose internal representation by returning LaneBasedGtuGenerator.positions MALICIOUS_CODE EI_EXPOSE_REP 554 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 162 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 185 Medium
Possible null pointer dereference of LaneBasedGtuGenerator.disabled in org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.disable(Lane) CORRECTNESS NP_NULL_ON_SOME_PATH 498 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 347 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 241 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.getQueueSize(GeneratorPositions$GeneratorLanePosition) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 566 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 660 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 641 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 75 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 46 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 195 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 54 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.operational.LaneBasedOperationalPlan

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.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.operational.SimpleOperationalPlan

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.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 39 Medium
Exception thrown in class org.opentrafficsim.road.gtu.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.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 51 Medium
org.opentrafficsim.road.gtu.operational.SimpleOperationalPlan.getAcceleration() may expose internal representation by returning SimpleOperationalPlan.acceleration MALICIOUS_CODE EI_EXPOSE_REP 66 Medium
org.opentrafficsim.road.gtu.operational.SimpleOperationalPlan.getDuration() may expose internal representation by returning SimpleOperationalPlan.duration MALICIOUS_CODE EI_EXPOSE_REP 85 Medium
new org.opentrafficsim.road.gtu.operational.SimpleOperationalPlan(Acceleration, Duration, LateralDirectionality) may expose internal representation by storing an externally mutable object into SimpleOperationalPlan.duration MALICIOUS_CODE EI_EXPOSE_REP2 56 Medium
org.opentrafficsim.road.gtu.operational.SimpleOperationalPlan.setAcceleration(Acceleration) may expose internal representation by storing an externally mutable object into SimpleOperationalPlan.acceleration MALICIOUS_CODE EI_EXPOSE_REP2 76 Medium

org.opentrafficsim.road.gtu.perception.AbstractPerceptionReiterable

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

org.opentrafficsim.road.gtu.perception.CategoricalLanePerception

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

org.opentrafficsim.road.gtu.perception.FilteredIterable

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

org.opentrafficsim.road.gtu.perception.PerceptionIterableSet

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.perception.PerceptionReiterable

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.PerceptionReiterable at new org.opentrafficsim.road.gtu.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.perception.RelativeLane

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

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.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.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.perception.categories.LocalDistractionPerception$PerceivedLocalDistraction

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

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

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.perception.categories.neighbors.NeighborTriplet

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.perception.categories.neighbors.NeighborTriplet.acceleration() may expose internal representation by returning NeighborTriplet.acceleration MALICIOUS_CODE EI_EXPOSE_REP 20 Medium
org.opentrafficsim.road.gtu.perception.categories.neighbors.NeighborTriplet.headway() may expose internal representation by returning NeighborTriplet.headway MALICIOUS_CODE EI_EXPOSE_REP 20 Medium
org.opentrafficsim.road.gtu.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.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.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.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.perception.categories.neighbors.TaskHeadwayCollector

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.perception.mental.DistractionField

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.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.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.perception.mental.Fuller

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.mental.Fuller at new org.opentrafficsim.road.gtu.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.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.perception.mental.SumFuller

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.mental.SumFuller at new org.opentrafficsim.road.gtu.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 85 Medium

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

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

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

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.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.perception.mental.ar.ArTaskLaneChanging.getHeadway(LanePerception, LaneBasedGtu, Parameters) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 72 High

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

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

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

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

org.opentrafficsim.road.gtu.perception.mental.channel.IntersectionPerceptionChannel

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

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

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

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

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

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.mental.sdm.Distraction at new org.opentrafficsim.road.gtu.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.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.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.perception.mental.sdm.DistractionFactory

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.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.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.perception.mental.sdm.StochasticDistractionModel

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.mental.sdm.StochasticDistractionModel at new org.opentrafficsim.road.gtu.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.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.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.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.perception.object.PerceivedBusStop

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.perception.object.PerceivedBusStop.getConflictIds() may expose internal representation by returning PerceivedBusStop.conflictIds MALICIOUS_CODE EI_EXPOSE_REP 74 Medium
new org.opentrafficsim.road.gtu.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 47 Medium
org.opentrafficsim.road.gtu.perception.object.PerceivedBusStop doesn't override PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

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

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull at new org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, SpeedLimit, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, LateralDirectionality, Lane) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 115 Medium
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull.getConflictingLength() may expose internal representation by returning PerceivedConflictFull.conflictingLength MALICIOUS_CODE EI_EXPOSE_REP 173 Medium
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull.getConflictingLink() may expose internal representation by returning PerceivedConflictFull.conflictingLink MALICIOUS_CODE EI_EXPOSE_REP 203 Medium
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull.getConflictingVisibility() may expose internal representation by returning PerceivedConflictFull.conflictingVisibility MALICIOUS_CODE EI_EXPOSE_REP 191 Medium
new org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, SpeedLimit, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, LateralDirectionality, Lane) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingLength MALICIOUS_CODE EI_EXPOSE_REP2 128 Medium
new org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, SpeedLimit, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, LateralDirectionality, Lane) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingLink MALICIOUS_CODE EI_EXPOSE_REP2 133 Medium
new org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull(String, Length, Length, ConflictType, ConflictPriority, Class, Length, PerceptionCollectable, PerceptionCollectable, Length, SpeedLimit, CrossSectionLink, PerceivedConflictFull$Width, PerceivedObject, PerceivedObject, LateralDirectionality, Lane) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingVisibility MALICIOUS_CODE EI_EXPOSE_REP2 131 Medium
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull.setConflictingTrafficLight(Length, boolean) may expose internal representation by storing an externally mutable object into PerceivedConflictFull.conflictingTrafficLightDistance MALICIOUS_CODE EI_EXPOSE_REP2 249 Medium
org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull doesn't override PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

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

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.object.PerceivedConflictFull$Width at new org.opentrafficsim.road.gtu.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 293 Medium
new org.opentrafficsim.road.gtu.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 304 Medium
new org.opentrafficsim.road.gtu.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 305 Medium

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

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

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

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.perception.object.PerceivedGtu$Maneuver$Record.getDeviation() may expose internal representation by returning PerceivedGtu$Maneuver$Record.getDeviation MALICIOUS_CODE EI_EXPOSE_REP 309 Medium
new org.opentrafficsim.road.gtu.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 320 Medium

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

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

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

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.object.PerceivedGtuBase at new org.opentrafficsim.road.gtu.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.perception.object.PerceivedGtuSimple

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.perception.object.PerceivedGtuSimple at new org.opentrafficsim.road.gtu.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.perception.object.PerceivedGtuSimple.getWidth() may expose internal representation by returning PerceivedGtuSimple.width MALICIOUS_CODE EI_EXPOSE_REP 59 Medium

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

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.perception.object.PerceivedLaneBasedObjectBase.getLane() may expose internal representation by returning PerceivedLaneBasedObjectBase.lane MALICIOUS_CODE EI_EXPOSE_REP 46 Medium
new org.opentrafficsim.road.gtu.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.perception.object.PerceivedObject$Kinematics$Record

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.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.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.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.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.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.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.perception.object.PerceivedObjectBase

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

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

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.perception.object.PerceivedTrafficLight doesn't override PerceivedLaneBasedObjectBase.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.gtu.perception.object.PerceivedTrafficLightChannel

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

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

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.perception.structure.LaneRecord.getLane() may expose internal representation by returning LaneRecord.lane MALICIOUS_CODE EI_EXPOSE_REP 66 Medium
org.opentrafficsim.road.gtu.perception.structure.LaneRecord.getMergeDistance() may expose internal representation by returning LaneRecord.mergeDistance MALICIOUS_CODE EI_EXPOSE_REP 100 Medium
org.opentrafficsim.road.gtu.perception.structure.LaneRecord.getNext() may expose internal representation by returning LaneRecord.next MALICIOUS_CODE EI_EXPOSE_REP 115 Medium
org.opentrafficsim.road.gtu.perception.structure.LaneRecord.getPrev() may expose internal representation by returning LaneRecord.prev MALICIOUS_CODE EI_EXPOSE_REP 130 Medium
org.opentrafficsim.road.gtu.perception.structure.LaneRecord.getStartDistance() may expose internal representation by returning LaneRecord.startDistance MALICIOUS_CODE EI_EXPOSE_REP 85 Medium
org.opentrafficsim.road.gtu.perception.structure.LaneRecord.lateral() may expose internal representation by returning LaneRecord.lat MALICIOUS_CODE EI_EXPOSE_REP 145 Medium
new org.opentrafficsim.road.gtu.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.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.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.perception.structure.LaneStructure

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

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

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.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.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.perception.structure.NavigatingIterable$Entry

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.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.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.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.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.perception.structure.SimpleLaneRecord

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.perception.structure.SimpleLaneRecord.getLane() may expose internal representation by returning SimpleLaneRecord.lane MALICIOUS_CODE EI_EXPOSE_REP 94 Medium
org.opentrafficsim.road.gtu.perception.structure.SimpleLaneRecord.getNext() may expose internal representation by returning SimpleLaneRecord.next MALICIOUS_CODE EI_EXPOSE_REP 67 Medium
org.opentrafficsim.road.gtu.perception.structure.SimpleLaneRecord.getPrev() may expose internal representation by returning SimpleLaneRecord.prev MALICIOUS_CODE EI_EXPOSE_REP 82 Medium
org.opentrafficsim.road.gtu.perception.structure.SimpleLaneRecord.getStartDistance() may expose internal representation by returning SimpleLaneRecord.startDistance MALICIOUS_CODE EI_EXPOSE_REP 88 Medium
new org.opentrafficsim.road.gtu.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.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.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 71 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 85 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 86 Medium
org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator.getRoute(Node, Node, GtuType) uses the same code for two branches STYLE DB_DUPLICATE_BRANCHES 136 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 88 Medium
Useless object stored in variable testViaNode of method org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator.getRoute(Node, Node, GtuType) STYLE UC_USELESS_OBJECT 104 Medium

org.opentrafficsim.road.gtu.tactical.AbstractLaneBasedTacticalPlanner

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.tactical.AbstractLaneBasedTacticalPlanner.getGtu() may expose internal representation by returning AbstractLaneBasedTacticalPlanner.gtu MALICIOUS_CODE EI_EXPOSE_REP 62 Medium
new org.opentrafficsim.road.gtu.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.tactical.LaneBasedTacticalPlanner

Bug Category Details Line Priority
Load of known null value in org.opentrafficsim.road.gtu.tactical.LaneBasedTacticalPlanner.chooseLaneAtSplit(Lane, Set) STYLE NP_LOAD_OF_KNOWN_NULL_VALUE 57 Medium
org.opentrafficsim.road.gtu.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.tactical.TacticalContextEgo

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getAcceleration() may expose internal representation by returning TacticalContextEgo.acceleration MALICIOUS_CODE EI_EXPOSE_REP 309 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getCarFollowingAcceleration() may expose internal representation by returning TacticalContextEgo.carFollowingAcceleration MALICIOUS_CODE EI_EXPOSE_REP 147 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getDesiredSpeed() may expose internal representation by returning TacticalContextEgo.desiredSpeed MALICIOUS_CODE EI_EXPOSE_REP 258 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getLength() may expose internal representation by returning TacticalContextEgo.length MALICIOUS_CODE EI_EXPOSE_REP 281 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getMaximumSpeed() may expose internal representation by returning TacticalContextEgo.maxSpeed MALICIOUS_CODE EI_EXPOSE_REP 302 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getParameters() may expose internal representation by returning TacticalContextEgo.parameters MALICIOUS_CODE EI_EXPOSE_REP 226 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getSpeed() may expose internal representation by returning TacticalContextEgo.speed MALICIOUS_CODE EI_EXPOSE_REP 295 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getUnsafeGtu() may expose internal representation by returning TacticalContextEgo.gtu MALICIOUS_CODE EI_EXPOSE_REP 105 Medium
org.opentrafficsim.road.gtu.tactical.TacticalContextEgo.getWidth() may expose internal representation by returning TacticalContextEgo.width MALICIOUS_CODE EI_EXPOSE_REP 288 Medium
new org.opentrafficsim.road.gtu.tactical.TacticalContextEgo(LaneBasedGtu) may expose internal representation by storing an externally mutable object into TacticalContextEgo.gtu MALICIOUS_CODE EI_EXPOSE_REP2 94 Medium

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

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.gtu.tactical.lmrs.LmrsFactory at new org.opentrafficsim.road.gtu.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 626 Medium
Exception thrown in class org.opentrafficsim.road.gtu.tactical.lmrs.LmrsFactory at new org.opentrafficsim.road.gtu.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 610 Medium
Exception thrown in class org.opentrafficsim.road.gtu.tactical.lmrs.LmrsFactory at new org.opentrafficsim.road.gtu.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 599 Medium
org.opentrafficsim.road.gtu.tactical.lmrs.LmrsFactory.setStream(StreamInterface) may expose internal representation by storing an externally mutable object into LmrsFactory.stream MALICIOUS_CODE EI_EXPOSE_REP2 675 Medium

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

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

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

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.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.tactical.pt.BusSchedule$BusStopInfo

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

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

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

org.opentrafficsim.road.gtu.tactical.util.lmrs.LmrsData

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.tactical.util.lmrs.LmrsData.getDesiredSpeed() may expose internal representation by returning LmrsData.desiredSpeed MALICIOUS_CODE EI_EXPOSE_REP 207 Medium
org.opentrafficsim.road.gtu.tactical.util.lmrs.LmrsData.setDesiredSpeed(Speed) may expose internal representation by storing an externally mutable object into LmrsData.desiredSpeed MALICIOUS_CODE EI_EXPOSE_REP2 201 Medium

org.opentrafficsim.road.network.CrossSectionElement

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

org.opentrafficsim.road.network.CrossSectionLink

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

org.opentrafficsim.road.network.Lane

Bug Category Details Line Priority
org.opentrafficsim.road.network.Lane.getGtuList(Duration) may expose internal representation by returning Lane.gtuListAtTime MALICIOUS_CODE EI_EXPOSE_REP 1203 Medium
org.opentrafficsim.road.network.Lane.getType() may expose internal representation by returning Lane.laneType MALICIOUS_CODE EI_EXPOSE_REP 1180 Medium
new org.opentrafficsim.road.network.Lane(CrossSectionLink, String, CrossSectionGeometry, LaneType, LaneSpeedLimits) may expose internal representation by storing an externally mutable object into Lane.laneType MALICIOUS_CODE EI_EXPOSE_REP2 188 Medium
org.opentrafficsim.road.network.Lane.getGtuList(Duration) may expose internal representation by storing an externally mutable object into Lane.gtuListTime MALICIOUS_CODE EI_EXPOSE_REP2 1205 Medium
org.opentrafficsim.road.network.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 594 Medium
org.opentrafficsim.road.network.Lane.getObjectAhead(Length) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 888 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.LanePosition

Bug Category Details Line Priority
org.opentrafficsim.road.network.LanePosition.lane() may expose internal representation by returning LanePosition.lane MALICIOUS_CODE EI_EXPOSE_REP 18 Medium
org.opentrafficsim.road.network.LanePosition.position() may expose internal representation by returning LanePosition.position MALICIOUS_CODE EI_EXPOSE_REP 18 Medium
new org.opentrafficsim.road.network.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.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.RoadMarkerAcross

Bug Category Details Line Priority
org.opentrafficsim.road.network.RoadMarkerAcross.getLongitudinalPosition() may expose internal representation by returning RoadMarkerAcross.longitudinalPosition MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
new org.opentrafficsim.road.network.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.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 488 Medium
Should org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 404-505 Medium

org.opentrafficsim.road.network.Shoulder

Bug Category Details Line Priority
org.opentrafficsim.road.network.Shoulder doesn't override Lane.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.road.network.Stripe

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.Stripe at new org.opentrafficsim.road.network.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.Stripe.getDashOffset() may expose internal representation by returning Stripe.dashOffset MALICIOUS_CODE EI_EXPOSE_REP 99 Medium
org.opentrafficsim.road.network.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.StripeData

Bug Category Details Line Priority
org.opentrafficsim.road.network.StripeData.getElements() may expose internal representation by returning StripeData.elements MALICIOUS_CODE EI_EXPOSE_REP 88 Medium
new org.opentrafficsim.road.network.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.StripeData.setElements(List) may expose internal representation by storing an externally mutable object into StripeData.elements MALICIOUS_CODE EI_EXPOSE_REP2 97 Medium

org.opentrafficsim.road.network.conflict.Conflict

Bug Category Details Line Priority
new org.opentrafficsim.road.network.conflict.Conflict(Lane, Length, Length, Polygon2d, ConflictType, ConflictRule, boolean) uses the same code for two branches STYLE DB_DUPLICATE_BRANCHES 162 Medium
org.opentrafficsim.road.network.conflict.Conflict.getLength() may expose internal representation by returning Conflict.length MALICIOUS_CODE EI_EXPOSE_REP 424 Medium
org.opentrafficsim.road.network.conflict.Conflict.getOtherConflict() may expose internal representation by returning Conflict.otherConflict MALICIOUS_CODE EI_EXPOSE_REP 433 Medium
org.opentrafficsim.road.network.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by returning Conflict.trafficLightDistance MALICIOUS_CODE EI_EXPOSE_REP 491 Medium
org.opentrafficsim.road.network.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by storing an externally mutable object into Conflict.maxMaxTrafficLightDistance MALICIOUS_CODE EI_EXPOSE_REP2 456 Medium

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

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

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

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

org.opentrafficsim.road.network.conflict.ConflictBuilder

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

org.opentrafficsim.road.network.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.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 345 Medium
org.opentrafficsim.road.network.factory.LaneFactory.leftToRight(double, Length, LaneType, LaneSpeedLimits) may expose internal representation by storing an externally mutable object into LaneFactory.laneType0 MALICIOUS_CODE EI_EXPOSE_REP2 170 Medium
org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, LaneSpeedLimits) may expose internal representation by storing an externally mutable object into LaneFactory.laneType0 MALICIOUS_CODE EI_EXPOSE_REP2 196 Medium
org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, LaneSpeedLimits) may expose internal representation by storing an externally mutable object into LaneFactory.laneWidth0 MALICIOUS_CODE EI_EXPOSE_REP2 195 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 227 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 216 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 137 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 141 Medium

org.opentrafficsim.road.network.object.AbstractLaneBasedObject

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.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.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.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.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.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.object.AbstractLaneBasedObject.getLane() may expose internal representation by returning AbstractLaneBasedObject.lane MALICIOUS_CODE EI_EXPOSE_REP 148 Medium
org.opentrafficsim.road.network.object.AbstractLaneBasedObject.getLongitudinalPosition() may expose internal representation by returning AbstractLaneBasedObject.longitudinalPosition MALICIOUS_CODE EI_EXPOSE_REP 154 Medium

org.opentrafficsim.road.network.object.BusStop

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

org.opentrafficsim.road.network.object.LocalDistraction

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.object.LocalDistraction at new org.opentrafficsim.road.network.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.object.LocalDistraction.getRange() may expose internal representation by returning LocalDistraction.range MALICIOUS_CODE EI_EXPOSE_REP 60 Medium
new org.opentrafficsim.road.network.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.object.RoadSideDistraction

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.object.RoadSideDistraction at new org.opentrafficsim.road.network.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.object.RoadSideDistraction$TrapezoidProfile

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.object.RoadSideDistraction$TrapezoidProfile at new org.opentrafficsim.road.network.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.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.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.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.object.detector.LaneDetector

Bug Category Details Line Priority
org.opentrafficsim.road.network.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.object.detector.LaneDetector at new org.opentrafficsim.road.network.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.object.detector.LaneDetector at new org.opentrafficsim.road.network.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.object.detector.LaneDetector.getType() may expose internal representation by returning LaneDetector.detectorType MALICIOUS_CODE EI_EXPOSE_REP 125 Medium
new org.opentrafficsim.road.network.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.object.detector.LoopDetector

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.object.detector.LoopDetector at new org.opentrafficsim.road.network.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 239 Medium
Exception thrown in class org.opentrafficsim.road.network.object.detector.LoopDetector at new org.opentrafficsim.road.network.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Duration, 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.object.detector.LoopDetector.getLength() may expose internal representation by returning LoopDetector.length MALICIOUS_CODE EI_EXPOSE_REP 336 Medium
new org.opentrafficsim.road.network.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Duration, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.aggregation MALICIOUS_CODE EI_EXPOSE_REP2 264 Medium
new org.opentrafficsim.road.network.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Duration, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.firstAggregation MALICIOUS_CODE EI_EXPOSE_REP2 265 Medium
new org.opentrafficsim.road.network.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Duration, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.length MALICIOUS_CODE EI_EXPOSE_REP2 262 Medium

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

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

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

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.object.detector.TrafficLightDetector at new org.opentrafficsim.road.network.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.object.detector.TrafficLightDetector.getType() may expose internal representation by returning TrafficLightDetector.type MALICIOUS_CODE EI_EXPOSE_REP 425 Medium
new org.opentrafficsim.road.network.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.object.detector.TrafficLightDetector$StartEndDetector

Bug Category Details Line Priority
org.opentrafficsim.road.network.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.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.object.trafficlight.TrafficLight

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.object.trafficlight.TrafficLight at new org.opentrafficsim.road.network.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.object.trafficlight.TrafficLight at new org.opentrafficsim.road.network.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 70 Medium
Do not catch NullPointerException like in org.opentrafficsim.road.network.sampling.GtuDataRoad.getOriginId() STYLE DCN_NULLPOINTER_EXCEPTION 57 Medium
org.opentrafficsim.road.network.sampling.GtuDataRoad.getGtu() may expose internal representation by returning GtuDataRoad.gtu MALICIOUS_CODE EI_EXPOSE_REP 41 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 32 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.LaneSpeedLimits

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.road.network.speed.LaneSpeedLimits at new org.opentrafficsim.road.network.speed.LaneSpeedLimits(Map) 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
Exception thrown in class org.opentrafficsim.road.network.speed.LaneSpeedLimits at new org.opentrafficsim.road.network.speed.LaneSpeedLimits(Speed) 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
Exception thrown in class org.opentrafficsim.road.network.speed.LaneSpeedLimits at new org.opentrafficsim.road.network.speed.LaneSpeedLimits(Speed, Map) 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.network.speed.SpeedLimit

Bug Category Details Line Priority
org.opentrafficsim.road.network.speed.SpeedLimit.speed() may expose internal representation by returning SpeedLimit.speed MALICIOUS_CODE EI_EXPOSE_REP 15 Medium
new org.opentrafficsim.road.network.speed.SpeedLimit(Speed, boolean) may expose internal representation by storing an externally mutable object into SpeedLimit.speed MALICIOUS_CODE EI_EXPOSE_REP2 15 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