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.graphs.Axis.getGranularities() may expose internal representation by returning Axis.granularities | MALICIOUS_CODE | EI_EXPOSE_REP | 182 | Medium |
new org.opentrafficsim.graphs.Axis(DoubleScalarInterface, DoubleScalarInterface, double[], double, String, String, String) may expose internal representation by storing an externally mutable object into Axis.granularities | MALICIOUS_CODE | EI_EXPOSE_REP2 | 60 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.graphs.ContourPlot.STANDARDDISTANCEGRANULARITIES should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 96 | Medium |
org.opentrafficsim.graphs.ContourPlot.STANDARDTIMEGRANULARITIES should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 90 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.graphs.FundamentalDiagram$Sample is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 465-521 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.graphs.FundamentalDiagramLane$Sample is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 532-568 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.graphs.TrajectoryPlot.sample() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 195 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.graphs.TrajectoryPlot$FixedSampleRateTrajectory is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 737-889 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.graphs.TrajectoryPlot$VariableSampleRateTrajectory defines non-transient non-serializable instance field samples | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
org.opentrafficsim.graphs.TrajectoryPlot$VariableSampleRateTrajectory is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 561-667 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.animation.DefaultCarAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 50-149 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator defines non-transient non-serializable instance field roomChecker | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in new org.opentrafficsim.road.gtu.generator.ListGTUGenerator(String, OTSDEVSSimulatorInterface, GTUType, Speed, Lane, Length, GTUDirectionality, GTUColorer, LaneBasedStrategicalPlanner, OTSNetwork, String): new java.io.FileReader(File) | I18N | DM_DEFAULT_ENCODING | 120 | High |
Class org.opentrafficsim.road.gtu.generator.ListGTUGenerator defines non-transient non-serializable instance field reader | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead | PERFORMANCE | DM_BOOLEAN_CTOR | 631 | Medium |
Possible null pointer dereference of initialLongitudinalPositions in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.init(LaneBasedStrategicalPlanner, Set, Speed) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 129 | High |
Useless object stored in variable lanesToBeRemoved of method org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.changeLaneInstantaneously(LateralDirectionality) | STYLE | UC_USELESS_OBJECT | 242 | Medium |
Useless object stored in variable fractionalLanePositions of method org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.finalizeLaneChange(LateralDirectionality) | STYLE | UC_USELESS_OBJECT | 302 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.changeLaneInstantaneously(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 255 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.initLaneChange(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 288 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 622 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 514 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Call to org.opentrafficsim.core.network.LinkDirection.equals(org.opentrafficsim.core.network.Link) in org.opentrafficsim.road.gtu.lane.perception.AbstractLanePerception.buildDownstreamRecursive(Set, GTUType, Length, Length, Length, Length) | CORRECTNESS | EC_UNRELATED_CLASS_AND_INTERFACE | 297 | Medium |
Potentially dangerous use of non-short-circuit logic in org.opentrafficsim.road.gtu.lane.perception.AbstractLanePerception.extendLateral(Set, GTUType, Length, Length, Length, boolean) | STYLE | NS_DANGEROUS_NON_SHORT_CIRCUIT | 406 | High |
Useless object stored in variable minStart of method org.opentrafficsim.road.gtu.lane.perception.AbstractLanePerception.buildUpstreamRecursive(Set, GTUType, Length, Length, Length) | STYLE | UC_USELESS_OBJECT | 434 | Medium |
Useless object stored in variable laneSet of method org.opentrafficsim.road.gtu.lane.perception.AbstractLanePerception.startBuild(LaneStructureRecord, double, GTUType, Length, Length, Length, Length) | STYLE | UC_USELESS_OBJECT | 162 | Medium |
org.opentrafficsim.road.gtu.lane.perception.AbstractLanePerception.connectLaterally(Map, GTUType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 513 | 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 | 78 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Call to org.opentrafficsim.road.gtu.lane.LaneBasedGTU.equals(org.opentrafficsim.road.gtu.lane.perception.categories.DefaultSimplePerception) in org.opentrafficsim.road.gtu.lane.perception.categories.DefaultSimplePerception.parallel(Lane, Time) | CORRECTNESS | EC_UNRELATED_CLASS_AND_INTERFACE | 943 | Medium |
Possible null pointer dereference of laneBasedGTU on branch that might be infeasible in org.opentrafficsim.road.gtu.lane.perception.categories.DefaultSimplePerception.headwayLane(LaneDirection, double, double, Time) | STYLE | NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE | 805 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.categories.InfrastructurePerception.updateInfrastructureLaneChangeInfo(RelativeLane) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 145 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.perception.categories.IntersectionPerception.updateConflicts() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 102 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.IntersectionPerception.updateTrafficLights() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 78 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Private method org.opentrafficsim.road.gtu.lane.perception.categories.NeighborsPerception.forwardHeadway(Length) is never called | PERFORMANCE | UPM_UNCALLED_PRIVATE_METHOD | 685-686 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.NeighborsPerception.getFirstDownstreamGTUs(LateralDirectionality, RelativePosition$TYPE, RelativePosition$TYPE) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 211 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.NeighborsPerception.getFirstUpstreamGTUs(LateralDirectionality, RelativePosition$TYPE, RelativePosition$TYPE) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 273 | Medium |
org.opentrafficsim.road.gtu.lane.perception.categories.NeighborsPerception.updateFollowers(RelativeLane) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 382 | 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 |
---|---|---|---|---|
Dead store to fromFirst in org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.buildAccelerationLaneChangePlan(LaneBasedGTU, List, LateralDirectionality, DirectedPoint, Time, Speed, Acceleration, Duration, LaneOperationalPlanBuilder$LaneChange) | STYLE | DLS_DEAD_LOCAL_STORE | 395 | Medium |
Dead store to toFirst in org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.buildAccelerationLaneChangePlan(LaneBasedGTU, List, LateralDirectionality, DirectedPoint, Time, Speed, Acceleration, Duration, LaneOperationalPlanBuilder$LaneChange) | STYLE | DLS_DEAD_LOCAL_STORE | 396 | Medium |
Dead store to path in org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.buildAccelerationPlan(LaneBasedGTU, List, Length, Time, Speed, Acceleration, Duration) | STYLE | DLS_DEAD_LOCAL_STORE | 328 | 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 | 142 | Medium |
Dead store to maximumReverseHeadway in org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCFLCTacticalPlanner.generateOperationalPlan(Time, DirectedPoint) | STYLE | DLS_DEAD_LOCAL_STORE | 122 | Medium |
Dead store to now in org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCFLCTacticalPlanner.generateOperationalPlan(Time, DirectedPoint) | STYLE | DLS_DEAD_LOCAL_STORE | 123 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCFLCTacticalPlannerFactory defines non-transient non-serializable instance field laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.directedlanechange.AbstractDirectedLaneChangeModel.computeLaneChangeAndAcceleration(LaneBasedGTU, LateralDirectionality, Collection, Collection, Length, Speed, Acceleration, Acceleration, Duration) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 66 | 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 | 246 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.tactical.following.IDMPlusMulti.combineInteractionTerm(Acceleration, BehavioralCharacteristics, Speed, Speed, Length, SortedMap) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 54 | 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 | 58 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 carFollowingModelFactory | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Possible null pointer dereference of initiatedLaneChange in org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo.generateOperationalPlan(Time, DirectedPoint) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 258 | 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 | 975-1000 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 975-1000 | 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 | 898-941 | Medium |
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 898-941 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to e in org.opentrafficsim.road.gtu.strategical.od.ODMatrix.main(String[]) | STYLE | DLS_DEAD_LOCAL_STORE | 510 | High |
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, DurationVector, Interpolation) | CORRECTNESS | NP_NULL_PARAM_DEREF | 91 | 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, DurationVector, Interpolation) | CORRECTNESS | NP_NULL_PARAM_DEREF | 90 | 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 | 376 | 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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.animation.DefaultSensorAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 50-68 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.animation.LaneAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 51-86 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.animation.ShoulderAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 44-60 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.animation.StripeAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 65-244 | High |
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.Lane.checkDirectionality() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1386 | Medium |
org.opentrafficsim.road.network.lane.Lane.clone(CrossSectionLink, OTSSimulatorInterface, boolean) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1497 | Medium |
org.opentrafficsim.road.network.lane.Lane.clone(CrossSectionLink, OTSSimulatorInterface, boolean) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 1481 | Medium |
org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 856 | 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 | 1028 | Medium |
org.opentrafficsim.road.network.lane.Lane.getSensorMap(GTUType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 683 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.Lane$GTUTypeSensor is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 1548-1573 | Medium |
Should org.opentrafficsim.road.network.lane.Lane$GTUTypeSensor be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1548-1573 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.LaneBlockAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 37-85 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.sensor.SensorAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 52-70 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.object.sensor.SinkAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 46-63 | High |
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.lane.object.trafficlight.TrafficLightAnimation is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 42-81 | High |
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 | 127 | Medium |