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 |
---|---|---|---|---|
Found reliance on default encoding in loadfromxml.LoadXML.main(String[]): new String(byte[]) | I18N | DM_DEFAULT_ENCODING | 122 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.opentrafficsim.ahfe.AHFEAnimation$1.run(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 337 | High |
org.opentrafficsim.ahfe.AHFEAnimation$1.run() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 384 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.ahfe.AHFEAnimation$AHFEModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 496 | Medium |
Class org.opentrafficsim.ahfe.AHFEAnimation$AHFEModel defines non-transient non-serializable instance field sampler | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.sampling.RoadSampler stored into non-transient field AHFEAnimation$AHFEModel.sampler | BAD_PRACTICE | SE_BAD_FIELD_STORE | 492 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.opentrafficsim.ahfe.AHFESimulation$1.run(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 325 | High |
org.opentrafficsim.ahfe.AHFESimulation$1.run() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 372 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.ahfe.AHFESimulation$AHFEModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 478 | Medium |
Class org.opentrafficsim.ahfe.AHFESimulation$AHFEModel defines non-transient non-serializable instance field sampler | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.sampling.RoadSampler stored into non-transient field AHFESimulation$AHFEModel.sampler | BAD_PRACTICE | SE_BAD_FIELD_STORE | 473 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Bad attempt to compute absolute value of signed random integer in org.opentrafficsim.ahfe.AHFEUtil.createDemand(OTSRoadNetwork, GTUColorer, OTSSimulatorInterface, int, String, Duration, Duration, double, Time, Frequency, Frequency, double, double, double, double) | CORRECTNESS | RV_ABSOLUTE_VALUE_OF_RANDOM_INT | 152 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Load of known null value in org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory.changeLane(LateralDirectionality) | STYLE | NP_LOAD_OF_KNOWN_NULL_VALUE | 183 | Medium |
org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory.changeLane(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 175 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
There is an apparent infinite recursive loop in org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory$DelayedInfoType.getId() | CORRECTNESS | IL_INFINITE_RECURSIVE_LOOP | 230 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.ahfe.AnticipationRelianceScript.setupSimulation(OTSSimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 312 | Medium |
Write to static field org.opentrafficsim.core.gtu.AbstractGTU.ALIGNED from instance method org.opentrafficsim.ahfe.AnticipationRelianceScript.setupSimulation(OTSSimulatorInterface) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 308 | High |
Write to static field org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.INSTANT_LANE_CHANGES from instance method org.opentrafficsim.ahfe.AnticipationRelianceScript.setupSimulation(OTSSimulatorInterface) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 309 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$CarFollowingTaskAR be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 559-577 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$IdmPlusFactoryAR be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 713-741 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$LaneChangeTaskAR be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 587-597 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$SituationalAwarenessDataType be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 825-845 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskAnticipationRelianceDataType be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 772-793 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskDemandDataType be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 799-819 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskManagerAR be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 675-709 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskSaturationDataType be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 746-766 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.ahfe.DelayedNeighborsPerception$ErrorValue be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 512-545 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.CircularLaneModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 204 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.CircularRoadModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 220 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable lanes of method org.opentrafficsim.demo.CircularRoadSwing.addStatisticsTabs(OTSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 161 | Medium |
Useless object stored in variable positions of method org.opentrafficsim.demo.CircularRoadSwing.addStatisticsTabs(OTSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 162 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.CrossingTrafficLightsModel.constructModel() | STYLE | UC_USELESS_OBJECT | 144 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integer remainder modulo 1 computed in org.opentrafficsim.demo.NetworksSwing.addStatisticsTabs(OTSSimulatorInterface) | STYLE | INT_BAD_REM_BY_1 | 150 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable links of method org.opentrafficsim.demo.SequentialLanes$SequentialModel.constructModel() | STYLE | UC_USELESS_OBJECT | 290 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.ShortMerge$ShortMergeModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 239 | Medium |
Bad attempt to compute absolute value of signed random integer in org.opentrafficsim.demo.ShortMerge$ShortMergeModel.addGenerator() | CORRECTNESS | RV_ABSOLUTE_VALUE_OF_RANDOM_INT | 275 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.demo.carFollowing.OSMModel defines non-transient non-serializable instance field converter | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 177 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 224 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator(DEVSSimulatorInterface$TimeDoubleUnit, double[], OTSRoadNetwork) may expose internal representation by storing an externally mutable object into BusStreetDemo$CharacteristicsGenerator.probabilities | MALICIOUS_CODE | EI_EXPOSE_REP2 | 358 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 120 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.TestNetworkDemo$TestNetworkModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 117 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 121 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 246 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 153 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 277 | Medium |
Useless object stored in variable sensors of method org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | UC_USELESS_OBJECT | 174 | Medium |
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | UC_USELESS_OBJECT | 173 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to capacity in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 240 | Medium |
Dead store to length in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 228 | Medium |
Dead store to speed in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 238 | Medium |
Redundant nullcheck of nr, which is known to be non-null in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readNodes(Network, String, String, boolean, boolean) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 125 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 281 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.geometry.shape.ShapeModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 56 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.geometry.shape.ShapeModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 54 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.opentrafficsim.demo.sdm.SdmSimulation.onSimulationEnd(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 479 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.demo.sdm.SdmStrategicalPlannerFactory$SdmPerception be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 149-181 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable originLanes of method org.opentrafficsim.demo.steering.SteeringSimulation.setupSimulation(OTSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 160 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 144 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 185 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 207 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2.demo(boolean) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 102 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 202 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
strategies.LmrsStrategies.notify(EventInterface) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 1019 | Medium |
Return value of new LmrsStrategies$LmrsStrategiesSimulation(LmrsStrategies, OTSModelInterface) ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 409 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$LmrsStrategiesAnimation be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 498-511 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
strategies.LmrsStrategies$LmrsStrategiesModel.constructModel() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 834 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$LmrsStrategiesSimulation be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 470-472 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$SigmaMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1036-1093 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VDes0Measurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1255-1314 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VDesMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1182-1239 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VGainMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1109-1166 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integral division result cast to double or float in strategies.StrategiesDemo.setupSimulation(OTSSimulatorInterface) | STYLE | ICAST_IDIV_CAST_TO_DOUBLE | 575 | Medium |
Write to static field org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.INSTANT_LANE_CHANGES from instance method strategies.StrategiesDemo.setupSimulation(OTSSimulatorInterface) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 490 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.StrategiesDemo$LmrsStrategiesPerceptionFactory be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 685-705 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.StrategiesDemo$SocioIDMFactory be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 665-680 | Medium |