FindBugs Bug Detector Report

The following document contains the results of FindBugs

FindBugs Version is 3.0.1

Threshold is medium

Effort is min

Summary

Classes Bugs Errors Missing Classes
573 173 0 0

Files

Class Bugs
org.opentrafficsim.graphs.Axis 2
org.opentrafficsim.graphs.ContourPlot 2
org.opentrafficsim.graphs.FundamentalDiagram$Sample 1
org.opentrafficsim.graphs.FundamentalDiagramLane$Sample 1
org.opentrafficsim.graphs.TrajectoryPlot$TrajectoryAndLengthOffset 1
org.opentrafficsim.road.animation.AbstractSimulationScript$ScriptModel 1
org.opentrafficsim.road.gtu.animation.DefaultCarAnimation 2
org.opentrafficsim.road.gtu.animation.DefaultCarAnimation$Text 1
org.opentrafficsim.road.gtu.animation.GTUTypeColorer 1
org.opentrafficsim.road.gtu.generator.CFRoomChecker 1
org.opentrafficsim.road.gtu.generator.GTUGeneratorAnimation 1
org.opentrafficsim.road.gtu.generator.GeneratorPositions 1
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator 7
org.opentrafficsim.road.gtu.generator.MarkovCorrelation$TransitionMatrix 1
org.opentrafficsim.road.gtu.generator.Platoons$PlatoonGtu 2
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGTUCharacteristics 1
org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedTemplateGTUType 2
org.opentrafficsim.road.gtu.generator.headway.ListHeadways 1
org.opentrafficsim.road.gtu.generator.od.ODApplier 1
org.opentrafficsim.road.gtu.generator.od.ODApplierExample$ODApplierExampleModel 1
org.opentrafficsim.road.gtu.generator.od.ODOptions$OptionSet 1
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU 11
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable 1
org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry 1
org.opentrafficsim.road.gtu.lane.perception.InfrastructureLaneChangeInfo 1
org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord 2
org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure 10
org.opentrafficsim.road.gtu.lane.perception.categories.AbstractDelayedPerceptionCategory 2
org.opentrafficsim.road.gtu.lane.perception.categories.AbstractDelayedPerceptionCategory$DelayedInfoType 1
org.opentrafficsim.road.gtu.lane.perception.categories.DelayedNeighborsPerception 2
org.opentrafficsim.road.gtu.lane.perception.categories.DelayedNeighborsPerception$ErrorValue 1
org.opentrafficsim.road.gtu.lane.perception.categories.DirectDefaultSimplePerception 1
org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception 2
org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception$LaneChangePossibility 1
org.opentrafficsim.road.gtu.lane.perception.categories.DirectIntersectionPerception 1
org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception 1
org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception$DistanceGTU 2
org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception$SortedNeighborsSet 1
org.opentrafficsim.road.gtu.lane.perception.categories.HeadwayGtuType$PerceivedHeadwayGtuType 1
org.opentrafficsim.road.gtu.lane.perception.categories.HistoricalNeighborsPerception 1
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict 1
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict$Width 1
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayDistance 1
org.opentrafficsim.road.gtu.lane.perception.mental.TaskLaneChanging 1
org.opentrafficsim.road.gtu.lane.perception.mental.TaskRoadSideDistraction 2
org.opentrafficsim.road.gtu.lane.plan.operational.LaneBasedOperationalPlan 1
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange 2
org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath 1
org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder 3
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCFLCTacticalPlanner 1
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlanner 1
org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlannerFactory 1
org.opentrafficsim.road.gtu.lane.tactical.following.AbstractGTUFollowingModelMobil 2
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel 1
org.opentrafficsim.road.gtu.lane.tactical.lmrs.LMRS 4
org.opentrafficsim.road.gtu.lane.tactical.lmrs.LMRSFactory 8
org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule 1
org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule$BusStopInfo 1
org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo 2
org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo 2
org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil 1
org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.Synchronization$4 1
org.opentrafficsim.road.gtu.strategical.od.ODMatrix 4
org.opentrafficsim.road.gtu.strategical.od.SplitFraction 1
org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner 1
org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlannerFactory 2
org.opentrafficsim.road.gtu.strategical.route.RouteSupplier 1
org.opentrafficsim.road.gtu.strategical.route.RouteSupplier$DefaultRouteSupplier 1
org.opentrafficsim.road.network.animation.BusStopAnimation 1
org.opentrafficsim.road.network.animation.ConflictAnimation 1
org.opentrafficsim.road.network.animation.LaneAnimation 1
org.opentrafficsim.road.network.animation.SensorAnimation 1
org.opentrafficsim.road.network.animation.ShoulderAnimation 1
org.opentrafficsim.road.network.animation.SinkAnimation 1
org.opentrafficsim.road.network.animation.SpeedSignAnimation 1
org.opentrafficsim.road.network.animation.StripeAnimation 1
org.opentrafficsim.road.network.animation.TrafficLightAnimation 1
org.opentrafficsim.road.network.animation.TrafficLightSensorAnimation 1
org.opentrafficsim.road.network.lane.CrossSectionLink 1
org.opentrafficsim.road.network.lane.Lane 11
org.opentrafficsim.road.network.lane.LaneDirection 1
org.opentrafficsim.road.network.lane.LaneType 4
org.opentrafficsim.road.network.lane.conflict.BusStopConflictRule 1
org.opentrafficsim.road.network.lane.conflict.Conflict 8
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd 1
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtu 1
org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtuIterable 1
org.opentrafficsim.road.network.lane.object.BusStop 1
org.opentrafficsim.road.network.lane.object.Distraction 1
org.opentrafficsim.road.network.lane.object.sensor.Detector 4
org.opentrafficsim.road.network.lane.object.trafficlight.AbstractTrafficLightController 1
org.opentrafficsim.road.network.sampling.data.TimeToCollision 1
org.opentrafficsim.road.network.sampling.indicator.TotalDelayReference 1
org.opentrafficsim.road.network.speed.SpeedLimitInfo 1

