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
83 40 0 0

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 342 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 225-521 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 224-509 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 422 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 584 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 511 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field RoadSimulationModel.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 507 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 562 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 724-769 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 440 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 436 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 1031-1066 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 184 High

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 106 Medium
Should org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 86-182 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 106 Medium
Should org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 86-190 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.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 156 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 182 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo$TrafCODModel.constructModel(SimulatorInterface) STYLE REC_CATCH_EXCEPTION 206 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 197 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 220 Medium