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 |
---|---|---|---|
606 | 536 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld.getEndTime() may expose internal representation by returning AbstractGTUGeneratorOld.endTime | MALICIOUS_CODE | EI_EXPOSE_REP | 571 | Medium |
org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld.getStartTime() may expose internal representation by returning AbstractGTUGeneratorOld.startTime | MALICIOUS_CODE | EI_EXPOSE_REP | 563 | Medium |
new org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld(String, OTSSimulatorInterface, GTUType, Class, ContinuousDistDoubleScalar$Rel, ContinuousDistDoubleScalar$Rel, long, Time, Time, Lane, Length, GTUDirectionality, LaneBasedStrategicalPlannerFactory, Generator, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractGTUGeneratorOld.endTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 164 | Medium |
new org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld(String, OTSSimulatorInterface, GTUType, Class, ContinuousDistDoubleScalar$Rel, ContinuousDistDoubleScalar$Rel, long, Time, Time, Lane, Length, GTUDirectionality, LaneBasedStrategicalPlannerFactory, Generator, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractGTUGeneratorOld.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 165 | Medium |
new org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld(String, OTSSimulatorInterface, GTUType, Class, ContinuousDistDoubleScalar$Rel, ContinuousDistDoubleScalar$Rel, long, Time, Time, Lane, Length, GTUDirectionality, LaneBasedStrategicalPlannerFactory, Generator, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractGTUGeneratorOld.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 170 | Medium |
new org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld(String, OTSSimulatorInterface, GTUType, Class, ContinuousDistDoubleScalar$Rel, ContinuousDistDoubleScalar$Rel, long, Time, Time, Lane, Length, GTUDirectionality, LaneBasedStrategicalPlannerFactory, Generator, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractGTUGeneratorOld.position | MALICIOUS_CODE | EI_EXPOSE_REP2 | 166 | Medium |
new org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld(String, OTSSimulatorInterface, GTUType, Class, ContinuousDistDoubleScalar$Rel, ContinuousDistDoubleScalar$Rel, long, Time, Time, Lane, Length, GTUDirectionality, LaneBasedStrategicalPlannerFactory, Generator, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractGTUGeneratorOld.startTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 163 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.GeneratorPositions.getAllPositions() may expose internal representation by returning GeneratorPositions.allPositions | MALICIOUS_CODE | EI_EXPOSE_REP | 273 | Medium |
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 | 213 | 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 | 1156 | 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 | 1157 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator(String, Generator, LaneBasedGTUCharacteristicsGenerator, GeneratorPositions, OTSRoadNetwork, OTSSimulatorInterface, LaneBasedGTUGenerator$RoomChecker, IdGenerator) may expose internal representation by storing an externally mutable object into LaneBasedGTUGenerator.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 154 | 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 | 171 | 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 | 328 | Medium |
Class org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator defines non-transient non-serializable instance field generatorPositions | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
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 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 | 213 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 216 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.getQueueLengths() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 626 | 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 | 593 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator$Placement.getSpeed() may expose internal representation by returning LaneBasedGTUGenerator$Placement.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 584 | 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 | 566 | 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 | 565 | 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 | 183 | 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 | 182 | 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 | 198 | 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 | 197 | 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 | 246 | 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 | 422-426 | 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 | 85 | 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 | 47 | 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 | 92 | Medium |
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGTUCharacteristics.getOrigin() may expose internal representation by returning LaneBasedGTUCharacteristics.origin | MALICIOUS_CODE | EI_EXPOSE_REP | 84 | 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 | 59 | 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 | 58 | 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 |
---|---|---|---|---|
Unwritten field: org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedTemplateGTUType.initialSpeedGenerator | CORRECTNESS | UWF_UNWRITTEN_FIELD | 84 | 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 | 53 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 112 | 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 | 51 | Medium |
org.opentrafficsim.road.gtu.generator.headway.DemandPattern.getTimeVector() may expose internal representation by returning DemandPattern.timeVector | MALICIOUS_CODE | EI_EXPOSE_REP | 60 | 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 | 40 | 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 | 41 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in new org.opentrafficsim.road.gtu.generator.headway.ListHeadways(String): new java.io.FileReader(File) | I18N | DM_DEFAULT_ENCODING | 43 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.od.DefaultGTUCharacteristicsGeneratorOD$Factory.setTemplates(Set) may expose internal representation by storing an externally mutable object into DefaultGTUCharacteristicsGeneratorOD$Factory.templates | MALICIOUS_CODE | EI_EXPOSE_REP2 | 295 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.od.ODApplier.applyOD(OTSRoadNetwork, ODMatrix, ODOptions) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 256 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.od.ODApplier$GeneratorObjects.getGenerator() may expose internal representation by returning ODApplier$GeneratorObjects.generator | MALICIOUS_CODE | EI_EXPOSE_REP | 940 | Medium |
new org.opentrafficsim.road.gtu.generator.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 | 929 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.gtu.generator.od.ODOptions$OptionSet be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 301-343 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Do not catch NullPointerException like in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.position(Lane, RelativePosition, Time) | STYLE | DCN_NULLPOINTER_EXCEPTION | 1014 | Medium |
Do not catch NullPointerException like in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.position(Lane, RelativePosition, Time) | STYLE | DCN_NULLPOINTER_EXCEPTION | 1091 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.getCarFollowingAcceleration() may expose internal representation by returning AbstractLaneBasedGTU.cachedCarFollowingAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 1698 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.getDesiredSpeed() may expose internal representation by returning AbstractLaneBasedGTU.cachedDesiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 1669 | Medium |
org.opentrafficsim.road.network.lane.LaneDirection is incompatible with expected argument type org.opentrafficsim.road.network.lane.Lane in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.enterLaneRecursive(LaneDirection, Length, Map, Length, Set, int) | CORRECTNESS | GC_UNRELATED_TYPES | 509 | High |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 160 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.NON_CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 164 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHING isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 156 | High |
Possible null pointer dereference of initialLongitudinalPositions in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.init(LaneBasedStrategicalPlanner, Set, Speed) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 202 | High |
Write to static field org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHED_POSITION from instance method org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.position(Lane, RelativePosition, Time) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 989 | Medium |
Write to static field org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.NON_CACHED_POSITION from instance method org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.position(Lane, RelativePosition, Time) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 998 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.initLaneChange(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 612 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1291 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to pos in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.scheduleLeaveEvent() | STYLE | DLS_DEAD_LOCAL_STORE | 931 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.getCarFollowingAcceleration() may expose internal representation by returning AbstractLaneBasedGTU2.cachedCarFollowingAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 1548 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.getDesiredSpeed() may expose internal representation by returning AbstractLaneBasedGTU2.cachedDesiredSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 1516 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.finalizeLaneChangeEvent; locked 42% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 642 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.pendingEnterTrigger; locked 40% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 745 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.pendingLeaveTrigger; locked 50% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 749 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 161 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.NON_CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 165 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.CACHING isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 157 | High |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.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.AbstractLaneBasedGTU2.init(LaneBasedStrategicalPlanner, Set, Speed) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 205 | High |
Exception is caught when Exception is not thrown in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.position(Lane, RelativePosition, Time) | STYLE | REC_CATCH_EXCEPTION | 1278 | 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 | 1160 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedIndividualGTU.getLength() may expose internal representation by returning AbstractLaneBasedIndividualGTU.length | MALICIOUS_CODE | EI_EXPOSE_REP | 68 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedIndividualGTU.getMaximumSpeed() may expose internal representation by returning AbstractLaneBasedIndividualGTU.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 82 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedIndividualGTU.getWidth() may expose internal representation by returning AbstractLaneBasedIndividualGTU.width | MALICIOUS_CODE | EI_EXPOSE_REP | 75 | Medium |
new org.opentrafficsim.road.gtu.lane.AbstractLaneBasedIndividualGTU(String, GTUType, Length, Length, Speed, OTSSimulatorInterface, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractLaneBasedIndividualGTU.length | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
new org.opentrafficsim.road.gtu.lane.AbstractLaneBasedIndividualGTU(String, GTUType, Length, Length, Speed, OTSSimulatorInterface, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractLaneBasedIndividualGTU.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 61 | Medium |
new org.opentrafficsim.road.gtu.lane.AbstractLaneBasedIndividualGTU(String, GTUType, Length, Length, Speed, OTSSimulatorInterface, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into AbstractLaneBasedIndividualGTU.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedIndividualGTU.setNoLaneChangeDistance(Length) may expose internal representation by storing an externally mutable object into AbstractLaneBasedIndividualGTU.noLaneChangeDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 89 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.AbstractLaneBasedMoveChecker(OTSNetwork) may expose internal representation by storing an externally mutable object into AbstractLaneBasedMoveChecker.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.AccelerationChecker(OTSNetwork, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.max | MALICIOUS_CODE | EI_EXPOSE_REP2 | 51 | Medium |
new org.opentrafficsim.road.gtu.lane.AccelerationChecker(OTSNetwork, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.min | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
new org.opentrafficsim.road.gtu.lane.AccelerationChecker(OTSNetwork, Acceleration, Acceleration, Speed) may expose internal representation by storing an externally mutable object into AccelerationChecker.minSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 52 | 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 | 111 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.getInitialLongitudinalPositions() may expose internal representation by returning LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.initialLongitudinalPositions | MALICIOUS_CODE | EI_EXPOSE_REP | 371 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.getInitialSpeed() may expose internal representation by returning LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.initialSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 379 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.getLength() may expose internal representation by returning LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.length | MALICIOUS_CODE | EI_EXPOSE_REP | 387 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.getMaximumSpeed() may expose internal representation by returning LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 403 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.getNetwork() may expose internal representation by returning LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.network | MALICIOUS_CODE | EI_EXPOSE_REP | 419 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.getWidth() may expose internal representation by returning LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.width | MALICIOUS_CODE | EI_EXPOSE_REP | 395 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setFront(Length) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.front | MALICIOUS_CODE | EI_EXPOSE_REP2 | 336 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setInitialLongitudinalPositions(Set) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.initialLongitudinalPositions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 256 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setInitialSpeed(Speed) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.initialSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 266 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setLength(Length) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.length | MALICIOUS_CODE | EI_EXPOSE_REP2 | 276 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setMaximumAcceleration(Acceleration) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 306 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setMaximumDeceleration(Acceleration) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 316 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setMaximumSpeed(Speed) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 296 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setNetwork(OTSRoadNetwork) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 346 | Medium |
org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.setWidth(Length) may expose internal representation by storing an externally mutable object into LaneBasedIndividualGTU$LaneBasedIndividualCarBuilder.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 286 | 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 | 123 | 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 | 108 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionIterable(LaneBasedGTU, LaneRecord, 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 | 448 | 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 | 407 | 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 | 403 | 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 | 421 | 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 | 418 | 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 | 417 | 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 | 354 | 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 | 352 | Medium |
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry defines compareTo(AbstractPerceptionReiterable$PrimaryIteratorEntry) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 361 | 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 | 136 | 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 | 189 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord.getLane() may expose internal representation by returning LaneDirectionRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 120 | Medium |
org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord.getNext() may expose internal representation by returning LaneDirectionRecord.next | MALICIOUS_CODE | EI_EXPOSE_REP | 76 | Medium |
org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord.getPrev() may expose internal representation by returning LaneDirectionRecord.prev | MALICIOUS_CODE | EI_EXPOSE_REP | 92 | Medium |
org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord.getStartDistance() may expose internal representation by returning LaneDirectionRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 99 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord(Lane, GTUDirectionality, Length, GTUType) may expose internal representation by storing an externally mutable object into LaneDirectionRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord(Lane, GTUDirectionality, Length, GTUType) may expose internal representation by storing an externally mutable object into LaneDirectionRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 58 | 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 | 166 | 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 | 157 | 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 | 277 | 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 | 261 | 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 | 53 | 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 | 183 | 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 | 179 | 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 | 181 | 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 | 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.up | MALICIOUS_CODE | EI_EXPOSE_REP2 | 180 | 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 | 182 | 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 | 1417 | 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 | 481 | 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 | 177 | High |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.update(DirectedLanePosition, Route, GTUType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 306 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.update(DirectedLanePosition, Route, GTUType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 345 | 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 | 1582 | 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 | 622 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getCutOffStart() may expose internal representation by returning RollingLaneStructureRecord.cutOffStart | MALICIOUS_CODE | EI_EXPOSE_REP | 631 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getLane() may expose internal representation by returning RollingLaneStructureRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 661 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getLeft() may expose internal representation by returning RollingLaneStructureRecord.left | MALICIOUS_CODE | EI_EXPOSE_REP | 458 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getNext() may expose internal representation by returning RollingLaneStructureRecord.nextList | MALICIOUS_CODE | EI_EXPOSE_REP | 528 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getPrev() may expose internal representation by returning RollingLaneStructureRecord.prevList | MALICIOUS_CODE | EI_EXPOSE_REP | 555 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getRight() may expose internal representation by returning RollingLaneStructureRecord.right | MALICIOUS_CODE | EI_EXPOSE_REP | 495 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord.getStartDistance() may expose internal representation by returning RollingLaneStructureRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 675 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, GTUDirectionality, Length) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 122 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, GTUDirectionality, Length) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.startDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 124 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, GTUDirectionality, RollingLaneStructureRecord, RollingLaneStructureRecord$RecordLink) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 105 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructureRecord(Lane, GTUDirectionality, RollingLaneStructureRecord, RollingLaneStructureRecord$RecordLink) may expose internal representation by storing an externally mutable object into RollingLaneStructureRecord.source | MALICIOUS_CODE | EI_EXPOSE_REP2 | 107 | 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 | 587 | 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 | 599 | 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 | 468 | 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 | 505 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.SortedSetPerceptionIterable(OTSRoadNetwork) may expose internal representation by storing an externally mutable object into SortedSetPerceptionIterable.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | 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 | 118 | 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 | 126 | 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_CLASS_AND_INTERFACE | 939 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 638 | 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 | 222 | 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 | 640-659 | 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 | 68 | 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 | 211 | 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 | 63 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.getHeadway() may expose internal representation by returning NeighborTriplet.headway | MALICIOUS_CODE | EI_EXPOSE_REP | 47 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet.getSpeed() may expose internal representation by returning NeighborTriplet.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 55 | 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 | 39 | 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 | 37 | 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 | 38 | 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 | 274 | 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 | 265 | 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 | 281 | 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 | 357 | 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 | 37 | 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 | 127 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlap() may expose internal representation by returning AbstractHeadway.overlap | MALICIOUS_CODE | EI_EXPOSE_REP | 148 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlapFront() may expose internal representation by returning AbstractHeadway.overlapFront | MALICIOUS_CODE | EI_EXPOSE_REP | 134 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway.getOverlapRear() may expose internal representation by returning AbstractHeadway.overlapRear | MALICIOUS_CODE | EI_EXPOSE_REP | 141 | 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 | 244 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy.getLength() may expose internal representation by returning AbstractHeadwayCopy.length | MALICIOUS_CODE | EI_EXPOSE_REP | 223 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy.getSpeed() may expose internal representation by returning AbstractHeadwayCopy.speed | MALICIOUS_CODE | EI_EXPOSE_REP | 230 | 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 | 199 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayGTU.getWidth() may expose internal representation by returning AbstractHeadwayGTU.width | MALICIOUS_CODE | EI_EXPOSE_REP | 307 | 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 | 148 | 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 | 145 | 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 | 179 | 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 | 176 | 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 | 87 | 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 | 84 | 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 | 114 | 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 | 111 | 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 | 97 | 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 | 42 | 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 | 59 | 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 | 75 | 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 | 90 | 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 | 75 | 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 | 51 | 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 | 224 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingLink() may expose internal representation by returning HeadwayConflict.conflictingLink | MALICIOUS_CODE | EI_EXPOSE_REP | 273 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingSpeedLimit() may expose internal representation by returning HeadwayConflict.conflictingSpeedLimit | MALICIOUS_CODE | EI_EXPOSE_REP | 264 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingTrafficLightDistance() may expose internal representation by returning HeadwayConflict.conflictingTrafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 309 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict.getConflictingVisibility() may expose internal representation by returning HeadwayConflict.conflictingVisibility | MALICIOUS_CODE | EI_EXPOSE_REP | 255 | 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 | 129 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict(ConflictType, ConflictPriority, Class, String, Length, Length, Length, PerceptionCollectable, PerceptionCollectable, Length, Speed, CrossSectionLink, HeadwayConflict$Width, HeadwayStopLine, HeadwayStopLine, Lane) may expose internal representation by storing an externally mutable object into HeadwayConflict.conflictingLink | MALICIOUS_CODE | EI_EXPOSE_REP2 | 134 | 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 | 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.conflictingVisibility | MALICIOUS_CODE | EI_EXPOSE_REP2 | 132 | 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 | 328 | 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 | 387 | 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 | 388 | 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 | 75 | 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 | 47 | 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 | 132 | 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 | 85 | 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 | 68 | 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 | 169 | Medium |
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGTURealCopy.getSpeedLimitInfo() may expose internal representation by returning HeadwayGTURealCopy.speedLimitInfo | MALICIOUS_CODE | EI_EXPOSE_REP | 176 | 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 | 131 | 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 | 110 | 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 | 86 | 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 | 68 | 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 | 38 | 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 | 131 | 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 | 78 | 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 | 64 | 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 | 53 | 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 | 175 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getFrequency() may expose internal representation by returning DefaultDistraction.frequency | MALICIOUS_CODE | EI_EXPOSE_REP | 157 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction.getStdDuration() may expose internal representation by returning DefaultDistraction.stdDuration | MALICIOUS_CODE | EI_EXPOSE_REP | 184 | 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 | 72 | 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 | 74 | 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 | 110 | 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 | 37 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, OTSSimulatorInterface, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into StochasticDistractionModel.distractions | MALICIOUS_CODE | EI_EXPOSE_REP2 | 73 | Medium |
new org.opentrafficsim.road.gtu.lane.perception.mental.sdm.StochasticDistractionModel(boolean, List, OTSSimulatorInterface, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into StochasticDistractionModel.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 75 | 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 | 148 | 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 | 106 | Medium |
new org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange(Length, Duration) may expose internal representation by storing an externally mutable object into LaneChange.desiredLaneChangeDuration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 97 | Medium |
new org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange(Length, Duration) may expose internal representation by storing an externally mutable object into LaneChange.minimumLaneChangeDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 96 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.setBoundary(Length) may expose internal representation by storing an externally mutable object into LaneChange.boundary | MALICIOUS_CODE | EI_EXPOSE_REP2 | 126 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.setDesiredLaneChangeDuration(Duration) may expose internal representation by storing an externally mutable object into LaneChange.desiredLaneChangeDuration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 115 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 270 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 320 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.MIN_LC_LENGTH_FACTOR isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 78 | High |
Class org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange defines non-transient non-serializable instance field laneChangePath | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 847 | 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, DirectedLanePosition, DirectedPoint, OTSLine3D, OTSLine3D, Duration, double, double) | STYLE | DLS_DEAD_LOCAL_STORE | 729 | Medium |
Dead store to f in org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath.getPathRecursive(Length, Speed, double, double, DirectedLanePosition, DirectedPoint, OTSLine3D, OTSLine3D, Duration, double, double) | STYLE | DLS_DEAD_LOCAL_STORE | 725 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Null passed for non-null parameter of LaneChange.getPath(Duration, LaneBasedGTU, DirectedLanePosition, 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 | 513 | Medium |
Redundant nullcheck of prevFrom, which is known to be non-null in org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.createPathAlongCenterLine(LaneBasedGTU, Length) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 351 | 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 | 505 | 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 | 80 | Medium |
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan.getDuration() may expose internal representation by returning SimpleOperationalPlan.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 98 | 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 | 71 | 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 | 90 | 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 | 98 | 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 | 90 | 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 | 150 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 357 | 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 | 49 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlanner.canChange(LaneBasedGTU, LanePerception, LanePathInfo, LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 523 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlannerFactory(GTUFollowingModelOld) may expose internal representation by storing an externally mutable object into LaneBasedGTUFollowingDirectedChangeTacticalPlannerFactory.carFollowingModel | MALICIOUS_CODE | EI_EXPOSE_REP2 | 59 | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlannerFactory defines non-transient non-serializable instance field carFollowingModelFactory | BAD_PRACTICE | SE_BAD_FIELD | Not available | 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 | 42 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo.getLaneDirectionList() may expose internal representation by returning LanePathInfo.laneDirectionList | MALICIOUS_CODE | EI_EXPOSE_REP | 92 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo.getReferencePosition() may expose internal representation by returning LanePathInfo.referencePosition | MALICIOUS_CODE | EI_EXPOSE_REP | 133 | Medium |
new org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo(OTSLine3D, List, Length) may expose internal representation by storing an externally mutable object into LanePathInfo.laneDirectionList | MALICIOUS_CODE | EI_EXPOSE_REP2 | 69 | 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 | 70 | 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 | 86 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo.getNextSplitNode() may expose internal representation by returning NextSplitInfo.nextSplitNode | MALICIOUS_CODE | EI_EXPOSE_REP | 77 | 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 | 60 | 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 | 59 | 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 | 236 | 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 | 77 | 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 | 53 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep.getDuration() may expose internal representation by returning AccelerationStep.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 69 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.AccelerationStep.getValidUntil() may expose internal representation by returning AccelerationStep.validUntil | MALICIOUS_CODE | EI_EXPOSE_REP | 61 | 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 | 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.duration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | 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 | 44 | 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 | 82 | 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 | 74 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.getAcceleration() may expose internal representation by returning FixedAccelerationModel.acceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 66 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.getDuration() may expose internal representation by returning FixedAccelerationModel.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 57 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.following.FixedAccelerationModel.getStepSize() may expose internal representation by returning FixedAccelerationModel.duration | MALICIOUS_CODE | EI_EXPOSE_REP | 97 | 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 | 47 | 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 | 48 | 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 | 152 | 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 | 145 | 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 | 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.b | MALICIOUS_CODE | EI_EXPOSE_REP2 | 83 | 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 | 84 | 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 | 85 | 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 | 174 | 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 | 181 | 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 | 169 | 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 | 162 | 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 | 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.b | MALICIOUS_CODE | EI_EXPOSE_REP2 | 89 | 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 | 90 | 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 | 91 | 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 | 191 | 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 | 198 | 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 | 164 | 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 | 56 | 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 | 67 | 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 | 39-153 | 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 | 89 | 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 | 215-249 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
There is an apparent infinite recursive loop in org.opentrafficsim.road.gtu.lane.tactical.routesystem.DefaultRouteSystem.getLaneChangeInfo(DirectedLanePosition, Length, Route, GTUType, Length) | CORRECTNESS | IL_INFINITE_RECURSIVE_LOOP | 65 | High |
Useless object stored in variable nextSet of method org.opentrafficsim.road.gtu.lane.tactical.routesystem.DefaultRouteSystem.determineSet(DirectedLanePosition, Length, Route, GTUType, Length) | STYLE | UC_USELESS_OBJECT | 84 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.gtu.lane.tactical.routesystem.DefaultRouteSystem$LaneChangeInfoSet be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 144-182 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.routesystem.LaneChangeInfo.getRemainingDistance() may expose internal representation by returning LaneChangeInfo.remainingDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 65 | Medium |
new org.opentrafficsim.road.gtu.lane.tactical.routesystem.LaneChangeInfo(int, Length, boolean, LateralDirectionality) may expose internal representation by storing an externally mutable object into LaneChangeInfo.remainingDistance | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.routesystem.LaneChangeInfo defines compareTo(LaneChangeInfo) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 90-98 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.tactical.steering.SteeringLmrs defines non-transient non-serializable instance field feedbackTable | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.steering.SteeringLmrs defines non-transient non-serializable instance field lmrsData | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.steering.SteeringLmrs defines non-transient non-serializable instance field mandatoryIncentives | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.steering.SteeringLmrs defines non-transient non-serializable instance field steeringState | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.steering.SteeringLmrs defines non-transient non-serializable instance field voluntaryIncentives | BAD_PRACTICE | SE_BAD_FIELD | Not available | 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 | 916-941 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 916-941 | 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 | 838-881 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 838-881 | 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 | 54 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.util.AnticipationInfo.getEndSpeed() may expose internal representation by returning AnticipationInfo.endSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 62 | 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 | 45 | 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 | 46 | 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 | 272 | 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 | 251 | 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 | 403 | 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 realPlan in org.opentrafficsim.road.gtu.lane.tactical.util.Steering.fromReferencePlan(LaneBasedGTU, Parameters, Steering$SteeringState, OperationalPlan, Steering$FeedbackTable) | STYLE | DLS_DEAD_LOCAL_STORE | 131 | High |
Return value of org.opentrafficsim.core.gtu.RelativePosition.getDx() ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 97 | Medium |
Return value of org.opentrafficsim.road.gtu.lane.VehicleModel.getMomentOfInertiaAboutZ() ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 96 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.tactical.util.Steering$FeedbackTable(List) may expose internal representation by storing an externally mutable object into Steering$FeedbackTable.feedbackVectors | MALICIOUS_CODE | EI_EXPOSE_REP2 | 297 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.lane.tactical.util.Steering$FeedbackTable$FeedbackVector(Speed, double, double, double, double) may expose internal representation by storing an externally mutable object into Steering$FeedbackTable$FeedbackVector.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 362 | 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 | 85 | 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 | 426 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlanner.getGtu() may expose internal representation by returning AbstractLaneBasedStrategicalPlanner.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 39 | Medium |
new org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlanner(LaneBasedGTU) may expose internal representation by storing an externally mutable object into AbstractLaneBasedStrategicalPlanner.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 32 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlannerFactory(LaneBasedTacticalPlannerFactory, ParameterFactory) may expose internal representation by storing an externally mutable object into AbstractLaneBasedStrategicalPlannerFactory.parameterFactory | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.strategical.od.ODMatrix.getGlobalTimeVector() may expose internal representation by returning ODMatrix.globalTimeVector | MALICIOUS_CODE | EI_EXPOSE_REP | 176 | Medium |
new org.opentrafficsim.road.gtu.strategical.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 | 108 | Medium |
Class org.opentrafficsim.road.gtu.strategical.od.ODMatrix defines non-transient non-serializable instance field demandData | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
org.opentrafficsim.road.gtu.strategical.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 |
---|---|---|---|---|
new org.opentrafficsim.road.gtu.strategical.od.SplitFraction(Node, Interpolation, StreamInterface, OTSSimulatorInterface) may expose internal representation by storing an externally mutable object into SplitFraction.node | MALICIOUS_CODE | EI_EXPOSE_REP2 | 63 | Medium |
new org.opentrafficsim.road.gtu.strategical.od.SplitFraction(Node, Interpolation, StreamInterface, OTSSimulatorInterface) may expose internal representation by storing an externally mutable object into SplitFraction.random | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 | Medium |
org.opentrafficsim.road.gtu.strategical.od.SplitFraction.draw(GTUType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 166 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner.getDestination() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.destination | MALICIOUS_CODE | EI_EXPOSE_REP | 402 | Medium |
org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner.getOrigin() may expose internal representation by returning LaneBasedStrategicalRoutePlanner.origin | MALICIOUS_CODE | EI_EXPOSE_REP | 395 | Medium |
new org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner, Route, LaneBasedGTU, Node, Node, RouteGeneratorOD) may expose internal representation by storing an externally mutable object into LaneBasedStrategicalRoutePlanner.destination | MALICIOUS_CODE | EI_EXPOSE_REP2 | 126 | Medium |
new org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner, Route, LaneBasedGTU, Node, Node, RouteGeneratorOD) may expose internal representation by storing an externally mutable object into LaneBasedStrategicalRoutePlanner.origin | MALICIOUS_CODE | EI_EXPOSE_REP2 | 125 | Medium |
Null passed for non-null parameter of java.util.List.addAll(Collection) in org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner.assureRoute(GTUType) | CORRECTNESS | NP_NULL_PARAM_DEREF | 383 | High |
Return value of org.opentrafficsim.core.network.route.Route.getNodes() ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 381 | Medium |
Class org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner defines non-transient non-serializable instance field routeGenerator | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlannerFactory defines non-transient non-serializable instance field routeGenerator | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlannerFactory is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 45-124 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.strategical.route.RouteGeneratorOD.DEFAULT_MAP should be moved out of an interface and made package protected | MALICIOUS_CODE | MS_OOI_PKGPROTECT | 47 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.strategical.route.RouteGeneratorOD$DefaultRouteGenerator.getRoute(Node, Node, GTUType) uses the same code for two branches | STYLE | DB_DUPLICATE_BRANCHES | 147 | Medium |
new org.opentrafficsim.road.gtu.strategical.route.RouteGeneratorOD$DefaultRouteGenerator(StreamInterface) may expose internal representation by storing an externally mutable object into RouteGeneratorOD$DefaultRouteGenerator.stream | MALICIOUS_CODE | EI_EXPOSE_REP2 | 81 | Medium |
Useless object stored in variable testViaNode of method org.opentrafficsim.road.gtu.strategical.route.RouteGeneratorOD$DefaultRouteGenerator.getRoute(Node, Node, GTUType) | STYLE | UC_USELESS_OBJECT | 100 | Medium |
Useless object stored in variable weights of method org.opentrafficsim.road.gtu.strategical.route.RouteGeneratorOD$DefaultRouteGenerator.getRoute(Node, Node, GTUType) | STYLE | UC_USELESS_OBJECT | 89 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.network.OTSRoadNetwork defines non-transient non-serializable instance field routeSystem | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
There is an apparent infinite recursive loop in org.opentrafficsim.road.network.OTSRoadNetworkUtils.destroy(OTSRoadNetwork, OTSSimulatorInterface) | CORRECTNESS | IL_INFINITE_RECURSIVE_LOOP | 143 | High |
Return value of org.opentrafficsim.core.network.OTSNode.clone1(Network) ignored, is this OK in org.opentrafficsim.road.network.OTSRoadNetworkUtils.clone(OTSRoadNetwork, String, OTSSimulatorInterface, OTSSimulatorInterface) | STYLE | RV_RETURN_VALUE_IGNORED_INFERRED | 54 | 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 | 75 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController(OTSSimulatorInterface, List, Compatible) may expose internal representation by storing an externally mutable object into CycleTimeLightController.trafficLights | MALICIOUS_CODE | EI_EXPOSE_REP2 | 71 | Medium |
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.enable(Duration) may expose internal representation by storing an externally mutable object into CycleTimeLightController.cTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 113 | Medium |
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 95 | Medium |
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 88 | 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 | 86 | 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 | 49 | 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 | 42 | 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 | 41 | 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 | 300 | 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 | 157 | 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 | 158 | 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 | 178 | 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 | 177 | 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 | 179 | 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 | 203 | 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 | 192 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 124 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 128 | 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 | 478 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionElement.getParentLink() may expose internal representation by returning CrossSectionElement.parentLink | MALICIOUS_CODE | EI_EXPOSE_REP | 380 | 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 | 103 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.CrossSectionLink doesn't override org.opentrafficsim.core.network.OTSLink.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 | 60 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionSlice.getRelativeLength() may expose internal representation by returning CrossSectionSlice.relativeLength | MALICIOUS_CODE | EI_EXPOSE_REP | 51 | Medium |
org.opentrafficsim.road.network.lane.CrossSectionSlice.getWidth() may expose internal representation by returning CrossSectionSlice.width | MALICIOUS_CODE | EI_EXPOSE_REP | 69 | 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 | 41 | 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 | 40 | 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 | 42 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.DirectedLanePosition.getLane() may expose internal representation by returning DirectedLanePosition.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 66 | Medium |
org.opentrafficsim.road.network.lane.DirectedLanePosition.getPosition() may expose internal representation by returning DirectedLanePosition.position | MALICIOUS_CODE | EI_EXPOSE_REP | 75 | Medium |
new org.opentrafficsim.road.network.lane.DirectedLanePosition(Lane, Length, GTUDirectionality) may expose internal representation by storing an externally mutable object into DirectedLanePosition.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
new org.opentrafficsim.road.network.lane.DirectedLanePosition(Lane, Length, GTUDirectionality) may expose internal representation by storing an externally mutable object into DirectedLanePosition.position | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | 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 | 1785 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLaneType() may expose internal representation by returning Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP | 1706 | 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 | 401 | 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.speedLimitMap | MALICIOUS_CODE | EI_EXPOSE_REP2 | 403 | 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 | 246 | 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.speedLimitMap | MALICIOUS_CODE | EI_EXPOSE_REP2 | 248 | Medium |
new org.opentrafficsim.road.network.lane.Lane(CrossSectionLink, String, Length, Length, Length, Length, LaneType, Speed, boolean) may expose internal representation by storing an externally mutable object into Lane.laneType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 297 | 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 | 344 | 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.speedLimitMap | MALICIOUS_CODE | EI_EXPOSE_REP2 | 346 | 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 | 1787 | Medium |
Class org.opentrafficsim.road.network.lane.Lane defines non-transient non-serializable instance field downLanes | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
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 |
Class org.opentrafficsim.road.network.lane.Lane defines non-transient non-serializable instance field upLanes | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
org.opentrafficsim.road.network.lane.Lane.clone(CrossSectionLink, OTSSimulatorInterface) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1960 | Medium |
org.opentrafficsim.road.network.lane.Lane.clone(CrossSectionLink, OTSSimulatorInterface) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1946 | Medium |
org.opentrafficsim.road.network.lane.Lane.getHighestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1662 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 946 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLowestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1646 | Medium |
org.opentrafficsim.road.network.lane.Lane.getObjectAhead(Length, GTUDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1274 | Medium |
org.opentrafficsim.road.network.lane.Lane.scheduleSensorTriggers(LaneBasedGTU, double, double) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 783 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.LaneDirection.getLane() may expose internal representation by returning LaneDirection.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 55 | Medium |
new org.opentrafficsim.road.network.lane.LaneDirection(Lane, GTUDirectionality) may expose internal representation by storing an externally mutable object into LaneDirection.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Nullcheck of LaneType.compatibility at line 218 of value previously dereferenced in org.opentrafficsim.road.network.lane.LaneType.getDirectionality(GTUType) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 217 | High |
Nullcheck of LaneType.compatibility at line 298 of value previously dereferenced in org.opentrafficsim.road.network.lane.LaneType.getDirectionality(GTUType, boolean) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 297 | High |
Class org.opentrafficsim.road.network.lane.LaneType defines non-transient non-serializable instance field compatibility | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
org.opentrafficsim.road.network.lane.LaneType is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 28-302 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.network.lane.OTSRoadNode(Network, String, OTSPoint3D, Direction) may expose internal representation by storing an externally mutable object into OTSRoadNode.direction | MALICIOUS_CODE | EI_EXPOSE_REP2 | 44 | Medium |
org.opentrafficsim.road.network.lane.OTSRoadNode doesn't override org.opentrafficsim.core.network.OTSNode.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | 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 | 44 | Medium |
org.opentrafficsim.road.network.lane.RoadMarkerAcross.getLongitudinalPosition() may expose internal representation by returning RoadMarkerAcross.longitudinalPosition | MALICIOUS_CODE | EI_EXPOSE_REP | 52 | 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 | 35 | 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 | 36 | 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 | 210 | 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 | 339 | 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 | 338 | 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 | 491 | 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 | 490 | 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 | 441 | 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 | 440 | 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 | 442 | 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 | 267 | 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 | 387 | 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 | 386 | 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 | 595 | 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 | 594 | 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 | 546 | 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 | 545 | 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 | 544 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in org.opentrafficsim.road.network.lane.conflict.Conflict.clone(CrossSectionElement, OTSSimulatorInterface), since all org.opentrafficsim.core.dsol.OTSSimulatorInterface are instances of org.opentrafficsim.core.dsol.OTSSimulatorInterface | STYLE | BC_VACUOUS_INSTANCEOF | 506 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict.getLength() may expose internal representation by returning Conflict.length | MALICIOUS_CODE | EI_EXPOSE_REP | 381 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict.getOtherConflict() may expose internal representation by returning Conflict.otherConflict | MALICIOUS_CODE | EI_EXPOSE_REP | 389 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict.getTrafficLightDistance(Length) may expose internal representation by returning Conflict.trafficLightDistance | MALICIOUS_CODE | EI_EXPOSE_REP | 443 | 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 | 420 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtuType stored into non-transient field Conflict.conflictGtuType | BAD_PRACTICE | SE_BAD_FIELD_STORE | 134 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$2 stored into non-transient field Conflict.downstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 306 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$1 stored into non-transient field Conflict.upstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 255 | 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 | 575 | Medium |
Should org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 563-591 | 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 | 631-646 | 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 | 798-893 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.conflict.ConflictBuilder.buildConflictsParallel(OTSRoadNetwork, Map, GTUType, OTSSimulatorInterface, ConflictBuilder$WidthGenerator) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1353 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.road.network.lane.conflict.ConflictBuilder$CbrTaskBig.run() | STYLE | REC_CATCH_EXCEPTION | 1585 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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.object.AbstractLaneBasedObject.getLane() may expose internal representation by returning AbstractLaneBasedObject.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 151 | Medium |
org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject.getLongitudinalPosition() may expose internal representation by returning AbstractLaneBasedObject.longitudinalPosition | MALICIOUS_CODE | EI_EXPOSE_REP | 165 | 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 | 139 | 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 | 131 | 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 | 130 | 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 | 129 | 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 | 147 | Medium |
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, LongitudinalDirectionality, Length, OTSSimulatorInterface, Speed, GTUType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.endTimeOfDay | MALICIOUS_CODE | EI_EXPOSE_REP2 | 68 | Medium |
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, LongitudinalDirectionality, Length, OTSSimulatorInterface, Speed, GTUType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.speed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 | Medium |
new org.opentrafficsim.road.network.lane.object.SpeedSign(String, Lane, LongitudinalDirectionality, Length, OTSSimulatorInterface, Speed, GTUType, Duration, Duration) may expose internal representation by storing an externally mutable object into SpeedSign.startTimeOfDay | MALICIOUS_CODE | EI_EXPOSE_REP2 | 67 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in org.opentrafficsim.road.network.lane.object.sensor.DestinationSensor.clone(CrossSectionElement, OTSSimulatorInterface), since all org.opentrafficsim.core.dsol.OTSSimulatorInterface are instances of org.opentrafficsim.core.dsol.OTSSimulatorInterface | STYLE | BC_VACUOUS_INSTANCEOF | 96 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.sensor.Detector.getLength() may expose internal representation by returning Detector.length | MALICIOUS_CODE | EI_EXPOSE_REP | 408 | Medium |
new org.opentrafficsim.road.network.lane.object.sensor.Detector(String, Lane, Length, Length, OTSSimulatorInterface, Duration, Detector$DetectorMeasurement[]) may expose internal representation by storing an externally mutable object into Detector.aggregation | MALICIOUS_CODE | EI_EXPOSE_REP2 | 344 | Medium |
new org.opentrafficsim.road.network.lane.object.sensor.Detector(String, Lane, Length, Length, OTSSimulatorInterface, Duration, Detector$DetectorMeasurement[]) may expose internal representation by storing an externally mutable object into Detector.length | MALICIOUS_CODE | EI_EXPOSE_REP2 | 343 | Medium |
Class org.opentrafficsim.road.network.lane.object.sensor.Detector defines non-transient non-serializable instance field cumulDataMap | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.network.lane.object.sensor.Detector defines non-transient non-serializable instance field dataMap | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.lane.object.sensor.Detector.aggregate() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 464 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.network.lane.object.sensor.Detector$PlatoonSizes(Duration) may expose internal representation by storing an externally mutable object into Detector$PlatoonSizes.threshold | MALICIOUS_CODE | EI_EXPOSE_REP2 | 840 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in org.opentrafficsim.road.network.lane.object.sensor.SimpleReportingSensor.clone(CrossSectionElement, OTSSimulatorInterface), since all org.opentrafficsim.core.dsol.OTSSimulatorInterface are instances of org.opentrafficsim.core.dsol.OTSSimulatorInterface | STYLE | BC_VACUOUS_INSTANCEOF | 63 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in org.opentrafficsim.road.network.lane.object.sensor.SinkSensor.clone(CrossSectionElement, OTSSimulatorInterface), since all org.opentrafficsim.core.dsol.OTSSimulatorInterface are instances of org.opentrafficsim.core.dsol.OTSSimulatorInterface | STYLE | BC_VACUOUS_INSTANCEOF | 79 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread public/protected field: org.opentrafficsim.road.network.lane.object.trafficlight.AbstractTrafficLightController.currentColor | STYLE | URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD | 38 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in org.opentrafficsim.road.network.lane.object.trafficlight.FlankSensor.clone(CrossSectionElement, OTSSimulatorInterface), since all org.opentrafficsim.core.dsol.OTSSimulatorInterface are instances of org.opentrafficsim.core.dsol.OTSSimulatorInterface | STYLE | BC_VACUOUS_INSTANCEOF | 66 | Medium |
org.opentrafficsim.road.network.lane.object.trafficlight.FlankSensor.getParent() may expose internal representation by returning FlankSensor.parent | MALICIOUS_CODE | EI_EXPOSE_REP | 80 | Medium |
new org.opentrafficsim.road.network.lane.object.trafficlight.FlankSensor(String, Lane, Length, RelativePosition$TYPE, OTSSimulatorInterface, TrafficLightSensor, Compatible) may expose internal representation by storing an externally mutable object into FlankSensor.parent | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in org.opentrafficsim.road.network.lane.object.trafficlight.SimpleTrafficLight.clone(CrossSectionElement, OTSSimulatorInterface), since all org.opentrafficsim.core.dsol.OTSSimulatorInterface are instances of org.opentrafficsim.core.dsol.OTSSimulatorInterface | STYLE | BC_VACUOUS_INSTANCEOF | 54 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLightControllerFixedDuration.getClearanceDurationToNextPhase() may expose internal representation by returning TrafficLightControllerFixedDuration.clearanceDuration | MALICIOUS_CODE | EI_EXPOSE_REP | 139 | Medium |
org.opentrafficsim.road.network.lane.object.trafficlight.TrafficLightControllerFixedDuration.setClearanceDuration(Duration) may expose internal representation by storing an externally mutable object into TrafficLightControllerFixedDuration.clearanceDuration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 185 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.sampling.GtuData.getGtu() may expose internal representation by returning GtuData.gtu | MALICIOUS_CODE | EI_EXPOSE_REP | 37 | Medium |
new org.opentrafficsim.road.network.sampling.GtuData(LaneBasedGTU) may expose internal representation by storing an externally mutable object into GtuData.gtu | MALICIOUS_CODE | EI_EXPOSE_REP2 | 29 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.sampling.LaneData.getLane() may expose internal representation by returning LaneData.lane | MALICIOUS_CODE | EI_EXPOSE_REP | 37 | Medium |
new org.opentrafficsim.road.network.sampling.LaneData(Lane) may expose internal representation by storing an externally mutable object into LaneData.lane | MALICIOUS_CODE | EI_EXPOSE_REP2 | 29 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.sampling.LinkData.getLink() may expose internal representation by returning LinkData.link | MALICIOUS_CODE | EI_EXPOSE_REP | 41 | Medium |
new org.opentrafficsim.road.network.sampling.LinkData(CrossSectionLink) may expose internal representation by storing an externally mutable object into LinkData.link | MALICIOUS_CODE | EI_EXPOSE_REP2 | 33 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.sampling.NodeData.getNode() may expose internal representation by returning NodeData.node | MALICIOUS_CODE | EI_EXPOSE_REP | 36 | Medium |
new org.opentrafficsim.road.network.sampling.NodeData(Node) may expose internal representation by storing an externally mutable object into NodeData.node | MALICIOUS_CODE | EI_EXPOSE_REP2 | 28 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.road.network.sampling.RoadSampler(Set, Set, OTSRoadNetwork) may expose internal representation by storing an externally mutable object into RoadSampler.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 93 | Medium |
new org.opentrafficsim.road.network.sampling.RoadSampler(Set, Set, OTSRoadNetwork, Frequency) may expose internal representation by storing an externally mutable object into RoadSampler.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 127 | 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 | 549 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.sampling.data.TimeToCollision.getValue(GtuData) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 63 | 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 | 102 | 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 | 47 | 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 | 38 | 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 | 129 | 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 | 94 | 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 | 52 | Medium |