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 |
---|---|---|---|---|
Class ahfe.AHFEAnimation defines non-transient non-serializable instance field sampler | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in ahfe.AHFEAnimation$1.run(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 481 | High |
ahfe.AHFEAnimation$1.run() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 528 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in ahfe.AHFEAnimation$AHFEModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 605 | Medium |
Exception is caught when Exception is not thrown in ahfe.AHFEAnimation$AHFEModel.constructModel(SimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 629 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class ahfe.AHFESimulation defines non-transient non-serializable instance field sampler | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in ahfe.AHFESimulation$1.run(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 477 | High |
ahfe.AHFESimulation$1.run() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 524 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in ahfe.AHFESimulation$AHFEModel.constructModel(SimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 618 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Bad attempt to compute absolute value of signed random integer in ahfe.AHFEUtil.createDemand(OTSNetwork, GTUColorer, DEVSSimulatorInterface$TimeDoubleUnit, int, String, Duration, Duration, double, Time, Frequency, Frequency, double, double, double, double) | CORRECTNESS | RV_ABSOLUTE_VALUE_OF_RANDOM_INT | 156 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in ahfe.DistractionScript.setupSimulation(DEVSSimulatorInterface$TimeDoubleUnit) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 207 | Medium |
Write to static field org.opentrafficsim.core.gtu.AbstractGTU.ALIGNED from instance method ahfe.DistractionScript.setupSimulation(DEVSSimulatorInterface$TimeDoubleUnit) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 203 | High |
Write to static field org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.INSTANT_LANE_CHANGES from instance method ahfe.DistractionScript.setupSimulation(DEVSSimulatorInterface$TimeDoubleUnit) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 204 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should ahfe.DistractionScript$DistractionFactorySupplier be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 315-376 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in loadfromxml.LoadXML.main(String[]): new String(byte[]) | I18N | DM_DEFAULT_ENCODING | 137 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integral division result cast to double or float in org.opentrafficsim.demo.carFollowing.CircularLane$LaneSimulationModel.constructModel(SimulatorInterface) | STYLE | ICAST_IDIV_CAST_TO_DOUBLE | 414 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integral division result cast to double or float in org.opentrafficsim.demo.carFollowing.CircularRoad$RoadSimulationModel.constructModel(SimulatorInterface) | STYLE | ICAST_IDIV_CAST_TO_DOUBLE | 577 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Altruistic stored into non-transient field CircularRoad$RoadSimulationModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 504 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field CircularRoad$RoadSimulationModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 500 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.carFollowing.CrossingTrafficLights$CrossingTrafficLightstModel.constructModel(SimulatorInterface) | STYLE | UC_USELESS_OBJECT | 333 | Medium |
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 |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.carFollowing.SequentialLanes$SequentialModel.constructModel(SimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 555 | Medium |
Useless object stored in variable links of method org.opentrafficsim.demo.carFollowing.SequentialLanes$SequentialModel.constructModel(SimulatorInterface) | STYLE | UC_USELESS_OBJECT | 432 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.carFollowing.ShortMerge$ShortMergeModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 264 | Medium |
Bad attempt to compute absolute value of signed random integer in org.opentrafficsim.demo.carFollowing.ShortMerge$ShortMergeModel.addGenerator() | CORRECTNESS | RV_ABSOLUTE_VALUE_OF_RANDOM_INT | 307 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to laneType in org.opentrafficsim.demo.carFollowing.XMLNetwork2Model.constructModel(SimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 315 | Medium |
Found reliance on default encoding in org.opentrafficsim.demo.carFollowing.XMLNetwork2Model.constructModel(SimulatorInterface): String.getBytes() | I18N | DM_DEFAULT_ENCODING | 736 | High |
Class org.opentrafficsim.demo.carFollowing.XMLNetwork2Model defines non-transient non-serializable instance field laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Altruistic stored into non-transient field XMLNetwork2Model.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 390 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetwork2Model.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 242 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetwork2Model.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 386 | Medium |
Unwritten field: org.opentrafficsim.demo.carFollowing.XMLNetwork2Model.routeGenerator | CORRECTNESS | UWF_UNWRITTEN_FIELD | 830 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.demo.carFollowing.XMLNetwork2Model$DirectionGTUColorer be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 962-997 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integer remainder modulo 1 computed in org.opentrafficsim.demo.carFollowing.XMLNetworks.addTabs(SimpleSimulatorInterface) | STYLE | INT_BAD_REM_BY_1 | 174 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Possible null pointer dereference of cp in org.opentrafficsim.demo.carFollowing.XMLNetworks$XMLNetworkModel.constructModel(SimulatorInterface) on exception path | CORRECTNESS | NP_NULL_ON_SOME_PATH_EXCEPTION | 337 | Medium |
Return value of setupBlock(Lane) ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 614 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Altruistic stored into non-transient field XMLNetworks$XMLNetworkModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 419 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetworks$XMLNetworkModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 252 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetworks$XMLNetworkModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 415 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integer remainder modulo 1 computed in org.opentrafficsim.demo.carFollowing.XMLNetworks2.addTabs(SimpleSimulatorInterface) | STYLE | INT_BAD_REM_BY_1 | 163 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integer remainder modulo 1 computed in org.opentrafficsim.demo.carFollowing.XMLSampler.addTabs(SimpleSimulatorInterface) | STYLE | INT_BAD_REM_BY_1 | 190 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Possible null pointer dereference of cp in org.opentrafficsim.demo.carFollowing.XMLSampler$XMLSamplerModel.constructModel(SimulatorInterface) on exception path | CORRECTNESS | NP_NULL_ON_SOME_PATH_EXCEPTION | 355 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Altruistic stored into non-transient field XMLSampler$XMLSamplerModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 437 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLSampler$XMLSamplerModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 268 | Medium |
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLSampler$XMLSamplerModel.laneChangeModel | BAD_PRACTICE | SE_BAD_FIELD_STORE | 433 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 161 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel(SimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 208 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator(BusStreetDemo, DEVSSimulatorInterface$TimeDoubleUnit, double[], OTSNetwork) may expose internal representation by storing an externally mutable object into BusStreetDemo$CharacteristicsGenerator.probabilities | MALICIOUS_CODE | EI_EXPOSE_REP2 | 375 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.demo.conflict.BusStreetDemo$HeadwayGenerator be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-320 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.demo.conflict.BusStreetDemo$LMRSFactoryCarBus be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-561 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.demo.conflict.BusStreetDemo$ParameterFactoryCarBus be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 581-604 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 105 | Medium |
Switch statement found in org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel.changePhase(SimpleTrafficLight) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 136-155 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.TestNetworkDemo$TestNetworkModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 102 | Medium |
Should org.opentrafficsim.demo.conflict.TestNetworkDemo$TestNetworkModel be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 82-147 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 110 | Medium |
Switch statement found in org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel.changePhase(SimpleTrafficLight) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 149-168 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 265 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 189 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel(SimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 297 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to capacity in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(Network, String, Map, Map, SimulatorInterface$TimeDoubleUnit) | STYLE | DLS_DEAD_LOCAL_STORE | 240 | Medium |
Dead store to length in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(Network, String, Map, Map, SimulatorInterface$TimeDoubleUnit) | STYLE | DLS_DEAD_LOCAL_STORE | 228 | Medium |
Dead store to speed in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(Network, String, Map, Map, SimulatorInterface$TimeDoubleUnit) | 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(Network, String, Map, Map, SimulatorInterface$TimeDoubleUnit) | 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(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 57 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.geometry.shape.ShapeModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 55 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.demo.timing.TimeCircularRoadAnimation.stop(long) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 103 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.demo.timing.TimeCircularRoadSimulation.stop(long) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 133 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 155 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 180 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel(SimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 203 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 200 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 164 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel.constructModel(SimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 223 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
strategies.LmrsStrategies.notify(EventInterface) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 1037 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
strategies.LmrsStrategies$LmrsStrategiesModel.constructModel(SimulatorInterface) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 844 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$SigmaMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-1111 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VDes0Measurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-1332 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VDesMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-1257 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VGainMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-1184 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integral division result cast to double or float in strategies.StrategiesDemo.setupSimulation(DEVSSimulatorInterface$TimeDoubleUnit) | STYLE | ICAST_IDIV_CAST_TO_DOUBLE | 510 | Medium |
Write to static field org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder.INSTANT_LANE_CHANGES from instance method strategies.StrategiesDemo.setupSimulation(DEVSSimulatorInterface$TimeDoubleUnit) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 440 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.StrategiesDemo$LmrsStrategiesPerceptionFactory be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 617-637 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.StrategiesDemo$SocioIDMFactory be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-612 | Medium |