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
118 66 0 0

Files

Class Bugs
ahfe.AHFESimulation 1
ahfe.AHFESimulation$1 2
ahfe.AHFESimulation$AHFEModel 2
ahfe.AHFEUtil 1
loadfromxml.LoadXML 1
org.opentrafficsim.demo.carFollowing.CrossingTrafficLightstModel 2
org.opentrafficsim.demo.carFollowing.FundamentalDiagrams$FundamentalDiagramPlotsModel 1
org.opentrafficsim.demo.carFollowing.FundamentalDiagramsLane$FundamentalDiagramLanePlotsModel 1
org.opentrafficsim.demo.carFollowing.LaneSimulationModel 1
org.opentrafficsim.demo.carFollowing.OSMModel 2
org.opentrafficsim.demo.carFollowing.RoadSimulationModel 4
org.opentrafficsim.demo.carFollowing.SequentialModel 2
org.opentrafficsim.demo.carFollowing.ShortMerge$ShortMergeModel 2
org.opentrafficsim.demo.carFollowing.StraightPerceptionModel$LaneBasedPerceivingCar 1
org.opentrafficsim.demo.carFollowing.XMLNetworkModel 5
org.opentrafficsim.demo.carFollowing.XMLNetworkModel$DirectionGTUColorer 1
org.opentrafficsim.demo.carFollowing.XMLNetworks 1
org.opentrafficsim.demo.carFollowing.XMLSampler 1
org.opentrafficsim.demo.carFollowing.XMLSamplerModel 4
org.opentrafficsim.demo.carFollowing.XMLSamplerModel$DirectionGTUColorer 1
org.opentrafficsim.demo.conflict.BusStreetDemo$BehavioralCharacteristicsFactoryCarBus 1
org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel 2
org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator 1
org.opentrafficsim.demo.conflict.BusStreetDemo$HeadwayGenerator 1
org.opentrafficsim.demo.conflict.BusStreetDemo$LMRSFactoryCarBus 1
org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel 2
org.opentrafficsim.demo.conflict.TestNetworkDemo$TestNetworkModel 2
org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel 2
org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel 3
org.opentrafficsim.demo.geometry.shape.ShapeFileReader 5
org.opentrafficsim.demo.geometry.shape.ShapeModel 2
org.opentrafficsim.demo.timing.TimeCircularRoadAnimation 1
org.opentrafficsim.demo.timing.TimeCircularRoadSimulation 1
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel 3
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel 3

ahfe.AHFESimulation

Bug Category Details Line Priority
Class ahfe.AHFESimulation defines non-transient non-serializable instance field sampler BAD_PRACTICE SE_BAD_FIELD Not available Medium

ahfe.AHFESimulation$1

Bug Category Details Line Priority
Found reliance on default encoding in ahfe.AHFESimulation$1.run(): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 480 High
ahfe.AHFESimulation$1.run() invokes System.exit(...), which shuts down the entire virtual machine BAD_PRACTICE DM_EXIT 528 Medium

ahfe.AHFESimulation$AHFEModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in ahfe.AHFESimulation$AHFEModel.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 617 Medium
Exception is caught when Exception is not thrown in ahfe.AHFESimulation$AHFEModel.constructModel(SimulatorInterface) STYLE REC_CATCH_EXCEPTION 641 Medium

ahfe.AHFEUtil

Bug Category Details Line Priority
Bad attempt to compute absolute value of signed random integer in ahfe.AHFEUtil.createDemand(OTSNetwork, GTUColorer, OTSDEVSSimulatorInterface, int, String, Duration, Duration, double, Time, Frequency, Frequency, double, double, double, double) CORRECTNESS RV_ABSOLUTE_VALUE_OF_RANDOM_INT 141 High

loadfromxml.LoadXML

Bug Category Details Line Priority
Found reliance on default encoding in loadfromxml.LoadXML.main(String[]): new String(byte[]) I18N DM_DEFAULT_ENCODING 106 High

org.opentrafficsim.demo.carFollowing.CrossingTrafficLightstModel

Bug Category Details Line Priority
Class org.opentrafficsim.demo.carFollowing.CrossingTrafficLightstModel defines non-transient non-serializable instance field laneChangeModel BAD_PRACTICE SE_BAD_FIELD Not available Medium
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.carFollowing.CrossingTrafficLightstModel.constructModel(SimulatorInterface) STYLE UC_USELESS_OBJECT 344 Medium

org.opentrafficsim.demo.carFollowing.FundamentalDiagrams$FundamentalDiagramPlotsModel

Bug Category Details Line Priority
Should org.opentrafficsim.demo.carFollowing.FundamentalDiagrams$FundamentalDiagramPlotsModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 226-522 Medium

org.opentrafficsim.demo.carFollowing.FundamentalDiagramsLane$FundamentalDiagramLanePlotsModel

Bug Category Details Line Priority
Should org.opentrafficsim.demo.carFollowing.FundamentalDiagramsLane$FundamentalDiagramLanePlotsModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 225-511 Medium

org.opentrafficsim.demo.carFollowing.LaneSimulationModel

Bug Category Details Line Priority
Integral division result cast to double or float in org.opentrafficsim.demo.carFollowing.LaneSimulationModel.constructModel(SimulatorInterface) STYLE ICAST_IDIV_CAST_TO_DOUBLE 423 Medium

org.opentrafficsim.demo.carFollowing.OSMModel

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
Unwritten field: org.opentrafficsim.demo.carFollowing.OSMModel.simulator CORRECTNESS UWF_UNWRITTEN_FIELD 353 Medium

org.opentrafficsim.demo.carFollowing.RoadSimulationModel

