The following document contains the results of FindBugs
FindBugs Version is 3.0.1
Threshold is medium
Effort is min
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.CFRoomChecker.canPlace(SortedSet, LaneBasedGTUCharacteristics, Duration, Set) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 123 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.GeneratorPositions.create(Set, StreamInterface, GeneratorPositions$LaneBiases, Map) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 208 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 301 | 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 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 | 187 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 190 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.getFirstLeaders(LaneDirection, Length, Length, Set) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 403 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.getQueueLengths() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 596 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.MarkovCorrelation$TransitionMatrix.toString() concatenates strings using + in a loop | PERFORMANCE | SBSC_USE_STRINGBUFFER_CONCATENATION | 543 | 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 | 421-425 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedTemplateGTUType defines non-transient non-serializable instance field routeGenerator | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Unwritten field: org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedTemplateGTUType.initialSpeedGenerator | CORRECTNESS | UWF_UNWRITTEN_FIELD | 84 | 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 | 42 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.od.ODApplier.applyOD(OTSNetwork, ODMatrix, OTSSimulatorInterface, ODOptions) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 246 | 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 | 277-319 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead | PERFORMANCE | DM_BOOLEAN_CTOR | 1382 | 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 | 498 | High |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 159 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.NON_CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 163 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHING isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 155 | 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 |
Redundant nullcheck of refLane, which is known to be non-null in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.getReferencePosition() | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 1166 | Medium |
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 | 943 | 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 | 952 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.enterLaneRecursive(LaneDirection, Length, Map, Length, Set, int) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 539 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.initLaneChange(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 595 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1242 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable.first; locked 62% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 148 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry defines compareTo(AbstractPerceptionReiterable$PrimaryIteratorEntry) and uses Object.equals() | BAD_PRACTICE | EQ_COMPARETO_USE_OBJECT_EQUALS | 277 | 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.getNext() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 73 | Medium |
org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord.getPrev() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 89 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 1340 | 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 | 461 | Medium |
Class org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure defines non-transient non-serializable instance field animationAccess | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
Class org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure defines non-transient non-serializable instance field root | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field RollingLaneStructure.root | BAD_PRACTICE | SE_BAD_FIELD_STORE | 169 | High |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.expandDownstreamEdge(GTUType, double, Route) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 861 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.expandDownstreamSplit(Set, GTUType, double, Route) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 935 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.expandUpstreamEdge(GTUType, double) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 555 | Medium |
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure.expandUpstreamMerge(Set, GTUType, double, Route) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 991 | 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 | 292 | 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 | 327 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Load of known null value in org.opentrafficsim.road.gtu.lane.perception.categories.AbstractDelayedPerceptionCategory.changeLane(LateralDirectionality) | STYLE | NP_LOAD_OF_KNOWN_NULL_VALUE | 180 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.AbstractDelayedPerceptionCategory.changeLane(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 172 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
There is an apparent infinite recursive loop in org.opentrafficsim.road.gtu.lane.perception.categories.AbstractDelayedPerceptionCategory$DelayedInfoType.getId() | CORRECTNESS | IL_INFINITE_RECURSIVE_LOOP | 227 | High |
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 |
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 | 219 | 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 | 649-668 | 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 |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.DelayedNeighborsPerception defines non-transient non-serializable instance field anticipation | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.DelayedNeighborsPerception defines non-transient non-serializable instance field errors | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.DelayedNeighborsPerception$ErrorValue be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 497-530 | 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 |
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 | 212 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.HistoricalNeighborsPerception defines non-transient non-serializable instance field headwayGtuType | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 | 380 | 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 | 79 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.mental.TaskRoadSideDistraction.demand(LanePerception, LaneBasedGTU, Parameters) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 59 | Medium |
org.opentrafficsim.road.gtu.lane.perception.mental.TaskRoadSideDistraction.demand(LanePerception, LaneBasedGTU, Parameters) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 48 | 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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange.MIN_LC_LENGTH_FACTOR isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 69 | 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 |
---|---|---|---|---|
Test for floating point equality in org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath.getPathRecursive(Length, Speed, double, double, DirectedLanePosition, DirectedPoint, List, List, Duration, double, double) | STYLE | FE_FLOATING_POINT_EQUALITY | 492 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.INSTANT_LANE_CHANGES isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 58 | High |
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 | 391 | 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 | 383 | 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 | 154 | 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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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.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 accelerationIncentives | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LMRS defines non-transient non-serializable instance field lmrsData | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LMRS defines non-transient non-serializable instance field mandatoryIncentives | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.gtu.lane.tactical.lmrs.LMRS defines non-transient non-serializable instance field voluntaryIncentives | 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-151 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 | 388 | 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 | 132 | 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 | 98 | 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 | 97 | 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) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 401 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Null passed for non-null parameter of new java.util.ArrayList(Collection) in new org.opentrafficsim.road.gtu.strategical.od.ODMatrix(String, List, List, Categorization, TimeVector, Interpolation) | CORRECTNESS | NP_NULL_PARAM_DEREF | 102 | Medium |
Null passed for non-null parameter of new java.util.ArrayList(Collection) in new org.opentrafficsim.road.gtu.strategical.od.ODMatrix(String, List, List, Categorization, TimeVector, Interpolation) | CORRECTNESS | NP_NULL_PARAM_DEREF | 101 | 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 | 829 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 | 46 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable weights of method org.opentrafficsim.road.gtu.strategical.route.RouteGeneratorOD$DefaultRouteGenerator.getRoute(Node, Node, GTUType) | STYLE | UC_USELESS_OBJECT | 88 | 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 |
---|---|---|---|---|
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, SimulatorInterface$TimeDoubleUnit) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1920 | Medium |
org.opentrafficsim.road.network.lane.Lane.clone(CrossSectionLink, SimulatorInterface$TimeDoubleUnit) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1906 | Medium |
org.opentrafficsim.road.network.lane.Lane.getHighestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1617 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 907 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLowestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1601 | 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 | 1231 | 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 | 747 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.LaneDirection.getNextLaneDirection(LaneBasedGTU) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 135 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Nullcheck of LaneType.compatibility at line 180 of value previously dereferenced in org.opentrafficsim.road.network.lane.LaneType.getDirectionality(GTUType) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 179 | High |
Nullcheck of LaneType.compatibility at line 260 of value previously dereferenced in org.opentrafficsim.road.network.lane.LaneType.getDirectionality(GTUType, boolean) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 259 | 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 | 27-264 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.conflict.BusStopConflictRule.determinePriority(Conflict) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 87 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.network.lane.conflict.Conflict defines non-transient non-serializable instance field conflictGtuType | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.network.lane.conflict.Conflict defines non-transient non-serializable instance field conflictRule | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.network.lane.conflict.Conflict defines non-transient non-serializable instance field downstreamGtus | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.network.lane.conflict.Conflict defines non-transient non-serializable instance field root | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.road.network.lane.conflict.Conflict defines non-transient non-serializable instance field upstreamGtus | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtuType stored into non-transient field Conflict.conflictGtuType | BAD_PRACTICE | SE_BAD_FIELD_STORE | 112 | Medium |
org.opentrafficsim.road.gtu.lane.perception.DownstreamNeighborsIterable stored into non-transient field Conflict.downstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 245 | Medium |
org.opentrafficsim.road.gtu.lane.perception.UpstreamNeighborsIterable stored into non-transient field Conflict.upstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 220 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 425-452 | 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 | 474-507 | 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 | 656-740 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.BusStop.toString() concatenates strings using + in a loop | PERFORMANCE | SBSC_USE_STRINGBUFFER_CONCATENATION | 183 | 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 |
---|---|---|---|---|
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 |
Private method org.opentrafficsim.road.network.lane.object.sensor.Detector.aggregate() is never called | PERFORMANCE | UPM_UNCALLED_PRIVATE_METHOD | 450-475 | 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 | 465 | 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 |
---|---|---|---|---|
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.SpeedLimitInfo.toString() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 129 | Medium |