The following document contains the results of SpotBugs
SpotBugs Version is 4.7.1
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
570 | 479 | 0 | 0 |
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 | 147 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 992 | 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 | 993 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.Injections.getAllPositions() may expose internal representation by returning Injections.allLanePositions | MALICIOUS_CODE | EI_EXPOSE_REP | 485 | 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 | 541 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 161 | 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 | 179 | Medium |
Null passed for non-null parameter of queueGtu(GeneratorPositions$GeneratorLanePosition, LaneBasedGtuCharacteristics) in org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.queueGtu(LaneBasedGtuCharacteristics, Set) | CORRECTNESS | NP_NULL_PARAM_DEREF | 336 | Medium |
Class org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator defines non-transient non-serializable instance field unplacedTemplates | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
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 |
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 221 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 224 | 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 | 549 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement.getPosition() may expose internal representation by returning LaneBasedGtuGenerator$Placement.position | MALICIOUS_CODE | EI_EXPOSE_REP | 652 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement.getSpeed() may expose internal representation by returning LaneBasedGtuGenerator$Placement.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 643 | Medium |
new org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement(Speed, Set) may expose internal representation by storing an externally mutable object into LaneBasedGtuGenerator$Placement.position | MALICIOUS_CODE | EI_EXPOSE_REP2 | 625 | Medium |
new org.opentrafficsim.road.gtu.generator.LaneBasedGtuGenerator$Placement(Speed, Set) may expose internal representation by storing an externally mutable object into LaneBasedGtuGenerator$Placement.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 624 | Medium |
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 | 179 | 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 | 178 | 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 | 194 | 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 | 193 | 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 | 242 | Medium |
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 | 416-420 | Medium |
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 | 83 | Medium |
new org.opentrafficsim.road.gtu.generator.TtcRoomChecker(Duration) may expose internal representation by storing an externally mutable object into TtcRoomChecker.ttc | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 | Medium |
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 | 184 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics.getDestination() may expose internal representation by returning LaneBasedGtuCharacteristics.destination | MALICIOUS_CODE | EI_EXPOSE_REP | 91 | Medium |
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGtuCharacteristics.getOrigin() may expose internal representation by returning LaneBasedGtuCharacteristics.origin | MALICIOUS_CODE | EI_EXPOSE_REP | 83 | 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 | 58 | 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 | 57 | 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 |
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 | 52 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 111 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.headway.DemandPattern.getDemandVector() may expose internal representation by returning DemandPattern.demandVector | MALICIOUS_CODE | EI_EXPOSE_REP | 50 | Medium |
org.opentrafficsim.road.gtu.generator.headway.DemandPattern.getTimeVector() may expose internal representation by returning DemandPattern.timeVector | MALICIOUS_CODE | EI_EXPOSE_REP | 59 | 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 | 39 | 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 | 40 | Medium |
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 |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to pos in org.opentrafficsim.road.gtu.lane.LaneBasedGtu.scheduleLeaveEvent() | STYLE | DLS_DEAD_LOCAL_STORE | 821 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getCarFollowingAcceleration() may expose internal representation by returning LaneBasedGtu.cachedCarFollowingAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 1552 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.getDesiredSpeed() may expose internal representation by returning LaneBasedGtu.cachedDesiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 1517 | 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 | 1663 | 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 | 544 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.LaneBasedGtu.pendingEnterTrigger; locked 40% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 633 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.LaneBasedGtu.pendingLeaveTrigger; locked 50% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 637 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 161 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.NON_CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 165 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.CACHING isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 157 | High |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.LANEBASED_DESTROY_EVENT isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 1778 | High |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.LANEBASED_MOVE_EVENT isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 1760 | High |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.LANE_CHANGE_EVENT isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 1815 | High |
org.opentrafficsim.road.gtu.lane.LaneBasedGtu.eventMargin isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 150 | High |
Possible null pointer dereference of initialLongitudinalPositions in org.opentrafficsim.road.gtu.lane.LaneBasedGtu.init(LaneBasedStrategicalPlanner, Set, Speed) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 211 | High |
Exception is caught when Exception is not thrown in org.opentrafficsim.road.gtu.lane.LaneBasedGtu.position(Lane, RelativePosition, Time) | STYLE | REC_CATCH_EXCEPTION | 1252 | 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 | 193 | 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 | 1135 | Medium |
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 | 121 | 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 | 106 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable(LaneBasedGtu, LaneRecordInterface, Length, boolean, Length, RelativePosition, Route) may expose internal representation by storing an externally mutable object into AbstractPerceptionIterable.initialPosition | MALICIOUS_CODE | EI_EXPOSE_REP2 | 72 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable$Entry.getSet() may expose internal representation by returning AbstractPerceptionIterable$Entry.set | MALICIOUS_CODE | EI_EXPOSE_REP | 438 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable$Entry(AbstractPerceptionIterable, Object, Object, Length) may expose internal representation by storing an externally mutable object into AbstractPerceptionIterable$Entry.position | MALICIOUS_CODE | EI_EXPOSE_REP2 | 397 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable$Entry(AbstractPerceptionIterable, Object, Object, Length) may expose internal representation by storing an externally mutable object into AbstractPerceptionIterable$Entry.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 393 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable$Entry(AbstractPerceptionIterable, Set, Object, Length) may expose internal representation by storing an externally mutable object into AbstractPerceptionIterable$Entry.position | MALICIOUS_CODE | EI_EXPOSE_REP2 | 411 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable$Entry(AbstractPerceptionIterable, Set, Object, Length) may expose internal representation by storing an externally mutable object into AbstractPerceptionIterable$Entry.set | MALICIOUS_CODE | EI_EXPOSE_REP2 | 408 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable$Entry(AbstractPerceptionIterable, Set, Object, Length) may expose internal representation by storing an externally mutable object into AbstractPerceptionIterable$Entry.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 407 | Medium |
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 | 159 | Medium |
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 | 352 | 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 | 350 | Medium |
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry defines compareTo(AbstractPerceptionReiterable$PrimaryIteratorEntry) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 359 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.InfrastructureLaneChangeInfo defines compareTo(InfrastructureLaneChangeInfo) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 135 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.InfrastructureLaneChangeInfo$InfrastructureLaneChangeInfoInaccessibleLane defines compareTo(Object) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 187 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.LaneRecord.getLane() may expose internal representation by returning LaneRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 106 | Medium |
org.opentrafficsim.road.gtu.lane.perception.LaneRecord.getNext() may expose internal representation by returning LaneRecord.next | MALICIOUS_CODE | EI_EXPOSE_REP | 69 | Medium |
org.opentrafficsim.road.gtu.lane.perception.LaneRecord.getPrev() may expose internal representation by returning LaneRecord.prev | MALICIOUS_CODE | EI_EXPOSE_REP | 85 | Medium |
org.opentrafficsim.road.gtu.lane.perception.LaneRecord.getStartDistance() may expose internal representation by returning LaneRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 92 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.LaneRecord(Lane, Length, GtuType) may expose internal representation by storing an externally mutable object into LaneRecord.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 52 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.LaneRecord(Lane, Length, GtuType) may expose internal representation by storing an externally mutable object into LaneRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.LaneRecord(Lane, Length, GtuType) may expose internal representation by storing an externally mutable object into LaneRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 51 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.LaneStructure$Entry.getDistance() may expose internal representation by returning LaneStructure$Entry.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 164 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.LaneStructure$Entry(Length, LaneBasedObject) may expose internal representation by storing an externally mutable object into LaneStructure$Entry.distance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 155 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable$UnderlyingDistance.getDistance() may expose internal representation by returning PerceptionCollectable$UnderlyingDistance.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 271 | 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 | 255 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure(Length, Length, Length, Length, Length, LaneBasedGtu) may expose internal representation by storing an externally mutable object into RollingLaneStructure.containingGtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 178 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure(Length, Length, Length, Length, Length, LaneBasedGtu) may expose internal representation by storing an externally mutable object into RollingLaneStructure.down | MALICIOUS_CODE | EI_EXPOSE_REP2 | 174 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure(Length, Length, Length, Length, Length, LaneBasedGtu) may expose internal representation by storing an externally mutable object into RollingLaneStructure.downSplit | MALICIOUS_CODE | EI_EXPOSE_REP2 | 176 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure(Length, Length, Length, Length, Length, LaneBasedGtu) may expose internal representation by storing an externally mutable object into RollingLaneStructure.lookAhead | MALICIOUS_CODE | EI_EXPOSE_REP2 | 173 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure(Length, Length, Length, Length, Length, LaneBasedGtu) may expose internal representation by storing an externally mutable object into RollingLaneStructure.up | MALICIOUS_CODE | EI_EXPOSE_REP2 | 175 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure(Length, Length, Length, Length, Length, LaneBasedGtu) may expose internal representation by storing an externally mutable object into RollingLaneStructure.upMerge | MALICIOUS_CODE | EI_EXPOSE_REP2 | 177 | Medium |
Potentially dangerous use of non-short-circuit logic in org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.getDownstreamObjectsRecursive(SortedSet, LaneStructureRecord, Class, double) | STYLE | NS_DANGEROUS_NON_SHORT_CIRCUIT | 1359 | High |
Redundant nullcheck of source, which is known to be non-null in org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.updateStartDistanceSources() | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 464 | Medium |
Class org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure defines non-transient non-serializable instance field animationAccess | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure defines non-transient non-serializable instance field root | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field RollingLaneStructure.root | BAD_PRACTICE | SE_BAD_FIELD_STORE | 172 | High |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.update(LanePosition, Route, GtuType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 289 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.update(LanePosition, Route, GtuType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 328 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure$AnimationAccess(RollingLaneStructure) may expose internal representation by storing an externally mutable object into RollingLaneStructure$AnimationAccess.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1511 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getCutOffEnd() may expose internal representation by returning RollingLaneStructureRecord.cutOffEnd | MALICIOUS_CODE | EI_EXPOSE_REP | 608 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getCutOffStart() may expose internal representation by returning RollingLaneStructureRecord.cutOffStart | MALICIOUS_CODE | EI_EXPOSE_REP | 617 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getLane() may expose internal representation by returning RollingLaneStructureRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 647 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getLeft() may expose internal representation by returning RollingLaneStructureRecord.left | MALICIOUS_CODE | EI_EXPOSE_REP | 444 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getNext() may expose internal representation by returning RollingLaneStructureRecord.nextList | MALICIOUS_CODE | EI_EXPOSE_REP | 514 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getPrev() may expose internal representation by returning RollingLaneStructureRecord.prevList | MALICIOUS_CODE | EI_EXPOSE_REP | 541 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getRight() may expose internal representation by returning RollingLaneStructureRecord.right | MALICIOUS_CODE | EI_EXPOSE_REP | 481 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getStartDistance() may expose internal representation by returning RollingLaneStructureRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 654 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, Length) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 113 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, Length) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 114 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, RollingLaneStructureRecord, RollingLaneStructureRecord$RecordLink) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 98 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, RollingLaneStructureRecord, RollingLaneStructureRecord$RecordLink) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.source | MALICIOUS_CODE | EI_EXPOSE_REP2 | 99 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.setCutOffEnd(Length) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.cutOffEnd | MALICIOUS_CODE | EI_EXPOSE_REP2 | 573 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.setCutOffStart(Length) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.cutOffStart | MALICIOUS_CODE | EI_EXPOSE_REP2 | 585 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.setLeft(RollingLaneStructureRecord, GtuType) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.left | MALICIOUS_CODE | EI_EXPOSE_REP2 | 454 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.setRight(RollingLaneStructureRecord, GtuType) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.right | MALICIOUS_CODE | EI_EXPOSE_REP2 | 491 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.SortedSetPerceptionIterable(RoadNetwork) may expose internal representation by storing an externally mutable object into SortedSetPerceptionIterable.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 40 | Medium |
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 | 116 | 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 | 124 | Medium |
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 | 908 | High |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 626 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception defines non-transient non-serializable instance field anyNextOkCache | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception.updateInfrastructureLaneChangeInfo(RelativeLane) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 223 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception$LaneChangePossibility be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 639-658 | Medium |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.AccPerception defines non-transient non-serializable instance field sensors | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
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 |
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 |
Class org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.DirectNeighborsPerception defines non-transient non-serializable instance field headwayGtuTypeGap | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Redundant nullcheck of org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.HeadwayGtuType$PerceivedHeadwayGtuType.when, which is known to be non-null in org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.HeadwayGtuType$PerceivedHeadwayGtuType.createHeadwayGtu(LaneBasedGtu, LaneBasedGtu, Length, boolean) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 209 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.getAcceleration() may expose internal representation by returning NeighborTriplet.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 62 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.getHeadway() may expose internal representation by returning NeighborTriplet.headway | MALICIOUS_CODE | EI_EXPOSE_REP | 46 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.getSpeed() may expose internal representation by returning NeighborTriplet.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 54 | 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 | 38 | 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 | 36 | 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 | 37 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborsUtil$DistanceGTU.getDistance() may expose internal representation by returning NeighborsUtil$DistanceGTU.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 272 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborsUtil$DistanceGTU.getGTU() may expose internal representation by returning NeighborsUtil$DistanceGTU.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 263 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborsUtil$DistanceGTU defines compareTo(NeighborsUtil$DistanceGTU) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 279 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Method org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborsUtil$SortedNeighborsSet.getAll() seems to be useless | STYLE | UC_USELESS_VOID_METHOD | 354 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getDistance() may expose internal representation by returning AbstractHeadway.distance | MALICIOUS_CODE | EI_EXPOSE_REP | 126 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlap() may expose internal representation by returning AbstractHeadway.overlap | MALICIOUS_CODE | EI_EXPOSE_REP | 147 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlapFront() may expose internal representation by returning AbstractHeadway.overlapFront | MALICIOUS_CODE | EI_EXPOSE_REP | 133 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlapRear() may expose internal representation by returning AbstractHeadway.overlapRear | MALICIOUS_CODE | EI_EXPOSE_REP | 140 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy.getAcceleration() may expose internal representation by returning AbstractHeadwayCopy.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 241 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy.getLength() may expose internal representation by returning AbstractHeadwayCopy.length | MALICIOUS_CODE | EI_EXPOSE_REP | 220 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy.getSpeed() may expose internal representation by returning AbstractHeadwayCopy.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 227 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu.getDesiredSpeed() may expose internal representation by returning AbstractHeadwayGtu.desiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 196 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu.getGtuType() may expose internal representation by returning AbstractHeadwayGtu.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP | 189 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGtu.getWidth() may expose internal representation by returning AbstractHeadwayGtu.width | MALICIOUS_CODE | EI_EXPOSE_REP | 304 | 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.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 144 | 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.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 175 | 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.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 83 | 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.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 110 | 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 |
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 | 96 | 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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingLength() may expose internal representation by returning HeadwayConflict.conflictingLength | MALICIOUS_CODE | EI_EXPOSE_REP | 223 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingLink() may expose internal representation by returning HeadwayConflict.conflictingLink | MALICIOUS_CODE | EI_EXPOSE_REP | 272 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingSpeedLimit() may expose internal representation by returning HeadwayConflict.conflictingSpeedLimit | MALICIOUS_CODE | EI_EXPOSE_REP | 263 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingTrafficLightDistance() may expose internal representation by returning HeadwayConflict.conflictingTrafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 308 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingVisibility() may expose internal representation by returning HeadwayConflict.conflictingVisibility | MALICIOUS_CODE | EI_EXPOSE_REP | 254 | 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 | 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.conflictingLink | MALICIOUS_CODE | EI_EXPOSE_REP2 | 133 | 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 | 132 | 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 | 131 | 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 | 327 | 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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 385 | 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 | 386 | Medium |
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 | 73 | 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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuReal.getSpeedLimitInfo() may expose internal representation by returning HeadwayGtuReal.speedLimitInfo | MALICIOUS_CODE | EI_EXPOSE_REP | 129 | 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 |
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 | 166 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGtuRealCopy.getSpeedLimitInfo() may expose internal representation by returning HeadwayGtuRealCopy.speedLimitInfo | MALICIOUS_CODE | EI_EXPOSE_REP | 173 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayTrafficLight(TrafficLight, Length) may expose internal representation by storing an externally mutable object into HeadwayTrafficLight.trafficLight | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 130 | Medium |
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 | 77 | High |
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 | 63 | Medium |
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 | 52 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
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 |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 145 | Medium |
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 | 104 | 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 | 95 | 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 | 94 | 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 | 124 | 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 | 113 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 268 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 318 | 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 | 76 | 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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 771 | Medium |
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, DirectedPoint, OtsLine3d, OtsLine3d, Duration, double, double) | STYLE | DLS_DEAD_LOCAL_STORE | 688 | Medium |
Dead store to f in org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath.getPathRecursive(Length, Speed, double, double, LanePosition, DirectedPoint, OtsLine3d, OtsLine3d, Duration, double, double) | STYLE | DLS_DEAD_LOCAL_STORE | 684 | Medium |
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 | 318 | High |
Null passed for non-null parameter of LaneChange.getPath(Duration, LaneBasedGtu, LanePosition, DirectedPoint, Length, LateralDirectionality) in org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.buildAccelerationLaneChangePlan(LaneBasedGtu, LateralDirectionality, DirectedPoint, Time, Speed, Acceleration, Duration, LaneChange) | CORRECTNESS | NP_NULL_PARAM_DEREF | 420 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.buildAccelerationLaneChangePlan(LaneBasedGtu, LateralDirectionality, DirectedPoint, Time, Speed, Acceleration, Duration, LaneChange) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 412 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
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 | 92 | 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 | 84 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to currentLaneFine in org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlanner.generateOperationalPlan(Time, DirectedPoint) | STYLE | DLS_DEAD_LOCAL_STORE | 147 | Medium |
Dead store to nextSplitNode in org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCfLcTacticalPlanner.suitability(Lane, Length, LaneBasedGtu, Duration) | STYLE | DLS_DEAD_LOCAL_STORE | 473 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 354 | Medium |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo.getLaneList() may expose internal representation by returning LanePathInfo.laneList | MALICIOUS_CODE | EI_EXPOSE_REP | 88 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo.getReferencePosition() may expose internal representation by returning LanePathInfo.referencePosition | MALICIOUS_CODE | EI_EXPOSE_REP | 119 | Medium |
new org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo(OtsLine3d, List, Length) may expose internal representation by storing an externally mutable object into LanePathInfo.laneList | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 | Medium |
new org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo(OtsLine3d, List, Length) may expose internal representation by storing an externally mutable object into LanePathInfo.referencePosition | MALICIOUS_CODE | EI_EXPOSE_REP2 | 66 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo.getCorrectCurrentLanes() may expose internal representation by returning NextSplitInfo.correctCurrentLanes | MALICIOUS_CODE | EI_EXPOSE_REP | 84 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo.getNextSplitNode() may expose internal representation by returning NextSplitInfo.nextSplitNode | MALICIOUS_CODE | EI_EXPOSE_REP | 75 | 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 | 58 | 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 | 57 | Medium |
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 | 234 | 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 | 75 | Medium |
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 |
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 | 80 | 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 | 72 | 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 | 95 | 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 |
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 | 150 | 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 | 143 | 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 | 172 | 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 | 179 | Medium |
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 | 167 | 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 | 160 | 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 | 189 | 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 | 196 | Medium |
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 | 161 | 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 |
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 | 65 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory defines non-transient non-serializable instance field accelerationIncentives | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
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 mandatoryIncentives | 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 |
Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactory defines non-transient non-serializable instance field voluntaryIncentives | 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 |
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 | 88 | Medium |
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 |
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 | 219-253 | Medium |
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 | 912-937 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 912-937 | Medium |
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 | 835-878 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 835-878 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo.getDuration() may expose internal representation by returning AnticipationInfo.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 53 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo.getEndSpeed() may expose internal representation by returning AnticipationInfo.endSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 61 | 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 | 44 | 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 | 45 | Medium |
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 | 270 | 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 |
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 | 405 | Medium |
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 | 1127 | 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 | 1139 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to b in org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.Cooperation$2.cooperate(LanePerception, Parameters, SpeedLimitInfo, CarFollowingModel, LateralDirectionality, Desire) | STYLE | DLS_DEAD_LOCAL_STORE | 84 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Redundant nullcheck of leaders, which is known to be non-null in org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.Synchronization$5.synchronize(LanePerception, Parameters, SpeedLimitInfo, CarFollowingModel, double, LateralDirectionality, LmrsData, LaneChange, LateralDirectionality) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 428 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.getDestination() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.destination | MALICIOUS_CODE | EI_EXPOSE_REP | 301 | Medium |
org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.getGtu() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 101 | Medium |
org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.getOrigin() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.origin | MALICIOUS_CODE | EI_EXPOSE_REP | 294 | 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 132 of value previously dereferenced in org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner.nextLink(Link, GtuType) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 124 | High |
Class org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner defines non-transient non-serializable instance field routeGenerator | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
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 | 73 | 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 | 88 | 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 | 58 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator.getRoute(Node, Node, GtuType) uses the same code for two branches | STYLE | DB_DUPLICATE_BRANCHES | 136 | Medium |
new org.opentrafficsim.road.gtu.strategical.RouteGenerator$DefaultRouteGenerator(StreamInterface, LinkWeight) may expose internal representation by storing an externally mutable object into RouteGenerator$DefaultRouteGenerator.stream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 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 | 104 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.LaneChangeInfo.getRemainingDistance() may expose internal representation by returning LaneChangeInfo.remainingDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 64 | 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 | 44 | Medium |
org.opentrafficsim.road.network.LaneChangeInfo defines compareTo(LaneChangeInfo) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 89-97 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Possible null pointer dereference of lane in org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph.getNoRouteDestinationNode(GtuType) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 488 | Medium |
Should org.opentrafficsim.road.network.RoadNetwork$RouteWeightedGraph be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 404-504 | Medium |
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 | 74 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 111 | Medium |
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 93 | Medium |
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 86 | Medium |
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 | 85 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch.getInterval() may expose internal representation by returning SingleCrossSectionSwitch.interval | MALICIOUS_CODE | EI_EXPOSE_REP | 48 | 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 |
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 | 347 | Medium |
new org.opentrafficsim.road.network.factory.LaneFactory(RoadNetwork, Node, Node, LinkType, OtsSimulatorInterface, LaneKeepingPolicy, GtuType, OtsLine3d) may expose internal representation by storing an externally mutable object into LaneFactory.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 113 | 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 | 162 | 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 | 163 | 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 | 186 | 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 | 185 | 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 | 187 | 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 | 211 | 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 | 200 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 129 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 133 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.CrossSectionElement.getLength() may expose internal representation by returning CrossSectionElement.length | MALICIOUS_CODE | EI_EXPOSE_REP | 457 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionElement.getParentLink() may expose internal representation by returning CrossSectionElement.parentLink | MALICIOUS_CODE | EI_EXPOSE_REP | 359 | Medium |
new org.opentrafficsim.road.network.lane.CrossSectionElement(CrossSectionLink, String, List) may expose internal representation by storing an externally mutable object into CrossSectionElement.parentLink | MALICIOUS_CODE | EI_EXPOSE_REP2 | 100 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.CrossSectionSlice.getDesignLineOffset() may expose internal representation by returning CrossSectionSlice.designLineOffset | MALICIOUS_CODE | EI_EXPOSE_REP | 58 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionSlice.getRelativeLength() may expose internal representation by returning CrossSectionSlice.relativeLength | MALICIOUS_CODE | EI_EXPOSE_REP | 49 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionSlice.getWidth() may expose internal representation by returning CrossSectionSlice.width | MALICIOUS_CODE | EI_EXPOSE_REP | 67 | Medium |
new org.opentrafficsim.road.network.lane.CrossSectionSlice(Length, Length, Length) may expose internal representation by storing an externally mutable object into CrossSectionSlice.designLineOffset | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
new org.opentrafficsim.road.network.lane.CrossSectionSlice(Length, Length, Length) may expose internal representation by storing an externally mutable object into CrossSectionSlice.relativeLength | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
new org.opentrafficsim.road.network.lane.CrossSectionSlice(Length, Length, Length) may expose internal representation by storing an externally mutable object into CrossSectionSlice.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 40 | Medium |
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 | 1398 | Medium |
org.opentrafficsim.road.network.lane.Lane.getType() may expose internal representation by returning Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP | 1376 | Medium |
new org.opentrafficsim.road.network.lane.Lane(CrossSectionLink, String, List, LaneType, Map) may expose internal representation by storing an externally mutable object into Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 262 | Medium |
new org.opentrafficsim.road.network.lane.Lane(CrossSectionLink, String, Length, Length, Length, Length, LaneType, Map, boolean) may expose internal representation by storing an externally mutable object into Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 217 | Medium |
new org.opentrafficsim.road.network.lane.Lane(CrossSectionLink, String, Length, Length, LaneType, Map) may expose internal representation by storing an externally mutable object into Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 239 | 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 | 1400 | 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 | 1333 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 736 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLowestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1317 | Medium |
org.opentrafficsim.road.network.lane.Lane.getObjectAhead(Length) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1047 | Medium |
org.opentrafficsim.road.network.lane.Lane.scheduleDetectorrTriggers(LaneBasedGtu, double, double) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 582 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.LanePosition.getLane() may expose internal representation by returning LanePosition.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 50 | Medium |
org.opentrafficsim.road.network.lane.LanePosition.getPosition() may expose internal representation by returning LanePosition.position | MALICIOUS_CODE | EI_EXPOSE_REP | 59 | 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 | 40 | 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 | 41 | Medium |
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 | 42 | Medium |
org.opentrafficsim.road.network.lane.RoadMarkerAcross.getLongitudinalPosition() may expose internal representation by returning RoadMarkerAcross.longitudinalPosition | MALICIOUS_CODE | EI_EXPOSE_REP | 50 | 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 | 33 | 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 | 34 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.Stripe doesn't override CrossSectionElement.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
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 | 192 | Medium |
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 | 313 | 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 | 312 | Medium |
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 | 459 | 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 | 458 | Medium |
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 | 411 | 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 | 410 | 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 | 412 | Medium |
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 | 245 | Medium |
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 | 359 | 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 | 358 | Medium |
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 | 559 | 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 | 558 | Medium |
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 | 512 | 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 | 511 | 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 | 510 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.network.lane.conflict.BusStopConflictRule(OtsSimulatorInterface, GtuType) may expose internal representation by storing an externally mutable object into BusStopConflictRule.busType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 42 | Medium |
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 | 349 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict.getOtherConflict() may expose internal representation by returning Conflict.otherConflict | MALICIOUS_CODE | EI_EXPOSE_REP | 357 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by returning Conflict.trafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 403 | 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 | 380 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtuType stored into non-transient field Conflict.conflictGtuType | BAD_PRACTICE | SE_BAD_FIELD_STORE | 117 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$2 stored into non-transient field Conflict.downstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 273 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$1 stored into non-transient field Conflict.upstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 223 | Medium |
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 | 497 | Medium |
Should org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 485-504 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtu be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 543-558 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtuIterable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 706-800 | Medium |
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 | 1278 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 127 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 131 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject.getLane() may expose internal representation by returning AbstractLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 106 | Medium |
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject.getLongitudinalPosition() may expose internal representation by returning AbstractLaneBasedObject.longitudinalPosition | MALICIOUS_CODE | EI_EXPOSE_REP | 113 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.BusStop.getConflicts() may expose internal representation by returning BusStop.conflicts | MALICIOUS_CODE | EI_EXPOSE_REP | 135 | Medium |
new org.opentrafficsim.road.network.lane.object.BusStop(String, Lane, Length, String, OtsSimulatorInterface, GtuType) may expose internal representation by storing an externally mutable object into BusStop.busType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 64 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.network.lane.object.Distraction defines non-transient non-serializable instance field profile | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 118 | 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 | 117 | 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 | 116 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.SpeedSign.getSpeed() may expose internal representation by returning SpeedSign.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 82 | Medium |
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, OtsSimulatorInterface, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.endTimeOfDay | MALICIOUS_CODE | EI_EXPOSE_REP2 | 60 | Medium |
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, OtsSimulatorInterface, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 58 | Medium |
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, OtsSimulatorInterface, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 57 | Medium |
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, Length, OtsSimulatorInterface, Speed, GtuType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.startTimeOfDay | MALICIOUS_CODE | EI_EXPOSE_REP2 | 59 | Medium |
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 | 279 | Medium |
org.opentrafficsim.road.network.lane.object.detector.LaneDetector.getType() may expose internal representation by returning LaneDetector.detectorType | MALICIOUS_CODE | EI_EXPOSE_REP | 168 | Medium |
new org.opentrafficsim.road.network.lane.object.detector.LaneDetector(String, Lane, Length, RelativePosition$TYPE, OtsSimulatorInterface, OtsLine3d, Length, DetectorType) may expose internal representation by storing an externally mutable object into LaneDetector.detectorType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 89 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.detector.LoopDetector.getLength() may expose internal representation by returning LoopDetector.length | MALICIOUS_CODE | EI_EXPOSE_REP | 449 | Medium |
new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, Lane, Length, Length, DetectorType, OtsSimulatorInterface, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.aggregation | MALICIOUS_CODE | EI_EXPOSE_REP2 | 392 | Medium |
new org.opentrafficsim.road.network.lane.object.detector.LoopDetector(String, Lane, Length, Length, DetectorType, OtsSimulatorInterface, Duration, LoopDetector$LoopDetectorMeasurement[]) may expose internal representation by storing an externally mutable object into LoopDetector.length | MALICIOUS_CODE | EI_EXPOSE_REP2 | 391 | Medium |
Class org.opentrafficsim.road.network.lane.object.detector.LoopDetector defines non-transient non-serializable instance field currentCumulativeDataMap | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.network.lane.object.detector.LoopDetector defines non-transient non-serializable instance field periodicDataMap | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.lane.object.detector.LoopDetector.aggregate() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 507 | Medium |
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 | 994 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector.getType() may expose internal representation by returning TrafficLightDetector.type | MALICIOUS_CODE | EI_EXPOSE_REP | 450 | Medium |
new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector(String, Lane, Length, Lane, Length, List, RelativePosition$TYPE, RelativePosition$TYPE, OtsSimulatorInterface, DetectorType) may expose internal representation by storing an externally mutable object into TrafficLightDetector.type | MALICIOUS_CODE | EI_EXPOSE_REP2 | 122 | Medium |
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 | 513 | Medium |
new org.opentrafficsim.road.network.lane.object.detector.TrafficLightDetector$StartEndDetector(TrafficLightDetector, String, Lane, Length, RelativePosition$TYPE, OtsSimulatorInterface, DetectorType) may expose internal representation by storing an externally mutable object into TrafficLightDetector$StartEndDetector.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 489 | Medium |
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 | 36 | 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 | 28 | Medium |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 126 | Medium |
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 | 504 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.sampling.indicator.TotalDelayReference.calculate(Query, Time, Time, List) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 101 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.speed.SpeedInfoCurvature.getRadius() may expose internal representation by returning SpeedInfoCurvature.radius | MALICIOUS_CODE | EI_EXPOSE_REP | 46 | 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 | 37 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.speed.SpeedLimitInfo.toString() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 128 | Medium |
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 |
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 | 386 | Medium |
org.opentrafficsim.road.od.OdApplier.gatherPositionsLaneBased(Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 290 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.od.OdApplier$GeneratorObjects.getGenerator() may expose internal representation by returning OdApplier$GeneratorObjects.generator | MALICIOUS_CODE | EI_EXPOSE_REP | 963 | 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 | 952 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.od.OdMatrix.getGlobalTimeVector() may expose internal representation by returning OdMatrix.globalTimeVector | MALICIOUS_CODE | EI_EXPOSE_REP | 175 | 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 | 107 | 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 | 851 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.od.OdOptions$OptionSet be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 278-320 | Medium |
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 | 62 | 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 | 64 | Medium |
org.opentrafficsim.road.od.SplitFraction.draw(GtuType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 144 | Medium |