SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.8.6
Threshold is medium
Effort is default
Summary
| Classes | Bugs | Errors | Missing Classes |
|---|---|---|---|
| 547 | 496 | 0 | 0 |
Files
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 | 145 | 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 | 962 | 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 | 964 | 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 | 965 | 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 | 888 | 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 | 76 | 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 | 65 | 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, 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 | 201 | Medium |
| org.opentrafficsim.road.gtu.generator.Injections.getAllPositions() may expose internal representation by returning Injections.allLanePositions | MALICIOUS_CODE | EI_EXPOSE_REP | 532 | Medium |
| new org.opentrafficsim.road.gtu.generator.Injections(Table, Network, ImmutableMap, LaneBasedStrategicalPlannerFactory, StreamInterface, Duration) may expose internal representation by storing an externally mutable object into Injections.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 206 | Medium |
| new org.opentrafficsim.road.gtu.generator.Injections(Table, Network, ImmutableMap, LaneBasedStrategicalPlannerFactory, StreamInterface, Duration) may expose internal representation by storing an externally mutable object into Injections.stream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 210 | Medium |
| new org.opentrafficsim.road.gtu.generator.Injections(Table, Network, ImmutableMap, LaneBasedStrategicalPlannerFactory, StreamInterface, Duration) may expose internal representation by storing an externally mutable object into Injections.timeToCollision | MALICIOUS_CODE | EI_EXPOSE_REP2 | 209 | Medium |
| Inconsistent synchronization of org.opentrafficsim.road.gtu.generator.Injections.characteristicsRow; locked 66% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 587 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator at new org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator(String, Generator, 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 | 167 | Medium |
| new org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator(String, Generator, 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 | 160 | 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 | 182 | 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 | 342 | Medium |
| Class org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator defines non-transient non-serializable instance field errorHandler | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator defines non-transient non-serializable instance field generatorPositions | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator defines non-transient non-serializable instance field roomChecker | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator defines non-transient non-serializable instance field unplacedTemplates | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 238 | 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.getQueueLength(GeneratorPositions$GeneratorLanePosition) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 555 | 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 | 648 | 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 | 629 | Medium |
org.opentrafficsim.road.gtu.generator.Platoons
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.generator.Platoons.addPlatoon(Time, Time) may expose internal representation by storing an externally mutable object into Platoons.endTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 172 | Medium |
| org.opentrafficsim.road.gtu.generator.Platoons.addPlatoon(Time, Time) may expose internal representation by storing an externally mutable object into Platoons.startTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 171 | 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 | 187 | 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 | 186 | 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 | 235 | Medium |
org.opentrafficsim.road.gtu.generator.Platoons$PlatoonGtu
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.generator.Platoons$PlatoonGtu defines compareTo(Platoons$PlatoonGtu) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 401-405 | Medium |
org.opentrafficsim.road.gtu.generator.TtcRoomChecker
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.generator.TtcRoomChecker.getTtc() may expose internal representation by returning TtcRoomChecker.ttc | MALICIOUS_CODE | EI_EXPOSE_REP | 74 | Medium |
| new org.opentrafficsim.road.gtu.generator.TtcRoomChecker(Duration) may expose internal representation by storing an externally mutable object into TtcRoomChecker.ttc | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | Medium |
org.opentrafficsim.road.gtu.generator.characteristics.DefaultLaneBasedGtuCharacteristicsGeneratorOd$Factory
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.generator.characteristics.DefaultLaneBasedGtuCharacteristicsGeneratorOd$Factory.setTemplates(Set) may expose internal representation by storing an externally mutable object into DefaultLaneBasedGtuCharacteristicsGeneratorOd$Factory.templates | MALICIOUS_CODE | EI_EXPOSE_REP2 | 183 | 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 | 90 | 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 | 57 | 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 | 56 | Medium |
| Class org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics defines non-transient non-serializable instance field vehicleModel | BAD_PRACTICE | SE_BAD_FIELD | Not available | 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, Generator, Generator, Generator, LaneBasedStrategicalPlannerFactory, Generator) 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.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 | 50 | 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 | 22 | Medium |
| org.opentrafficsim.road.gtu.generator.headway.DemandPattern.timeVector() may expose internal representation by returning DemandPattern.timeVector | MALICIOUS_CODE | EI_EXPOSE_REP | 22 | Medium |
| new org.opentrafficsim.road.gtu.generator.headway.DemandPattern(FrequencyVector, TimeVector, Interpolation) may expose internal representation by storing an externally mutable object into DemandPattern.demandVector | MALICIOUS_CODE | EI_EXPOSE_REP2 | 22 | Medium |
| new org.opentrafficsim.road.gtu.generator.headway.DemandPattern(FrequencyVector, TimeVector, Interpolation) may expose internal representation by storing an externally mutable object into DemandPattern.timeVector | MALICIOUS_CODE | EI_EXPOSE_REP2 | 22 | 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 | 35 | 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 | 36 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedMoveChecker
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.AbstractLaneBasedMoveChecker(Network) may expose internal representation by storing an externally mutable object into AbstractLaneBasedMoveChecker.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
org.opentrafficsim.road.gtu.lane.AccelerationChecker
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.AccelerationChecker(Network, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.max | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
| new org.opentrafficsim.road.gtu.lane.AccelerationChecker(Network, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.min | MALICIOUS_CODE | EI_EXPOSE_REP2 | 49 | Medium |
| new org.opentrafficsim.road.gtu.lane.AccelerationChecker(Network, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.minSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 51 | Medium |
org.opentrafficsim.road.gtu.lane.Break
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Boxing/unboxing to parse a primitive org.opentrafficsim.road.gtu.lane.Break.timeFromString(String) | PERFORMANCE | DM_BOXED_PRIMITIVE_FOR_PARSING | 110 | High |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Dead store to pos in org.opentrafficsim.road.gtu.lane.LaneBasedGtu.scheduleLeaveEvent() | STYLE | DLS_DEAD_LOCAL_STORE | 759 | Medium |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getCarFollowingAcceleration() may expose internal representation by returning LaneBasedGtu.cachedCarFollowingAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 1509 | Medium |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getDesiredSpeed() may expose internal representation by returning LaneBasedGtu.cachedDesiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 1474 | Medium |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu.setNoLaneChangeDistance(Length) may expose internal representation by storing an externally mutable object into LaneBasedGtu.noLaneChangeDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1642 | Medium |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu doesn't override org.opentrafficsim.core.gtu.Gtu.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
| Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.LaneBasedGtu.finalizeLaneChangeEvent; locked 42% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 486 | Medium |
| Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.LaneBasedGtu.pendingEnterTrigger; locked 40% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 575 | Medium |
| Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.LaneBasedGtu.pendingLeaveTrigger; locked 50% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 579 | Medium |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu.CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 159 | Medium |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu.NON_CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 163 | Medium |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu.CACHING isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 155 | High |
| org.opentrafficsim.road.gtu.lane.LaneBasedGtu.eventMargin isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 148 | High |
| Possible null pointer dereference of longitudinalPosition in org.opentrafficsim.road.gtu.lane.LaneBasedGtu.init(LaneBasedStrategicalPlanner, LanePosition, Speed) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 208 | High |
| Primitive field org.opentrafficsim.road.gtu.lane.LaneBasedGtu.CACHED_POSITION is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. | BAD_PRACTICE | PA_PUBLIC_PRIMITIVE_ATTRIBUTE | 159 | Medium |
| Primitive field org.opentrafficsim.road.gtu.lane.LaneBasedGtu.NON_CACHED_POSITION is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. | BAD_PRACTICE | PA_PUBLIC_PRIMITIVE_ATTRIBUTE | 163 | Medium |
| Exception is caught when Exception is not thrown in org.opentrafficsim.road.gtu.lane.LaneBasedGtu.position(Lane, RelativePosition, Time) | STYLE | REC_CATCH_EXCEPTION | 1212 | Medium |
| Class org.opentrafficsim.road.gtu.lane.LaneBasedGtu defines non-transient non-serializable instance field cachedPositions | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.LaneBasedGtu defines non-transient non-serializable instance field crossSections | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.LaneBasedGtu defines non-transient non-serializable instance field turnIndicatorStatus | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.LaneBasedGtu defines non-transient non-serializable instance field vehicleModel | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field LaneBasedGtu.turnIndicatorStatus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 191 | Medium |
| Static field "CACHED_POSITION" is modified by an instance level synchronization lock. | MT_CORRECTNESS | SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA | 1092 | Medium |
org.opentrafficsim.road.gtu.lane.MultiLaneBasedMoveChecker
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.MultiLaneBasedMoveChecker at new org.opentrafficsim.road.gtu.lane.MultiLaneBasedMoveChecker(Network, AbstractLaneBasedMoveChecker[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 44 | Medium |
org.opentrafficsim.road.gtu.lane.VehicleModel$MassBased
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.VehicleModel$MassBased.getMass() may expose internal representation by returning VehicleModel$MassBased.mass | MALICIOUS_CODE | EI_EXPOSE_REP | 135 | Medium |
| new org.opentrafficsim.road.gtu.lane.VehicleModel$MassBased(Mass, double) may expose internal representation by storing an externally mutable object into VehicleModel$MassBased.mass | MALICIOUS_CODE | EI_EXPOSE_REP2 | 122 | Medium |
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.first; locked 50% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 173 | Medium |
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry(AbstractPerceptionReiterable, Object, Length) may expose internal representation by storing an externally mutable object into AbstractPerceptionReiterable$PrimaryIteratorEntry.distance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 348 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry(AbstractPerceptionReiterable, Object, Length) may expose internal representation by storing an externally mutable object into AbstractPerceptionReiterable$PrimaryIteratorEntry.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 346 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry defines compareTo(AbstractPerceptionReiterable$PrimaryIteratorEntry) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 354 | Medium |
org.opentrafficsim.road.gtu.lane.perception.CategoricalLanePerception
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.CategoricalLanePerception.getLaneStructure() may expose internal representation by returning CategoricalLanePerception.laneStructure | MALICIOUS_CODE | EI_EXPOSE_REP | 81 | Medium |
| Class org.opentrafficsim.road.gtu.lane.perception.CategoricalLanePerception defines non-transient non-serializable instance field laneStructure | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.perception.CategoricalLanePerception defines non-transient non-serializable instance field mental | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance.distance() may expose internal representation by returning PerceptionCollectable$UnderlyingDistance.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 187 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance(Object, Length) may expose internal representation by storing an externally mutable object into PerceptionCollectable$UnderlyingDistance.distance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 187 | Medium |
org.opentrafficsim.road.gtu.lane.perception.PerceptionIterableSet
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.PerceptionIterableSet(SortedSet) may expose internal representation by storing an externally mutable object into PerceptionIterableSet.set | MALICIOUS_CODE | EI_EXPOSE_REP2 | 52 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RelativeLane
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.RelativeLane at new org.opentrafficsim.road.gtu.lane.perception.RelativeLane(LateralDirectionality, int) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 61 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.AnticipationDensity$CountAndDistance
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.categories.AnticipationDensity$CountAndDistance.getDistance() may expose internal representation by returning AnticipationDensity$CountAndDistance.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 110 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.categories.AnticipationDensity$CountAndDistance.setDistance(Length) may expose internal representation by storing an externally mutable object into AnticipationDensity$CountAndDistance.distance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 118 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.DirectDefaultSimplePerception
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Call to org.opentrafficsim.road.gtu.lane.LaneBasedGtu.equals(org.opentrafficsim.road.gtu.lane.perception.categories.DirectDefaultSimplePerception) in org.opentrafficsim.road.gtu.lane.perception.categories.DirectDefaultSimplePerception.parallel(Lane, Time) | CORRECTNESS | EC_UNRELATED_TYPES | 893 | High |
org.opentrafficsim.road.gtu.lane.perception.categories.DirectIntersectionPerception
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Class org.opentrafficsim.road.gtu.lane.perception.categories.DirectIntersectionPerception defines non-transient non-serializable instance field headwayGtuType | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.WienerProcess
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.categories.WienerProcess(StreamInterface, double, double, Duration, OtsSimulatorInterface) may expose internal representation by storing an externally mutable object into WienerProcess.tau | MALICIOUS_CODE | EI_EXPOSE_REP2 | 67 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.CaccPerception
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Class org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.CaccPerception defines non-transient non-serializable instance field sensors | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.DirectNeighborsPerception
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Class org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.DirectNeighborsPerception defines non-transient non-serializable instance field headwayGtuType | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.acceleration() may expose internal representation by returning NeighborTriplet.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 20 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.headway() may expose internal representation by returning NeighborTriplet.headway | MALICIOUS_CODE | EI_EXPOSE_REP | 20 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.speed() may expose internal representation by returning NeighborTriplet.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 20 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet(Length, Speed, Acceleration) may expose internal representation by storing an externally mutable object into NeighborTriplet.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 20 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet(Length, Speed, Acceleration) may expose internal representation by storing an externally mutable object into NeighborTriplet.headway | MALICIOUS_CODE | EI_EXPOSE_REP2 | 20 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet(Length, Speed, Acceleration) may expose internal representation by storing an externally mutable object into NeighborTriplet.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 20 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.TaskHeadwayCollector
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.TaskHeadwayCollector(Speed) may expose internal representation by storing an externally mutable object into TaskHeadwayCollector.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway(Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 106 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway(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 | 119 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway(Length, 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 | 87 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getDistance() may expose internal representation by returning AbstractHeadway.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 125 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlap() may expose internal representation by returning AbstractHeadway.overlap | MALICIOUS_CODE | EI_EXPOSE_REP | 143 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlapFront() may expose internal representation by returning AbstractHeadway.overlapFront | MALICIOUS_CODE | EI_EXPOSE_REP | 131 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlapRear() may expose internal representation by returning AbstractHeadway.overlapRear | MALICIOUS_CODE | EI_EXPOSE_REP | 137 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 103 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, 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 | 167 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, 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 | 136 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, Length, 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 | 205 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, Length, Length, Length, Length, Speed, Acceleration) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 188 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, Length, Length, Length, Speed, Acceleration) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 121 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, Length, Length, Speed, Acceleration) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 152 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, Length, Length, Speed, Acceleration, 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 | 70 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy(Headway$ObjectType, String, Length, Speed, Acceleration) 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.gtu.lane.perception.headway.AbstractHeadwayCopy.getAcceleration() may expose internal representation by returning AbstractHeadwayCopy.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 236 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy.getLength() may expose internal representation by returning AbstractHeadwayCopy.length | MALICIOUS_CODE | EI_EXPOSE_REP | 218 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy.getSpeed() may expose internal representation by returning AbstractHeadwayCopy.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 224 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, Length, Length, boolean, Length, Length, Speed, Acceleration, Speed, GtuStatus[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 141 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, Length, Length, boolean, Length, Length, Speed, GtuStatus[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 172 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, boolean, Length, Length, Speed, Acceleration, Speed, GtuStatus[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 80 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu at new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, boolean, Length, Length, Speed, GtuStatus[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 107 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu.getDesiredSpeed() may expose internal representation by returning AbstractHeadwayGtu.desiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 195 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu.getWidth() may expose internal representation by returning AbstractHeadwayGtu.width | MALICIOUS_CODE | EI_EXPOSE_REP | 302 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, Length, Length, boolean, Length, Length, Speed, Acceleration, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.desiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 145 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, Length, Length, boolean, Length, Length, Speed, Acceleration, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 142 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, Length, Length, boolean, Length, Length, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.desiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 176 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, Length, Length, boolean, Length, Length, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 173 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, boolean, Length, Length, Speed, Acceleration, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.desiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 84 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, boolean, Length, Length, Speed, Acceleration, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 81 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, boolean, Length, Length, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.desiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 111 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu(String, GtuType, Length, boolean, Length, Length, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into AbstractHeadwayGtu.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 108 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayLaneBasedObject
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayLaneBasedObject.getLane() may expose internal representation by returning AbstractHeadwayLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 95 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayLaneBasedObject(Headway$ObjectType, String, Length, Length, Length, Length, Lane) may expose internal representation by storing an externally mutable object into AbstractHeadwayLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayLaneBasedObject(Headway$ObjectType, String, Length, Length, Length, Lane) may expose internal representation by storing an externally mutable object into AbstractHeadwayLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 58 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayLaneBasedObject(Headway$ObjectType, String, Length, Length, Lane) may expose internal representation by storing an externally mutable object into AbstractHeadwayLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 74 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayLaneBasedObject(Headway$ObjectType, String, Length, Lane) may expose internal representation by storing an externally mutable object into AbstractHeadwayLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 89 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayBusStop
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayBusStop.getConflictIds() may expose internal representation by returning HeadwayBusStop.conflictIds | MALICIOUS_CODE | EI_EXPOSE_REP | 74 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayBusStop(BusStop, Length, RelativeLane, Set, Lane) may expose internal representation by storing an externally mutable object into HeadwayBusStop.conflictIds | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict at new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict(ConflictType, ConflictPriority, Class, String, Length, Length, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, HeadwayConflict$Width, HeadwayStopLine, HeadwayStopLine, Lane) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 110 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict at new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict(ConflictType, ConflictPriority, Class, String, Length, Length, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, HeadwayConflict$Width, Lane) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 161 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingLength() may expose internal representation by returning HeadwayConflict.conflictingLength | MALICIOUS_CODE | EI_EXPOSE_REP | 217 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingLink() may expose internal representation by returning HeadwayConflict.conflictingLink | MALICIOUS_CODE | EI_EXPOSE_REP | 266 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingSpeedLimit() may expose internal representation by returning HeadwayConflict.conflictingSpeedLimit | MALICIOUS_CODE | EI_EXPOSE_REP | 257 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingTrafficLightDistance() may expose internal representation by returning HeadwayConflict.conflictingTrafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 302 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingVisibility() may expose internal representation by returning HeadwayConflict.conflictingVisibility | MALICIOUS_CODE | EI_EXPOSE_REP | 248 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict(ConflictType, ConflictPriority, Class, String, Length, Length, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, HeadwayConflict$Width, HeadwayStopLine, HeadwayStopLine, Lane) may expose internal representation by storing an externally mutable object into HeadwayConflict.conflictingLength | MALICIOUS_CODE | EI_EXPOSE_REP2 | 124 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict(ConflictType, ConflictPriority, Class, String, Length, Length, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, HeadwayConflict$Width, HeadwayStopLine, HeadwayStopLine, Lane) may expose internal representation by storing an externally mutable object into HeadwayConflict.conflictingLink | MALICIOUS_CODE | EI_EXPOSE_REP2 | 129 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict(ConflictType, ConflictPriority, Class, String, Length, Length, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, HeadwayConflict$Width, HeadwayStopLine, HeadwayStopLine, Lane) may expose internal representation by storing an externally mutable object into HeadwayConflict.conflictingSpeedLimit | MALICIOUS_CODE | EI_EXPOSE_REP2 | 128 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict(ConflictType, ConflictPriority, Class, String, Length, Length, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, HeadwayConflict$Width, HeadwayStopLine, HeadwayStopLine, Lane) may expose internal representation by storing an externally mutable object into HeadwayConflict.conflictingVisibility | MALICIOUS_CODE | EI_EXPOSE_REP2 | 127 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.setConflictingTrafficLight(Length, boolean) may expose internal representation by storing an externally mutable object into HeadwayConflict.conflictingTrafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 321 | Medium |
| Class org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict defines non-transient non-serializable instance field downstreamConflictingGTUs | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict defines non-transient non-serializable instance field upstreamConflictingGTUs | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict defines non-transient non-serializable instance field width | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict$Width
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict$Width at new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict$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 | 368 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict$Width(double[], LengthVector) may expose internal representation by storing an externally mutable object into HeadwayConflict$Width.fractions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 379 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict$Width(double[], LengthVector) may expose internal representation by storing an externally mutable object into HeadwayConflict$Width.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 380 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayDistance
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayDistance.getDistance() may expose internal representation by returning HeadwayDistance.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 69 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayDistance(Length) may expose internal representation by storing an externally mutable object into HeadwayDistance.distance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuReal
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuReal.getGtu() may expose internal representation by returning HeadwayGtuReal.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 193 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuReal.getSpeedLimitInfo() may expose internal representation by returning HeadwayGtuReal.speedLimitInfo | MALICIOUS_CODE | EI_EXPOSE_REP | 126 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuReal(LaneBasedGtu, Length, Length, Length, boolean) may expose internal representation by storing an externally mutable object into HeadwayGtuReal.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 82 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuReal(LaneBasedGtu, Length, boolean) may expose internal representation by storing an externally mutable object into HeadwayGtuReal.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuRealCopy
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuRealCopy.getParameters() may expose internal representation by returning HeadwayGtuRealCopy.parameters | MALICIOUS_CODE | EI_EXPOSE_REP | 164 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuRealCopy.getSpeedLimitInfo() may expose internal representation by returning HeadwayGtuRealCopy.speedLimitInfo | MALICIOUS_CODE | EI_EXPOSE_REP | 170 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuType
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuType(String, GtuType, GtuTypeAssumptions, Length, Length, Length, Length, Length, Speed) may expose internal representation by storing an externally mutable object into HeadwayGtuType.gtuTypeAssumptions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 128 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuType(String, GtuType, GtuTypeAssumptions, Length, Length, Length, Length, Length, Speed, Acceleration, Speed) may expose internal representation by storing an externally mutable object into HeadwayGtuType.gtuTypeAssumptions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 107 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuType(String, GtuType, GtuTypeAssumptions, Length, Length, Length, Speed) may expose internal representation by storing an externally mutable object into HeadwayGtuType.gtuTypeAssumptions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 83 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuType(String, GtuType, GtuTypeAssumptions, Length, Length, Length, Speed, Acceleration, Speed, GtuStatus[]) may expose internal representation by storing an externally mutable object into HeadwayGtuType.gtuTypeAssumptions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayTrafficLightReal
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayTrafficLightReal(TrafficLight, Length, boolean) may expose internal representation by storing an externally mutable object into HeadwayTrafficLightReal.trafficLight | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.ExponentialTask
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.mental.ExponentialTask(String, double, double, Duration, OtsSimulatorInterface) may expose internal representation by storing an externally mutable object into ExponentialTask.tau | MALICIOUS_CODE | EI_EXPOSE_REP2 | 42 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.Fuller
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.Fuller at new org.opentrafficsim.road.gtu.lane.perception.mental.Fuller(Set, Set) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 112 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.Fuller at new org.opentrafficsim.road.gtu.lane.perception.mental.Fuller(Set, Set, TaskManager) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 124 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.mental.Fuller(Set, Set, TaskManager) may expose internal representation by storing an externally mutable object into Fuller.behavioralAdapatations | MALICIOUS_CODE | EI_EXPOSE_REP2 | 128 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.TaskLaneChanging
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Redundant nullcheck of h1, which is known to be non-null in org.opentrafficsim.road.gtu.lane.perception.mental.TaskLaneChanging.getHeadway(LanePerception, LaneBasedGtu, Parameters) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 76 | High |
org.opentrafficsim.road.gtu.lane.perception.mental.TaskRoadSideDistraction
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.mental.TaskRoadSideDistraction.calculateTaskDemand(LanePerception, LaneBasedGtu, Parameters) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 61 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getAverageDuration() may expose internal representation by returning DefaultDistraction.averageDuration | MALICIOUS_CODE | EI_EXPOSE_REP | 174 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getFrequency() may expose internal representation by returning DefaultDistraction.frequency | MALICIOUS_CODE | EI_EXPOSE_REP | 156 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getStdDuration() may expose internal representation by returning DefaultDistraction.stdDuration | MALICIOUS_CODE | EI_EXPOSE_REP | 183 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction at new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction(String, String, Frequency, double, Duration, Duration, StreamInterface, TaskSupplier) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 63 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction(String, String, Frequency, double, Duration, Duration, StreamInterface, TaskSupplier) may expose internal representation by storing an externally mutable object into Distraction.frequency | MALICIOUS_CODE | EI_EXPOSE_REP2 | 71 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.Distraction(String, String, Frequency, double, Duration, Duration, StreamInterface, TaskSupplier) may expose internal representation by storing an externally mutable object into Distraction.stream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 73 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DistractionFactory
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DistractionFactory.build() may expose internal representation by returning DistractionFactory.list | MALICIOUS_CODE | EI_EXPOSE_REP | 109 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DistractionFactory(StreamInterface) may expose internal representation by storing an externally mutable object into DistractionFactory.stream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel at new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, OtsSimulatorInterface, RoadNetwork) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 68 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, OtsSimulatorInterface, RoadNetwork) may expose internal representation by storing an externally mutable object into StochasticDistractionModel.distractions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 72 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, OtsSimulatorInterface, RoadNetwork) may expose internal representation by storing an externally mutable object into StochasticDistractionModel.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 74 | Medium |
org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getLane() may expose internal representation by returning LaneRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 66 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getMergeDistance() may expose internal representation by returning LaneRecord.mergeDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 100 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getNext() may expose internal representation by returning LaneRecord.next | MALICIOUS_CODE | EI_EXPOSE_REP | 115 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getPrev() may expose internal representation by returning LaneRecord.prev | MALICIOUS_CODE | EI_EXPOSE_REP | 130 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.getStartDistance() may expose internal representation by returning LaneRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 85 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord.lateral() may expose internal representation by returning LaneRecord.lat | MALICIOUS_CODE | EI_EXPOSE_REP | 145 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord(Lane, RelativeLane, Length, Length) may expose internal representation by storing an externally mutable object into LaneRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 53 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord(Lane, RelativeLane, Length, Length) may expose internal representation by storing an externally mutable object into LaneRecord.mergeDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.LaneRecord(Lane, RelativeLane, Length, Length) may expose internal representation by storing an externally mutable object into LaneRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure(LaneBasedGtu, Length, Length) may expose internal representation by storing an externally mutable object into LaneStructure.downstream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 70 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure(LaneBasedGtu, Length, Length) may expose internal representation by storing an externally mutable object into LaneStructure.egoGtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 68 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.LaneStructure(LaneBasedGtu, Length, Length) may expose internal representation by storing an externally mutable object into LaneStructure.upstream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 69 | Medium |
org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable(Class, Length, Collection, Function, Function, BiFunction) may expose internal representation by storing an externally mutable object into NavigatingIterable.range | MALICIOUS_CODE | EI_EXPOSE_REP2 | 71 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable(Class, Length, Collection, Function, Function, BiFunction) may expose internal representation by storing an externally mutable object into NavigatingIterable.start | MALICIOUS_CODE | EI_EXPOSE_REP2 | 72 | Medium |
org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry.distance() may expose internal representation by returning NavigatingIterable$Entry.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 269 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry.merge() may expose internal representation by returning NavigatingIterable$Entry.merge | MALICIOUS_CODE | EI_EXPOSE_REP | 269 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry(Length, Length, Object) may expose internal representation by storing an externally mutable object into NavigatingIterable$Entry.distance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 269 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable$Entry(Length, Length, Object) may expose internal representation by storing an externally mutable object into NavigatingIterable$Entry.merge | MALICIOUS_CODE | EI_EXPOSE_REP2 | 269 | Medium |
org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getLane() may expose internal representation by returning SimpleLaneRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 94 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getNext() may expose internal representation by returning SimpleLaneRecord.next | MALICIOUS_CODE | EI_EXPOSE_REP | 67 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getPrev() may expose internal representation by returning SimpleLaneRecord.prev | MALICIOUS_CODE | EI_EXPOSE_REP | 82 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord.getStartDistance() may expose internal representation by returning SimpleLaneRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 88 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord(Lane, Length, GtuType) may expose internal representation by storing an externally mutable object into SimpleLaneRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 49 | Medium |
| new org.opentrafficsim.road.gtu.lane.perception.structure.SimpleLaneRecord(Lane, Length, GtuType) may expose internal representation by storing an externally mutable object into SimpleLaneRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneBasedOperationalPlan
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.plan.operational.LaneBasedOperationalPlan doesn't override org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.getMinimumLaneChangeDistance() may expose internal representation by returning LaneChange.minimumLaneChangeDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 106 | Medium |
| new org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange(Length, Duration) may expose internal representation by storing an externally mutable object into LaneChange.desiredLaneChangeDuration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 97 | Medium |
| new org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange(Length, Duration) may expose internal representation by storing an externally mutable object into LaneChange.minimumLaneChangeDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 96 | Medium |
| org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.setBoundary(Length) may expose internal representation by storing an externally mutable object into LaneChange.boundary | MALICIOUS_CODE | EI_EXPOSE_REP2 | 126 | Medium |
| org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.setDesiredLaneChangeDuration(Duration) may expose internal representation by storing an externally mutable object into LaneChange.desiredLaneChangeDuration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 115 | Medium |
| org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.MIN_LC_LENGTH_FACTOR isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 78 | High |
| Class org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange defines non-transient non-serializable instance field laneChangePath | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Dead store to cumulLcLength in org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath.getPathRecursive(Length, Speed, double, double, LanePosition, OrientedPoint2d, OtsLine2d, OtsLine2d, Duration, double, double) | STYLE | DLS_DEAD_LOCAL_STORE | 704 | Medium |
| Dead store to f in org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath.getPathRecursive(Length, Speed, double, double, LanePosition, OrientedPoint2d, OtsLine2d, OtsLine2d, Duration, double, double) | STYLE | DLS_DEAD_LOCAL_STORE | 700 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Null passed for non-null parameter of org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getNextLaneForRoute(Lane) in org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.createPathAlongCenterLine(LaneBasedGtu, Length) | CORRECTNESS | NP_NULL_PARAM_DEREF | 137 | High |
| Null passed for non-null parameter of LaneChange.getPath(Duration, LaneBasedGtu, LanePosition, OrientedPoint2d, Length, LateralDirectionality) in org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.buildAccelerationLaneChangePlan(LaneBasedGtu, LateralDirectionality, OrientedPoint2d, Time, Speed, Acceleration, Duration, LaneChange) | CORRECTNESS | NP_NULL_PARAM_DEREF | 256 | Medium |
| org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.buildAccelerationLaneChangePlan(LaneBasedGtu, LateralDirectionality, OrientedPoint2d, Time, Speed, Acceleration, Duration, LaneChange) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 248 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 54 | Medium |
| Exception thrown in class org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan at new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration, LateralDirectionality) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 65 | Medium |
| org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.getAcceleration() may expose internal representation by returning SimpleOperationalPlan.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 79 | Medium |
| org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.getDuration() may expose internal representation by returning SimpleOperationalPlan.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 97 | Medium |
| new org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan(Acceleration, Duration, LateralDirectionality) may expose internal representation by storing an externally mutable object into SimpleOperationalPlan.duration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 70 | Medium |
| org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.setAcceleration(Acceleration) may expose internal representation by storing an externally mutable object into SimpleOperationalPlan.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 89 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner.getGtu() may expose internal representation by returning AbstractLaneBasedTacticalPlanner.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 83 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner(CarFollowingModel, LaneBasedGtu, LanePerception) may expose internal representation by storing an externally mutable object into AbstractLaneBasedTacticalPlanner.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 76 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlanner
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Dead store to currentLaneFine in org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlanner.generateOperationalPlan(Time, OrientedPoint2d) | STYLE | DLS_DEAD_LOCAL_STORE | 148 | Medium |
| Dead store to nextSplitNode in org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlanner.suitability(Lane, Length, LaneBasedGtu, Duration) | STYLE | DLS_DEAD_LOCAL_STORE | 443 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlannerFactory
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlannerFactory(GtuFollowingModelOld, LaneChangeModel) may expose internal representation by storing an externally mutable object into LaneBasedCfLcTacticalPlannerFactory.carFollowingModel | MALICIOUS_CODE | EI_EXPOSE_REP2 | 48 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGtuFollowingTacticalPlannerFactory
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGtuFollowingTacticalPlannerFactory(GtuFollowingModelOld) may expose internal representation by storing an externally mutable object into LaneBasedGtuFollowingTacticalPlannerFactory.carFollowingModel | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo.laneList() may expose internal representation by returning LanePathInfo.laneList | MALICIOUS_CODE | EI_EXPOSE_REP | 34 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo.referencePosition() may expose internal representation by returning LanePathInfo.referencePosition | MALICIOUS_CODE | EI_EXPOSE_REP | 34 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo(OtsLine2d, List, Length) may expose internal representation by storing an externally mutable object into LanePathInfo.laneList | MALICIOUS_CODE | EI_EXPOSE_REP2 | 34 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo(OtsLine2d, List, Length) may expose internal representation by storing an externally mutable object into LanePathInfo.referencePosition | MALICIOUS_CODE | EI_EXPOSE_REP2 | 34 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo.correctCurrentLanes() may expose internal representation by returning NextSplitInfo.correctCurrentLanes | MALICIOUS_CODE | EI_EXPOSE_REP | 25 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo.nextSplitNode() may expose internal representation by returning NextSplitInfo.nextSplitNode | MALICIOUS_CODE | EI_EXPOSE_REP | 25 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo(Node, Set, LateralDirectionality) may expose internal representation by storing an externally mutable object into NextSplitInfo.correctCurrentLanes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 25 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo(Node, Set, LateralDirectionality) may expose internal representation by storing an externally mutable object into NextSplitInfo.nextSplitNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 25 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.AbstractGtuFollowingModelMobil
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Dead store to maximumSIDeceleration in org.opentrafficsim.road.gtu.lane.tactical.following.AbstractGtuFollowingModelMobil.minimumHeadway(Speed, Speed, Length, Length, Speed, Speed) | STYLE | DLS_DEAD_LOCAL_STORE | 225 | Medium |
| Return value of org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getTacticalPlanner() ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 73 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep.getAcceleration() may expose internal representation by returning AccelerationStep.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 51 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep.getDuration() may expose internal representation by returning AccelerationStep.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 67 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep.getValidUntil() may expose internal representation by returning AccelerationStep.validUntil | MALICIOUS_CODE | EI_EXPOSE_REP | 59 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep(Acceleration, Time, Duration) may expose internal representation by storing an externally mutable object into AccelerationStep.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep(Acceleration, Time, Duration) may expose internal representation by storing an externally mutable object into AccelerationStep.duration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 43 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep(Acceleration, Time, Duration) may expose internal representation by storing an externally mutable object into AccelerationStep.validUntil | MALICIOUS_CODE | EI_EXPOSE_REP2 | 42 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.computeAcceleration(Speed, Speed, Speed, Length, Speed) may expose internal representation by returning FixedAccelerationModel.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 78 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.computeAcceleration(Speed, Speed, Speed, Length, Speed, Duration) may expose internal representation by returning FixedAccelerationModel.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 71 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.getAcceleration() may expose internal representation by returning FixedAccelerationModel.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 64 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.getDuration() may expose internal representation by returning FixedAccelerationModel.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 55 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.getStepSize() may expose internal representation by returning FixedAccelerationModel.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 91 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel(Acceleration, Duration) may expose internal representation by storing an externally mutable object into FixedAccelerationModel.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel(Acceleration, Duration) may expose internal representation by storing an externally mutable object into FixedAccelerationModel.duration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld.getMaximumSafeDeceleration() may expose internal representation by returning IdmOld.b | MALICIOUS_CODE | EI_EXPOSE_REP | 146 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld.getStepSize() may expose internal representation by returning IdmOld.DEFAULT_STEP_SIZE | MALICIOUS_CODE | EI_EXPOSE_REP | 140 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmOld.a | MALICIOUS_CODE | EI_EXPOSE_REP2 | 80 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmOld.b | MALICIOUS_CODE | EI_EXPOSE_REP2 | 81 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmOld.s0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 82 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmOld.tSafe | MALICIOUS_CODE | EI_EXPOSE_REP2 | 83 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld.setA(Acceleration) may expose internal representation by storing an externally mutable object into IdmOld.a | MALICIOUS_CODE | EI_EXPOSE_REP2 | 165 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmOld.setT(Duration) may expose internal representation by storing an externally mutable object into IdmOld.tSafe | MALICIOUS_CODE | EI_EXPOSE_REP2 | 171 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld.getMaximumSafeDeceleration() may expose internal representation by returning IdmPlusOld.b | MALICIOUS_CODE | EI_EXPOSE_REP | 163 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld.getStepSize() may expose internal representation by returning IdmPlusOld.DEFAULT_STEP_SIZE | MALICIOUS_CODE | EI_EXPOSE_REP | 157 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmPlusOld.a | MALICIOUS_CODE | EI_EXPOSE_REP2 | 86 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmPlusOld.b | MALICIOUS_CODE | EI_EXPOSE_REP2 | 87 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmPlusOld.s0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 88 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld(Acceleration, Acceleration, Length, Duration, double) may expose internal representation by storing an externally mutable object into IdmPlusOld.tSafe | MALICIOUS_CODE | EI_EXPOSE_REP2 | 89 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld.setA(Acceleration) may expose internal representation by storing an externally mutable object into IdmPlusOld.a | MALICIOUS_CODE | EI_EXPOSE_REP2 | 182 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.following.IdmPlusOld.setT(Duration) may expose internal representation by storing an externally mutable object into IdmPlusOld.tSafe | MALICIOUS_CODE | EI_EXPOSE_REP2 | 188 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.SequentialFixedAccelerationModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.following.SequentialFixedAccelerationModel.getMaximumSafeDeceleration() may expose internal representation by returning SequentialFixedAccelerationModel.maximumSafeDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 158 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.following.SequentialFixedAccelerationModel(OtsSimulatorInterface, Acceleration) may expose internal representation by storing an externally mutable object into SequentialFixedAccelerationModel.maximumSafeDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 53 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel.computeLaneChangeAndAcceleration(LaneBasedGtu, Collection, Collection, Collection, Speed, Acceleration, Acceleration, Acceleration) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 64 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lmrs.Lmrs
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.tactical.lmrs.Lmrs at new org.opentrafficsim.road.gtu.lane.tactical.lmrs.Lmrs(CarFollowingModel, LaneBasedGtu, LanePerception, Synchronization, Cooperation, GapAcceptance, Tailgating) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 78 | Medium |
| Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.Lmrs defines non-transient non-serializable instance field lmrsData | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory defines non-transient non-serializable instance field cooperation | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory defines non-transient non-serializable instance field gapAcceptance | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory defines non-transient non-serializable instance field synchronization | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory defines non-transient non-serializable instance field tailgating | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 38-151 | High |
org.opentrafficsim.road.gtu.lane.tactical.lmrs.SocioDesiredSpeed
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.lmrs.SocioDesiredSpeed.init(LaneBasedGtu) may expose internal representation by storing an externally mutable object into SocioDesiredSpeed.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 86 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule doesn't override org.opentrafficsim.core.network.route.Route.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
| Class org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule defines non-transient non-serializable instance field schedule | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule$BusStopInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule$BusStopInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 218-251 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo at new org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo(CarFollowingModel, LaneBasedGtu) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 88 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 895-919 | Medium |
| Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 895-919 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 819-861 | Medium |
| Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 819-861 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.toledo.ToledoPerception
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Read of unwritten field infrastructureLaneChangeInfo in org.opentrafficsim.road.gtu.lane.tactical.toledo.ToledoPerception.getTimeStampedInfrastructureLaneChangeInfo(RelativeLane) | CORRECTNESS | NP_UNWRITTEN_FIELD | 120 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo.duration() may expose internal representation by returning AnticipationInfo.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 28 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo.endSpeed() may expose internal representation by returning AnticipationInfo.endSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 28 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo(Duration, Speed) may expose internal representation by storing an externally mutable object into AnticipationInfo.duration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 28 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo(Duration, Speed) may expose internal representation by storing an externally mutable object into AnticipationInfo.endSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 28 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.util.CarFollowingUtil$CarFollowingHeadway
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.util.CarFollowingUtil$CarFollowingHeadway.getSpeed() may expose internal representation by returning CarFollowingUtil$CarFollowingHeadway.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 267 | Medium |
| new org.opentrafficsim.road.gtu.lane.tactical.util.CarFollowingUtil$CarFollowingHeadway(Length, Speed) may expose internal representation by storing an externally mutable object into CarFollowingUtil$CarFollowingHeadway.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 249 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Useless object stored in variable leaders of method org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil.followConflictingLeaderOnMergeOrSplit(HeadwayConflict, Parameters, CarFollowingModel, Speed, SpeedLimitInfo, Length) | STYLE | UC_USELESS_OBJECT | 404 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil$ConflictPlans
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil$ConflictPlans.getIndicatorObjectDistance() may expose internal representation by returning ConflictUtil$ConflictPlans.indicatorObjectDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 1121 | Medium |
| org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil$ConflictPlans.setIndicatorIntent(TurnIndicatorIntent, Length) may expose internal representation by storing an externally mutable object into ConflictUtil$ConflictPlans.indicatorObjectDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1133 | 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 | 92 | 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 | 69 | Medium |
| org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.getDestination() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.destination | MALICIOUS_CODE | EI_EXPOSE_REP | 294 | Medium |
| org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.getGtu() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 100 | Medium |
| org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.getOrigin() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.origin | MALICIOUS_CODE | EI_EXPOSE_REP | 288 | 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 | 90 | 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 | 87 | 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 | 89 | Medium |
| Nullcheck of previousLink at line 128 of value previously dereferenced in org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.nextLink(Link, GtuType) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 120 | High |
| Class org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner defines non-transient non-serializable instance field routeGenerator | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
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 |
| Class org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlannerFactory defines non-transient non-serializable instance field parameterFactory | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlannerFactory defines non-transient non-serializable instance field routeGenerator | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| org.opentrafficsim.core.parameters.ParameterFactoryDefault stored into non-transient field LaneBasedStrategicalRoutePlannerFactory.parameterFactory | BAD_PRACTICE | SE_BAD_FIELD_STORE | 57 | High |
org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator at new org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator(StreamInterface, LinkWeight) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 85 | Medium |
| org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator.getRoute(Node, Node, GtuType) uses the same code for two branches | STYLE | DB_DUPLICATE_BRANCHES | 135 | Medium |
| new org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator(StreamInterface, LinkWeight) may expose internal representation by storing an externally mutable object into RouteGenerator$DefaultRouteGenerator.stream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 87 | Medium |
| Useless object stored in variable testViaNode of method org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator.getRoute(Node, Node, GtuType) | STYLE | UC_USELESS_OBJECT | 103 | Medium |
org.opentrafficsim.road.network.LaneChangeInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.LaneChangeInfo.remainingDistance() may expose internal representation by returning LaneChangeInfo.remainingDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 21 | Medium |
| new org.opentrafficsim.road.network.LaneChangeInfo(int, Length, boolean, LateralDirectionality) may expose internal representation by storing an externally mutable object into LaneChangeInfo.remainingDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 32 | Medium |
org.opentrafficsim.road.network.RoadNetwork
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Class org.opentrafficsim.road.network.RoadNetwork defines non-transient non-serializable instance field legalLaneChangeInfoCache | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.network.RoadNetwork defines non-transient non-serializable instance field physicalLaneChangeInfoCache | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Possible null pointer dereference of lane in org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph.getNoRouteDestinationNode(GtuType) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 490 | Medium |
| Should org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 406-506 | 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 | 72 | 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 | 72 | 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 | 69 | 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 | 110 | Medium |
| org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 92 | Medium |
| org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 85 | 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 | 40 | 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 | 83 | 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 | 359 | Medium |
| org.opentrafficsim.road.network.factory.LaneFactory.leftToRight(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.laneType0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 180 | Medium |
| org.opentrafficsim.road.network.factory.LaneFactory.leftToRight(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.speedLimit0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 181 | Medium |
| org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.laneType0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 207 | Medium |
| org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.laneWidth0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 206 | Medium |
| org.opentrafficsim.road.network.factory.LaneFactory.rightToLeft(double, Length, LaneType, Speed) may expose internal representation by storing an externally mutable object into LaneFactory.speedLimit0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 208 | 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 | 239 | 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 | 228 | Medium |
| Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 146 | Medium |
| Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 150 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionElement
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.CrossSectionElement at new org.opentrafficsim.road.network.lane.CrossSectionElement(CrossSectionLink, String, CrossSectionGeometry) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 72 | Medium |
| org.opentrafficsim.road.network.lane.CrossSectionElement.getLink() may expose internal representation by returning CrossSectionElement.link | MALICIOUS_CODE | EI_EXPOSE_REP | 98 | Medium |
| new org.opentrafficsim.road.network.lane.CrossSectionElement(CrossSectionLink, String, CrossSectionGeometry) may expose internal representation by storing an externally mutable object into CrossSectionElement.link | MALICIOUS_CODE | EI_EXPOSE_REP2 | 75 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionLink
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.CrossSectionLink doesn't override org.opentrafficsim.core.network.Link.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
org.opentrafficsim.road.network.lane.Lane
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.Lane.getGtuList(Time) may expose internal representation by returning Lane.gtuListAtTime | MALICIOUS_CODE | EI_EXPOSE_REP | 1319 | Medium |
| org.opentrafficsim.road.network.lane.Lane.getType() may expose internal representation by returning Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP | 1297 | Medium |
| new org.opentrafficsim.road.network.lane.Lane(CrossSectionLink, String, CrossSectionGeometry, LaneType, Map) may expose internal representation by storing an externally mutable object into Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 199 | Medium |
| org.opentrafficsim.road.network.lane.Lane.getGtuList(Time) may expose internal representation by storing an externally mutable object into Lane.gtuListTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1321 | Medium |
| Class org.opentrafficsim.road.network.lane.Lane defines non-transient non-serializable instance field leftNeighbours | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
| Class org.opentrafficsim.road.network.lane.Lane defines non-transient non-serializable instance field rightNeighbours | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
| org.opentrafficsim.road.network.lane.Lane.getHighestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1255 | Medium |
| org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 669 | Medium |
| org.opentrafficsim.road.network.lane.Lane.getLowestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1239 | Medium |
| org.opentrafficsim.road.network.lane.Lane.getObjectAhead(Length) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 970 | Medium |
| org.opentrafficsim.road.network.lane.Lane.scheduleDetectorTriggers(LaneBasedGtu, double, double) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 518 | Medium |
org.opentrafficsim.road.network.lane.LanePosition
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.LanePosition.lane() may expose internal representation by returning LanePosition.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 21 | Medium |
| org.opentrafficsim.road.network.lane.LanePosition.position() may expose internal representation by returning LanePosition.position | MALICIOUS_CODE | EI_EXPOSE_REP | 21 | Medium |
| new org.opentrafficsim.road.network.lane.LanePosition(Lane, Length) may expose internal representation by storing an externally mutable object into LanePosition.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 21 | Medium |
| new org.opentrafficsim.road.network.lane.LanePosition(Lane, Length) may expose internal representation by storing an externally mutable object into LanePosition.position | MALICIOUS_CODE | EI_EXPOSE_REP2 | 21 | Medium |
org.opentrafficsim.road.network.lane.RoadMarkerAcross
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.RoadMarkerAcross.getCrossSectionElement() may expose internal representation by returning RoadMarkerAcross.crossSectionElement | MALICIOUS_CODE | EI_EXPOSE_REP | 41 | Medium |
| org.opentrafficsim.road.network.lane.RoadMarkerAcross.getLongitudinalPosition() may expose internal representation by returning RoadMarkerAcross.longitudinalPosition | MALICIOUS_CODE | EI_EXPOSE_REP | 49 | Medium |
| new org.opentrafficsim.road.network.lane.RoadMarkerAcross(CrossSectionElement, Length) may expose internal representation by storing an externally mutable object into RoadMarkerAcross.crossSectionElement | MALICIOUS_CODE | EI_EXPOSE_REP2 | 32 | Medium |
| new org.opentrafficsim.road.network.lane.RoadMarkerAcross(CrossSectionElement, Length) may expose internal representation by storing an externally mutable object into RoadMarkerAcross.longitudinalPosition | MALICIOUS_CODE | EI_EXPOSE_REP2 | 33 | Medium |
org.opentrafficsim.road.network.lane.Stripe
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.Stripe at new org.opentrafficsim.road.network.lane.Stripe(String, StripeData, CrossSectionLink, CrossSectionGeometry) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 51 | Medium |
| org.opentrafficsim.road.network.lane.Stripe.getDashOffset() may expose internal representation by returning Stripe.dashOffset | MALICIOUS_CODE | EI_EXPOSE_REP | 102 | Medium |
| new org.opentrafficsim.road.network.lane.Stripe(String, StripeData, CrossSectionLink, CrossSectionGeometry) may expose internal representation by storing an externally mutable object into Stripe.data | MALICIOUS_CODE | EI_EXPOSE_REP2 | 52 | Medium |
| org.opentrafficsim.road.network.lane.Stripe.setDashOffset(Length) may expose internal representation by storing an externally mutable object into Stripe.dashOffset | MALICIOUS_CODE | EI_EXPOSE_REP2 | 93 | Medium |
| Class org.opentrafficsim.road.network.lane.Stripe defines non-transient non-serializable instance field data | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.lane.StripeData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.StripeData.getElements() may expose internal representation by returning StripeData.elements | MALICIOUS_CODE | EI_EXPOSE_REP | 70 | Medium |
| new org.opentrafficsim.road.network.lane.StripeData(List, boolean, boolean) may expose internal representation by storing an externally mutable object into StripeData.elements | MALICIOUS_CODE | EI_EXPOSE_REP2 | 59 | Medium |
| org.opentrafficsim.road.network.lane.StripeData.setElements(List) may expose internal representation by storing an externally mutable object into StripeData.elements | MALICIOUS_CODE | EI_EXPOSE_REP2 | 79 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftAlwaysRightSpeed
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftAlwaysRightSpeed(Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftAlwaysRightSpeed.rightOvertakingSpeedMax | MALICIOUS_CODE | EI_EXPOSE_REP2 | 185 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSet
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSet(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftSet.overtakenGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 301 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSet(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftSet.overtakingGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 300 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSetRightJam
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSetRightJam(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftSetRightJam.overtakenGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 444 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSetRightJam(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftSetRightJam.overtakingGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 443 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSetRightSpeed
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSetRightSpeed(Collection, Collection, Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftSetRightSpeed.overtakenGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 397 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSetRightSpeed(Collection, Collection, Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftSetRightSpeed.overtakingGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 396 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$LeftSetRightSpeed(Collection, Collection, Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$LeftSetRightSpeed.rightOvertakingSpeedMax | MALICIOUS_CODE | EI_EXPOSE_REP2 | 398 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightAlwaysLeftSpeed
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightAlwaysLeftSpeed(Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightAlwaysLeftSpeed.leftOvertakingSpeedMax | MALICIOUS_CODE | EI_EXPOSE_REP2 | 236 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSet
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSet(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightSet.overtakenGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 346 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSet(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightSet.overtakingGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 345 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSetLeftJam
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSetLeftJam(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightSetLeftJam.overtakenGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 542 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSetLeftJam(Collection, Collection) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightSetLeftJam.overtakingGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 541 | Medium |
org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSetLeftSpeed
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSetLeftSpeed(Collection, Collection, Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightSetLeftSpeed.leftOvertakingSpeedMax | MALICIOUS_CODE | EI_EXPOSE_REP2 | 496 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSetLeftSpeed(Collection, Collection, Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightSetLeftSpeed.overtakenGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 495 | Medium |
| new org.opentrafficsim.road.network.lane.changing.OvertakingConditions$RightSetLeftSpeed(Collection, Collection, Speed) may expose internal representation by storing an externally mutable object into OvertakingConditions$RightSetLeftSpeed.overtakingGtuTypes | MALICIOUS_CODE | EI_EXPOSE_REP2 | 494 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.conflict.Conflict.getLength() may expose internal representation by returning Conflict.length | MALICIOUS_CODE | EI_EXPOSE_REP | 384 | Medium |
| org.opentrafficsim.road.network.lane.conflict.Conflict.getOtherConflict() may expose internal representation by returning Conflict.otherConflict | MALICIOUS_CODE | EI_EXPOSE_REP | 392 | Medium |
| org.opentrafficsim.road.network.lane.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by returning Conflict.trafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 450 | Medium |
| org.opentrafficsim.road.network.lane.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by storing an externally mutable object into Conflict.maxMaxTrafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 415 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable stored into non-transient field Conflict.downstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 289 | Medium |
| org.opentrafficsim.road.gtu.lane.perception.structure.NavigatingIterable stored into non-transient field Conflict.upstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 228 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd.getConflict() may expose internal representation by returning Conflict$ConflictEnd.conflict | MALICIOUS_CODE | EI_EXPOSE_REP | 532 | Medium |
| Should org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 514-538 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$Reiterable
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.road.network.lane.conflict.Conflict$Reiterable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 718-732 | Medium |
org.opentrafficsim.road.network.lane.conflict.ConflictBuilder
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.conflict.ConflictBuilder.buildConflictsParallel(RoadNetwork, Map, OtsSimulatorInterface, ConflictBuilder$WidthGenerator) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1228 | Medium |
org.opentrafficsim.road.network.lane.conflict.DefaultConflictRule
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 115 | Medium |
| Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 119 | Medium |
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject(String, Lane, Length, PolyLine2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 99 | Medium |
| Exception thrown in class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject(String, Lane, Length, PolyLine2d, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 55 | Medium |
| Exception thrown in class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject(String, Lane, Length, PolyLine2d, Polygon2d) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 115 | Medium |
| Exception thrown in class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject at new org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject(String, Lane, Length, PolyLine2d, Polygon2d, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 76 | Medium |
| org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject.getLane() may expose internal representation by returning AbstractLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 150 | Medium |
| org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject.getLongitudinalPosition() may expose internal representation by returning AbstractLaneBasedObject.longitudinalPosition | MALICIOUS_CODE | EI_EXPOSE_REP | 156 | Medium |
org.opentrafficsim.road.network.lane.object.BusStop
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.BusStop at new org.opentrafficsim.road.network.lane.object.BusStop(String, Lane, Length, String, GtuType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 63 | Medium |
| org.opentrafficsim.road.network.lane.object.BusStop.getConflicts() may expose internal representation by returning BusStop.conflicts | MALICIOUS_CODE | EI_EXPOSE_REP | 133 | Medium |
org.opentrafficsim.road.network.lane.object.Distraction
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.Distraction at new org.opentrafficsim.road.network.lane.object.Distraction(String, Lane, Length, Distraction$DistractionProfile) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 40 | Medium |
| Class org.opentrafficsim.road.network.lane.object.Distraction defines non-transient non-serializable instance field profile | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.lane.object.Distraction$TrapezoidProfile
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.Distraction$TrapezoidProfile at new org.opentrafficsim.road.network.lane.object.Distraction$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 | 108 | Medium |
| new org.opentrafficsim.road.network.lane.object.Distraction$TrapezoidProfile(double, Length, Length, Length) may expose internal representation by storing an externally mutable object into Distraction$TrapezoidProfile.dMax | MALICIOUS_CODE | EI_EXPOSE_REP2 | 115 | Medium |
| new org.opentrafficsim.road.network.lane.object.Distraction$TrapezoidProfile(double, Length, Length, Length) may expose internal representation by storing an externally mutable object into Distraction$TrapezoidProfile.dMed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 114 | Medium |
| new org.opentrafficsim.road.network.lane.object.Distraction$TrapezoidProfile(double, Length, Length, Length) may expose internal representation by storing an externally mutable object into Distraction$TrapezoidProfile.dMin | MALICIOUS_CODE | EI_EXPOSE_REP2 | 113 | Medium |
org.opentrafficsim.road.network.lane.object.SpeedSign
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.SpeedSign at new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, Duration, Duration) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 59 | Medium |
| org.opentrafficsim.road.network.lane.object.SpeedSign.getSpeed() may expose internal representation by returning SpeedSign.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 79 | Medium |
| new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.endTimeOfDay | MALICIOUS_CODE | EI_EXPOSE_REP2 | 57 | Medium |
| new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 54 | Medium |
| new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.startTimeOfDay | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
org.opentrafficsim.road.network.lane.object.detector.LaneDetector
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.object.detector.LaneDetector.compareTo(LaneDetector) incorrectly handles double value | BAD_PRACTICE | CO_COMPARETO_INCORRECT_FLOATING | 223 | Medium |
| Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LaneDetector at new org.opentrafficsim.road.network.lane.object.detector.LaneDetector(String, Lane, Length, RelativePosition$Type, PolyLine2d, Length, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 76 | Medium |
| Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LaneDetector at new org.opentrafficsim.road.network.lane.object.detector.LaneDetector(String, Lane, Length, RelativePosition$Type, PolyLine2d, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 103 | Medium |
| org.opentrafficsim.road.network.lane.object.detector.LaneDetector.getType() may expose internal representation by returning LaneDetector.detectorType | MALICIOUS_CODE | EI_EXPOSE_REP | 128 | Medium |
| new org.opentrafficsim.road.network.lane.object.detector.LaneDetector(String, Lane, Length, RelativePosition$Type, PolyLine2d, Length, DetectorType) may expose internal representation by storing an externally mutable object into LaneDetector.detectorType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 80 | Medium |
org.opentrafficsim.road.network.lane.object.detector.LoopDetector
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LoopDetector at new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, Lane, Length, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 241 | Medium |
| Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.LoopDetector at new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 261 | Medium |
| org.opentrafficsim.road.network.lane.object.detector.LoopDetector.getLength() may expose internal representation by returning LoopDetector.length | MALICIOUS_CODE | EI_EXPOSE_REP | 337 | Medium |
| new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.aggregation | MALICIOUS_CODE | EI_EXPOSE_REP2 | 264 | Medium |
| new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.firstAggregation | MALICIOUS_CODE | EI_EXPOSE_REP2 | 265 | Medium |
| new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, LanePosition, Length, DetectorType, Time, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.length | MALICIOUS_CODE | EI_EXPOSE_REP2 | 262 | Medium |
| Class org.opentrafficsim.road.network.lane.object.detector.LoopDetector defines non-transient non-serializable instance field data | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.network.lane.object.detector.LoopDetector defines non-transient non-serializable instance field measurements | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.road.network.lane.object.detector.LoopDetector defines non-transient non-serializable instance field periodicMeasurements | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Private method org.opentrafficsim.road.network.lane.object.detector.LoopDetector.aggregate() is never called | PERFORMANCE | UPM_UNCALLED_PRIVATE_METHOD | 384-412 | Medium |
org.opentrafficsim.road.network.lane.object.detector.LoopDetector$PlatoonSizes
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.road.network.lane.object.detector.LoopDetector$PlatoonSizes(Duration) may expose internal representation by storing an externally mutable object into LoopDetector$PlatoonSizes.threshold | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1075 | Medium |
org.opentrafficsim.road.network.lane.object.detector.SinkDetector
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Class org.opentrafficsim.road.network.lane.object.detector.SinkDetector defines non-transient non-serializable instance field predicate | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector at new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector(String, Lane, Length, Lane, Length, List, RelativePosition$Type, RelativePosition$Type, DetectorType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 121 | Medium |
| org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector.getType() may expose internal representation by returning TrafficLightDetector.type | MALICIOUS_CODE | EI_EXPOSE_REP | 446 | Medium |
| new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector(String, Lane, Length, Lane, Length, List, RelativePosition$Type, RelativePosition$Type, DetectorType) may expose internal representation by storing an externally mutable object into TrafficLightDetector.type | MALICIOUS_CODE | EI_EXPOSE_REP2 | 124 | Medium |
org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector.getParent() may expose internal representation by returning TrafficLightDetector$StartEndDetector.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP | 505 | Medium |
| new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector(TrafficLightDetector, String, Lane, Length, RelativePosition$Type, DetectorType) may expose internal representation by storing an externally mutable object into TrafficLightDetector$StartEndDetector.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 483 | Medium |
org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight at new org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight(String, Lane, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 83 | Medium |
| Exception thrown in class org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight at new org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight(String, Lane, Length, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 71 | Medium |
| Class org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLight defines non-transient non-serializable instance field trafficLightColor | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field TrafficLight.trafficLightColor | BAD_PRACTICE | SE_BAD_FIELD_STORE | 69 | Medium |
org.opentrafficsim.road.network.sampling.GtuDataRoad
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.sampling.GtuDataRoad.getGtu() may expose internal representation by returning GtuDataRoad.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 38 | 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 | 30 | 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 | 36 | 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 | 28 | 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 | 40 | 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 | 32 | 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 | 91 | 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 | 123 | 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 | 77 | 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 | 106 | 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 | 92 | 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 | 127 | 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 | 509 | 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 | 45 | High |
org.opentrafficsim.road.network.speed.SpeedInfoCurvature
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.speed.SpeedInfoCurvature.radius() may expose internal representation by returning SpeedInfoCurvature.radius | MALICIOUS_CODE | EI_EXPOSE_REP | 21 | Medium |
| new org.opentrafficsim.road.network.speed.SpeedInfoCurvature(Length) may expose internal representation by storing an externally mutable object into SpeedInfoCurvature.radius | MALICIOUS_CODE | EI_EXPOSE_REP2 | 32 | Medium |
org.opentrafficsim.road.network.speed.SpeedLimitInfo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.speed.SpeedLimitInfo.toString() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 125 | Medium |
org.opentrafficsim.road.network.speed.SpeedLimitProspect
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.road.network.speed.SpeedLimitProspect.getOdometer() may expose internal representation by returning SpeedLimitProspect.odometer | MALICIOUS_CODE | EI_EXPOSE_REP | 93 | Medium |
| new org.opentrafficsim.road.network.speed.SpeedLimitProspect(Length) may expose internal representation by storing an externally mutable object into SpeedLimitProspect.odometer | MALICIOUS_CODE | EI_EXPOSE_REP2 | 51 | Medium |
org.opentrafficsim.road.network.speed.SpeedLimitType
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.road.network.speed.SpeedLimitType at new org.opentrafficsim.road.network.speed.SpeedLimitType(String, Class) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 39 | 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 | 42 | 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 | 55 | 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 | 40 | 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 | 53 | 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 | 382 | Medium |
| org.opentrafficsim.road.od.OdApplier.gatherPositionsLaneBased(Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 286 | 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 | 910 | Medium |
| new org.opentrafficsim.road.od.OdApplier$GeneratorObjects(LaneBasedGtuGenerator, Generator, LaneBasedGtuCharacteristicsGenerator) may expose internal representation by storing an externally mutable object into OdApplier$GeneratorObjects.generator | MALICIOUS_CODE | EI_EXPOSE_REP2 | 910 | 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, TimeVector, Interpolation) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 90 | Medium |
| org.opentrafficsim.road.od.OdMatrix.getGlobalTimeVector() may expose internal representation by returning OdMatrix.globalTimeVector | MALICIOUS_CODE | EI_EXPOSE_REP | 171 | Medium |
| new org.opentrafficsim.road.od.OdMatrix(String, List, List, Categorization, TimeVector, Interpolation) may expose internal representation by storing an externally mutable object into OdMatrix.globalTimeVector | MALICIOUS_CODE | EI_EXPOSE_REP2 | 104 | Medium |
| Class org.opentrafficsim.road.od.OdMatrix defines non-transient non-serializable instance field demandData | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
| org.opentrafficsim.road.od.OdMatrix.print() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 844 | 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 | 275-317 | 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 | 60 | 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 | 62 | Medium |
| org.opentrafficsim.road.od.SplitFraction.draw(GtuType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 142 | Medium |