org.opentrafficsim.graphs.Axis

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

org.opentrafficsim.graphs.ContourPlot

Bug Category Details Line Priority
org.opentrafficsim.graphs.ContourPlot.STANDARDDISTANCEGRANULARITIES should be package protected MALICIOUS_CODE MS_PKGPROTECT 95 Medium
org.opentrafficsim.graphs.ContourPlot.STANDARDTIMEGRANULARITIES should be package protected MALICIOUS_CODE MS_PKGPROTECT 89 Medium

org.opentrafficsim.graphs.FundamentalDiagram$Sample

Bug Category Details Line Priority
org.opentrafficsim.graphs.FundamentalDiagram$Sample is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 463-519 Medium

org.opentrafficsim.graphs.FundamentalDiagramLane$Sample

Bug Category Details Line Priority
org.opentrafficsim.graphs.FundamentalDiagramLane$Sample is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 532-568 Medium

org.opentrafficsim.graphs.TrajectoryPlot$TrajectoryAndLengthOffset

Bug Category Details Line Priority
Should org.opentrafficsim.graphs.TrajectoryPlot$TrajectoryAndLengthOffset be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 479-508 Medium

org.opentrafficsim.road.animation.AbstractSimulationScript$ScriptModel

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive org.opentrafficsim.road.animation.AbstractSimulationScript$ScriptModel.constructModel(SimulatorInterface) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 533 High

org.opentrafficsim.road.gtu.animation.DefaultCarAnimation

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.animation.IDGTUColorer stored into non-transient field DefaultCarAnimation.gtuColorer BAD_PRACTICE SE_BAD_FIELD_STORE 87 High
org.opentrafficsim.road.gtu.animation.DefaultCarAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 1-220 High

org.opentrafficsim.road.gtu.animation.DefaultCarAnimation$Text

Bug Category Details Line Priority
Potentially ambiguous invocation of either an outer or inherited method org.opentrafficsim.core.animation.TextAnimation.destroy() in org.opentrafficsim.road.gtu.animation.DefaultCarAnimation$Text.paint(Graphics2D, ImageObserver) STYLE IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD 274 High

