The following document contains the results of SpotBugs
SpotBugs Version is 3.1.12
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
568 | 159 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.generator.GeneratorPositions.create(Set, StreamInterface, GeneratorPositions$LaneBiases, Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 215 | 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 | 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 | 212 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 215 | Medium |
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.getQueueLengths() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 628 | 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 | 422-426 | 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 |
---|---|---|---|---|
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 | 43 | High |
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 | 257 | 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 |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead | PERFORMANCE | DM_BOOLEAN_CTOR | 1465 | 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 | 512 | High |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 163 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.NON_CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 167 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHING isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 159 | High |
Possible null pointer dereference of initialLongitudinalPositions in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.init(LaneBasedStrategicalPlanner, Set, Speed) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 205 | 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 | 993 | 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 | 1002 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.initLaneChange(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 615 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1295 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to pos in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.scheduleLeaveEvent() | STYLE | DLS_DEAD_LOCAL_STORE | 831 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.finalizeLaneChangeEvent; locked 42% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 556 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.pendingEnterTrigger; locked 40% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 646 | Medium |
Inconsistent synchronization of org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.pendingLeaveTrigger; locked 50% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 650 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 164 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.NON_CACHED_POSITION should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 168 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.CACHING isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 160 | High |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.eventMargin isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 153 | High |
Possible null pointer dereference of initialLongitudinalPositions in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.init(LaneBasedStrategicalPlanner, Set, Speed) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 208 | High |
Exception is caught when Exception is not thrown in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU2.position(Lane, RelativePosition, Time) | STYLE | REC_CATCH_EXCEPTION | 1167 | 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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 | 223 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception$LaneChangePossibility be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 641-660 | 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.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.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 | 387 | 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.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 | 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 |
---|---|---|---|---|
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 | 435 | 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 | 427 | 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 | 151 | 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 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.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 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 | 917-942 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 917-942 | 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 | 839-882 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 839-882 | 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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
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 |
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, SimulatorInterface$TimeDoubleUnit) | CORRECTNESS | IL_INFINITE_RECURSIVE_LOOP | 145 | High |
Return value of org.opentrafficsim.core.network.OTSNode.clone1(Network) ignored, is this OK in org.opentrafficsim.road.network.OTSRoadNetworkUtils.clone(OTSRoadNetwork, String, SimulatorInterface$TimeDoubleUnit, OTSSimulatorInterface) | STYLE | RV_RETURN_VALUE_IGNORED_INFERRED | 56 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 97 | Medium |
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController.disable() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 90 | 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 | 1952 | 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 | 1938 | Medium |
org.opentrafficsim.road.network.lane.Lane.getHighestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1659 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 948 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLowestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1643 | 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 | 1273 | 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 | 785 | 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 |
---|---|---|---|---|
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.conflict.Conflict$ConflictGtuType stored into non-transient field Conflict.conflictGtuType | BAD_PRACTICE | SE_BAD_FIELD_STORE | 136 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$2 stored into non-transient field Conflict.downstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 308 | Medium |
org.opentrafficsim.road.network.lane.conflict.Conflict$1 stored into non-transient field Conflict.upstreamGtus | BAD_PRACTICE | SE_BAD_FIELD_STORE | 257 | 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 | 566-594 | 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 | 616-649 | 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 | 801-896 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.conflict.ConflictBuilder.buildConflictsParallel(OTSRoadNetwork, Map, GTUType, DEVSSimulatorInterface$TimeDoubleUnit, ConflictBuilder$WidthGenerator) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1354 | 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 | 1586 | 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 | 185 | 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 |
org.opentrafficsim.road.network.lane.object.sensor.Detector.aggregate() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 466 | 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 |