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
65 31 0 0

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 225-528 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-518 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 428 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 397 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 602 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 514 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field RoadSimulationModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 510 Medium

org.opentrafficsim.demo.carFollowing.RoadSimulationModelIMB

Bug Category Details Line Priority
Integral division result cast to double or float in org.opentrafficsim.demo.carFollowing.RoadSimulationModelIMB.constructModel(SimulatorInterface) STYLE ICAST_IDIV_CAST_TO_DOUBLE 607 Medium
Class org.opentrafficsim.demo.carFollowing.RoadSimulationModelIMB defines non-transient non-serializable instance field imbTransmitter BAD_PRACTICE SE_BAD_FIELD Not available Medium
Class org.opentrafficsim.demo.carFollowing.RoadSimulationModelIMB 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 RoadSimulationModelIMB.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 526 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field RoadSimulationModelIMB.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 522 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 569 Medium
Useless object stored in variable links of method org.opentrafficsim.demo.carFollowing.SequentialModel.constructModel(SimulatorInterface) STYLE UC_USELESS_OBJECT 440 Medium

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 721-796 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 356 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 446 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetworkModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 263 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field XMLNetworkModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 442 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 1034-1069 Medium

org.opentrafficsim.demo.carFollowing.XMLNetworks

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

org.opentrafficsim.demo.geometry.shape.ShapeFileReader

Bug Category Details Line Priority
Dead store to capacity in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(String, Map, Map, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 238 Medium
Dead store to length in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(String, Map, Map, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 226 Medium
Dead store to speed in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(String, Map, Map, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 236 Medium
Redundant nullcheck of nr, which is known to be non-null in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readNodes(String, String, boolean, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 124 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(String, Map, Map, OTSSimulatorInterface) STYLE REC_CATCH_EXCEPTION 281 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 56 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.geometry.shape.ShapeModel.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 54 Medium