org.opentrafficsim.road.gtu.animation.GTUTypeColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.animation.GTUTypeColorer.getLegend() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 111 Medium

org.opentrafficsim.road.gtu.generator.CFRoomChecker

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 124 Medium

org.opentrafficsim.road.gtu.generator.GTUGeneratorAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.GTUGeneratorAnimation.paint(Graphics2D, ImageObserver) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 56 Medium

org.opentrafficsim.road.gtu.generator.GeneratorPositions

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 206 Medium

org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator

Bug Category Details Line Priority
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 186 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.generateCharacteristics() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 189 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 355 Medium
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.getQueueLengths() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 565 Medium

org.opentrafficsim.road.gtu.generator.MarkovCorrelation$TransitionMatrix

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.MarkovCorrelation$TransitionMatrix.toString() concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 542 Medium

org.opentrafficsim.road.gtu.generator.Platoons$PlatoonGtu

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 298-302 Medium
Should org.opentrafficsim.road.gtu.generator.Platoons$PlatoonGtu be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1-342 Medium

org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGTUCharacteristics

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

org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedTemplateGTUType

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

org.opentrafficsim.road.gtu.generator.headway.ListHeadways

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

org.opentrafficsim.road.gtu.generator.od.ODApplier

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.od.ODApplier.applyOD(OTSNetwork, ODMatrix, DEVSSimulatorInterface$TimeDoubleUnit, ODOptions) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 245 Medium

org.opentrafficsim.road.gtu.generator.od.ODApplierExample$ODApplierExampleModel

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.generator.od.ODApplierExample$ODApplierExampleModel.constructModel(SimulatorInterface) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 340 Medium

org.opentrafficsim.road.gtu.generator.od.ODOptions$OptionSet

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 286-328 Medium