Bug Category Details Line Priority
Integral division result cast to double or float in org.opentrafficsim.demo.carFollowing.RoadSimulationModel.constructModel(SimulatorInterface) STYLE ICAST_IDIV_CAST_TO_DOUBLE 588 Medium
Class org.opentrafficsim.demo.carFollowing.RoadSimulationModel 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 RoadSimulationModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 513 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field RoadSimulationModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 509 Medium

org.opentrafficsim.demo.carFollowing.SequentialModel

Bug Category Details Line Priority
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.carFollowing.SequentialModel.constructModel(SimulatorInterface) STYLE REC_CATCH_EXCEPTION 563 Medium
Useless object stored in variable links of method org.opentrafficsim.demo.carFollowing.SequentialModel.constructModel(SimulatorInterface) STYLE UC_USELESS_OBJECT 441 Medium

org.opentrafficsim.demo.carFollowing.ShortMerge$ShortMergeModel

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

org.opentrafficsim.demo.carFollowing.StraightPerceptionModel$LaneBasedPerceivingCar

Bug Category Details Line Priority
Should org.opentrafficsim.demo.carFollowing.StraightPerceptionModel$LaneBasedPerceivingCar be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 720-765 Medium

org.opentrafficsim.demo.carFollowing.XMLNetworkModel

Bug Category Details Line Priority
Possible null pointer dereference of cp in org.opentrafficsim.demo.carFollowing.XMLNetworkModel.constructModel(SimulatorInterface) on exception path CORRECTNESS NP_NULL_ON_SOME_PATH_EXCEPTION 358 Medium
Class org.opentrafficsim.demo.carFollowing.XMLNetworkModel 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 XMLNetworkModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 442 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetworkModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 265 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetworkModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 438 Medium

org.opentrafficsim.demo.carFollowing.XMLNetworkModel$DirectionGTUColorer

Bug Category Details Line Priority
Should org.opentrafficsim.demo.carFollowing.XMLNetworkModel$DirectionGTUColorer be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1039-1074 Medium

org.opentrafficsim.demo.carFollowing.XMLNetworks

Bug Category Details Line Priority
Integer remainder modulo 1 computed in org.opentrafficsim.demo.carFollowing.XMLNetworks.addTabs(SimpleSimulatorInterface) STYLE INT_BAD_REM_BY_1 186 High

org.opentrafficsim.demo.carFollowing.XMLSampler

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

org.opentrafficsim.demo.carFollowing.XMLSamplerModel

Bug Category Details Line Priority
Possible null pointer dereference of cp in org.opentrafficsim.demo.carFollowing.XMLSamplerModel.constructModel(SimulatorInterface) on exception path CORRECTNESS NP_NULL_ON_SOME_PATH_EXCEPTION 364 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Altruistic stored into non-transient field XMLSamplerModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 448 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLSamplerModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 269 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLSamplerModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 444 Medium

org.opentrafficsim.demo.carFollowing.XMLSamplerModel$DirectionGTUColorer

Bug Category Details Line Priority
Should org.opentrafficsim.demo.carFollowing.XMLSamplerModel$DirectionGTUColorer be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1049-1084 Medium

org.opentrafficsim.demo.conflict.BusStreetDemo$BehavioralCharacteristicsFactoryCarBus

Bug Category Details Line Priority
Should org.opentrafficsim.demo.conflict.BusStreetDemo$BehavioralCharacteristicsFactoryCarBus be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 609-633 Medium

org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel

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 163 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel(SimulatorInterface) STYLE REC_CATCH_EXCEPTION 210 Medium

org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator

Bug Category Details Line Priority
new org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator(BusStreetDemo, OTSDEVSSimulatorInterface, double[], Set, OTSNetwork) may expose internal representation by storing an externally mutable object into BusStreetDemo$CharacteristicsGenerator.probabilities MALICIOUS_CODE EI_EXPOSE_REP2 392 Medium

org.opentrafficsim.demo.conflict.BusStreetDemo$HeadwayGenerator

Bug Category Details Line Priority
Should org.opentrafficsim.demo.conflict.BusStreetDemo$HeadwayGenerator be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 295-326 Medium

org.opentrafficsim.demo.conflict.BusStreetDemo$LMRSFactoryCarBus

Bug Category Details Line Priority
Should org.opentrafficsim.demo.conflict.BusStreetDemo$LMRSFactoryCarBus be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 555-588 Medium

org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel

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
Should org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 85-177 Medium

org.opentrafficsim.demo.conflict.TestNetworkDemo$TestNetworkModel

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 103 Medium
Should org.opentrafficsim.demo.conflict.TestNetworkDemo$TestNetworkModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 83-148 Medium

org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel

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 107 Medium
Should org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 87-187 Medium

org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel

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 264 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 188 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel(SimulatorInterface) STYLE REC_CATCH_EXCEPTION 296 Medium

org.opentrafficsim.demo.geometry.shape.ShapeFileReader

Bug Category Details Line Priority
Dead store to capacity in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(Network, String, Map, Map, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 241 Medium
Dead store to length in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(Network, String, Map, Map, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 229 Medium
Dead store to speed in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(Network, String, Map, Map, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 239 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 126 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(Network, String, Map, Map, OTSSimulatorInterface) STYLE REC_CATCH_EXCEPTION 282 Medium

org.opentrafficsim.demo.geometry.shape.ShapeModel

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 58 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.geometry.shape.ShapeModel.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 56 Medium

org.opentrafficsim.demo.timing.TimeCircularRoadAnimation

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

org.opentrafficsim.demo.timing.TimeCircularRoadSimulation

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

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel

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 157 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 183 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel(SimulatorInterface) STYLE REC_CATCH_EXCEPTION 207 Medium

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel

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 198 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 165 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel.constructModel(SimulatorInterface) STYLE REC_CATCH_EXCEPTION 221 Medium