org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead PERFORMANCE DM_BOOLEAN_CTOR 1243 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 491 High
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHED_POSITION should be package protected MALICIOUS_CODE MS_PKGPROTECT 155 Medium
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.NON_CACHED_POSITION should be package protected MALICIOUS_CODE MS_PKGPROTECT 159 Medium
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.CACHING isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 151 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 864 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 873 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 532 Medium
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.initLaneChange(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 588 Medium
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1199 Medium
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleEnterLeaveTriggers() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1103 Medium

org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable

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

org.opentrafficsim.road.gtu.lane.perception.AbstractPerceptionReiterable$PrimaryIteratorEntry

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

org.opentrafficsim.road.gtu.lane.perception.InfrastructureLaneChangeInfo

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 137 Medium

org.opentrafficsim.road.gtu.lane.perception.LaneDirectionRecord

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

org.opentrafficsim.road.gtu.lane.perception.RollingLaneStructure

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 1352 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 477 Medium
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 186 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 877 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 951 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 571 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 1007 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 308 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 343 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.AbstractDelayedPerceptionCategory

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 181 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 173 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.AbstractDelayedPerceptionCategory$DelayedInfoType

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 228 High

org.opentrafficsim.road.gtu.lane.perception.categories.DelayedNeighborsPerception

Bug Category Details Line Priority
Class org.opentrafficsim.road.gtu.lane.perception.categories.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.DelayedNeighborsPerception defines non-transient non-serializable instance field errors BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.road.gtu.lane.perception.categories.DelayedNeighborsPerception$ErrorValue

Bug Category Details Line Priority
Should org.opentrafficsim.road.gtu.lane.perception.categories.DelayedNeighborsPerception$ErrorValue be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 489-523 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.DirectDefaultSimplePerception

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

org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception

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

org.opentrafficsim.road.gtu.lane.perception.categories.DirectInfrastructurePerception$LaneChangePossibility

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 642-662 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.DirectIntersectionPerception

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

org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception

Bug Category Details Line Priority
Class org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception defines non-transient non-serializable instance field headwayGtuType BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception$DistanceGTU

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception$DistanceGTU defines compareTo(DirectNeighborsPerception$DistanceGTU) and uses Object.equals() BAD_PRACTICE EQ_COMPARETO_USE_OBJECT_EQUALS 581 Medium
Should org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception$DistanceGTU be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1-581 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception$SortedNeighborsSet

Bug Category Details Line Priority
Method org.opentrafficsim.road.gtu.lane.perception.categories.DirectNeighborsPerception$SortedNeighborsSet.getAll() seems to be useless STYLE UC_USELESS_VOID_METHOD 657 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.HeadwayGtuType$PerceivedHeadwayGtuType

Bug Category Details Line Priority
Redundant nullcheck of org.opentrafficsim.road.gtu.lane.perception.categories.HeadwayGtuType$PerceivedHeadwayGtuType.when, which is known to be non-null in org.opentrafficsim.road.gtu.lane.perception.categories.HeadwayGtuType$PerceivedHeadwayGtuType.createHeadwayGtu(LaneBasedGTU, LaneBasedGTU, Length, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 147 Medium

org.opentrafficsim.road.gtu.lane.perception.categories.HistoricalNeighborsPerception

Bug Category Details Line Priority
Class org.opentrafficsim.road.gtu.lane.perception.categories.HistoricalNeighborsPerception defines non-transient non-serializable instance field headwayGtuType BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict

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

org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayConflict$Width

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 377 Medium

org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayDistance

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayDistance defines compareTo(Object) and uses Object.equals() BAD_PRACTICE EQ_COMPARETO_USE_OBJECT_EQUALS 1 Medium

org.opentrafficsim.road.gtu.lane.perception.mental.TaskLaneChanging

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

org.opentrafficsim.road.gtu.lane.perception.mental.TaskRoadSideDistraction

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

org.opentrafficsim.road.gtu.lane.plan.operational.LaneBasedOperationalPlan

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

org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange

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

org.opentrafficsim.road.gtu.lane.plan.operational.LaneChange$LaneChangePath$SequentialLaneChangePath

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

org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder

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 56 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 388 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 380 Medium

org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCFLCTacticalPlanner

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

org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlanner

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 522 Medium

org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlannerFactory

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

org.opentrafficsim.road.gtu.lane.tactical.following.AbstractGTUFollowingModelMobil

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 235 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

org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel

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

org.opentrafficsim.road.gtu.lane.tactical.lmrs.LMRS

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

org.opentrafficsim.road.gtu.lane.tactical.lmrs.LMRSFactory

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 1-151 High

org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule

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

org.opentrafficsim.road.gtu.lane.tactical.pt.BusSchedule$BusStopInfo

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-251 Medium

org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo

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 915-941 Medium
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapAcceptanceInfo be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 915-941 Medium

org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo

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 837-882 Medium
Should org.opentrafficsim.road.gtu.lane.tactical.toledo.Toledo$GapInfo be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 837-882 Medium

org.opentrafficsim.road.gtu.lane.tactical.util.ConflictUtil

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 389 Medium

org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.Synchronization$4

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$4.synchronize(LanePerception, Parameters, SpeedLimitInfo, CarFollowingModel, double, LateralDirectionality, LmrsData) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 326 Medium

org.opentrafficsim.road.gtu.strategical.od.ODMatrix

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 103 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 102 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 828 Medium

org.opentrafficsim.road.gtu.strategical.od.SplitFraction

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

org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner

Bug Category Details Line Priority
Class org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner defines non-transient non-serializable instance field routeSupplier BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlannerFactory

Bug Category Details Line Priority
Class org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlannerFactory defines non-transient non-serializable instance field routeSupplier 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 44-120 High

org.opentrafficsim.road.gtu.strategical.route.RouteSupplier

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.strategical.route.RouteSupplier.DEFAULT_MAP should be moved out of an interface and made package protected MALICIOUS_CODE MS_OOI_PKGPROTECT 45 Medium

org.opentrafficsim.road.gtu.strategical.route.RouteSupplier$DefaultRouteSupplier

Bug Category Details Line Priority
Useless object stored in variable weights of method org.opentrafficsim.road.gtu.strategical.route.RouteSupplier$DefaultRouteSupplier.getRoute(Node, Node, GTUType) STYLE UC_USELESS_OBJECT 87 Medium

org.opentrafficsim.road.network.animation.BusStopAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.network.animation.BusStopAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 47-73 High

org.opentrafficsim.road.network.animation.ConflictAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.network.animation.ConflictAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 31-110 High

org.opentrafficsim.road.network.animation.LaneAnimation

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 1-123 High

org.opentrafficsim.road.network.animation.SensorAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.network.animation.SensorAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 1-106 High

org.opentrafficsim.road.network.animation.ShoulderAnimation

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

org.opentrafficsim.road.network.animation.SinkAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.network.animation.SinkAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 43-58 High

org.opentrafficsim.road.network.animation.SpeedSignAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.network.animation.SpeedSignAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 52-85 High

org.opentrafficsim.road.network.animation.StripeAnimation

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 1-275 High

org.opentrafficsim.road.network.animation.TrafficLightAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.network.animation.TrafficLightAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 1-120 High

org.opentrafficsim.road.network.animation.TrafficLightSensorAnimation

Bug Category Details Line Priority
org.opentrafficsim.road.network.animation.TrafficLightSensorAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 55-90 High

org.opentrafficsim.road.network.lane.CrossSectionLink

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

org.opentrafficsim.road.network.lane.Lane

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, boolean) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1892 Medium
org.opentrafficsim.road.network.lane.Lane.clone(CrossSectionLink, SimulatorInterface$TimeDoubleUnit, boolean) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1878 Medium
org.opentrafficsim.road.network.lane.Lane.getHighestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1591 Medium
org.opentrafficsim.road.network.lane.Lane.getLaneBasedObjectMap() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 903 Medium
org.opentrafficsim.road.network.lane.Lane.getLowestSpeedLimit() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 1575 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 1211 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 743 Medium

org.opentrafficsim.road.network.lane.LaneDirection

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

org.opentrafficsim.road.network.lane.LaneType

Bug Category Details Line Priority
Nullcheck of LaneType.compatibility at line 179 of value previously dereferenced in org.opentrafficsim.road.network.lane.LaneType.getDirectionality(GTUType) CORRECTNESS RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE 178 High
Nullcheck of LaneType.compatibility at line 259 of value previously dereferenced in org.opentrafficsim.road.network.lane.LaneType.getDirectionality(GTUType, boolean) CORRECTNESS RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE 258 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 1-263 High

org.opentrafficsim.road.network.lane.conflict.BusStopConflictRule

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

org.opentrafficsim.road.network.lane.conflict.Conflict

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 116 Medium
org.opentrafficsim.road.gtu.lane.perception.DownstreamNeighborsIterable stored into non-transient field Conflict.downstreamGtus BAD_PRACTICE SE_BAD_FIELD_STORE 258 Medium
org.opentrafficsim.road.gtu.lane.perception.UpstreamNeighborsIterable stored into non-transient field Conflict.upstreamGtus BAD_PRACTICE SE_BAD_FIELD_STORE 233 Medium

org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictEnd

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 438-465 Medium

org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtu

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 493-520 Medium

org.opentrafficsim.road.network.lane.conflict.Conflict$ConflictGtuIterable

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 1-723 Medium

org.opentrafficsim.road.network.lane.object.BusStop

Bug Category Details Line Priority
org.opentrafficsim.road.network.lane.object.BusStop.toString() concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 196 Medium

org.opentrafficsim.road.network.lane.object.Distraction

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

org.opentrafficsim.road.network.lane.object.sensor.Detector

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 454-479 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 469 Medium

org.opentrafficsim.road.network.lane.object.trafficlight.AbstractTrafficLightController

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 39 Medium

org.opentrafficsim.road.network.sampling.data.TimeToCollision

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

org.opentrafficsim.road.network.sampling.indicator.TotalDelayReference

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

org.opentrafficsim.road.network.speed.SpeedLimitInfo

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