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
60 29 0 0

org.opentrafficsim.imb.connector.OTSIMBConnector

Bug Category Details Line Priority
org.opentrafficsim.imb.connector.OTSIMBConnector.PROPERTY_KEY isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 26 High

org.opentrafficsim.imb.demo.A58IMB$A58Model

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.imb.demo.A58IMB$A58Model.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 261 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.imb.demo.A58IMB$A58Model.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 235 Medium

org.opentrafficsim.imb.demo.A58IMB$CoordinateTransformRD

Bug Category Details Line Priority
org.opentrafficsim.imb.demo.A58IMB$CoordinateTransformRD is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 303-336 Medium
Should org.opentrafficsim.imb.demo.A58IMB$CoordinateTransformRD be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 303-336 Medium

org.opentrafficsim.imb.demo.Convert

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.imb.demo.Convert.main(String[]) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 293 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.imb.demo.Convert.main(String[]) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 295 Medium
Found reliance on default encoding in org.opentrafficsim.imb.demo.Convert.main(String[]): new String(byte[]) I18N DM_DEFAULT_ENCODING 293 High

org.opentrafficsim.imb.demo.IMBChat

Bug Category Details Line Priority
Write to static field org.opentrafficsim.imb.demo.IMBChat.connection from instance method org.opentrafficsim.imb.demo.IMBChat.Connect() STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 162 High
Write to static field org.opentrafficsim.imb.demo.IMBChat.chatMessageEvent from instance method org.opentrafficsim.imb.demo.IMBChat.Connect() STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 179 Medium

org.opentrafficsim.imb.demo.ModelControlDemo

Bug Category Details Line Priority
Boxed value is unboxed and then immediately reboxed in org.opentrafficsim.imb.demo.ModelControlDemo.startModel(ModelParameters, TConnection) PERFORMANCE BX_UNBOXING_IMMEDIATELY_REBOXED 201 Medium
Invocation of toString on values in org.opentrafficsim.imb.demo.ModelControlDemo.startModel(ModelParameters, TConnection) CORRECTNESS DMI_INVOKING_TOSTRING_ON_ARRAY 205 Medium

org.opentrafficsim.imb.demo.ModelControlDemo$CircularRoadIMB

Bug Category Details Line Priority
Integral division result cast to double or float in org.opentrafficsim.imb.demo.ModelControlDemo$CircularRoadIMB.constructModel(SimulatorInterface) STYLE ICAST_IDIV_CAST_TO_DOUBLE 706 Medium
Class org.opentrafficsim.imb.demo.ModelControlDemo$CircularRoadIMB defines non-transient non-serializable instance field imbConnector BAD_PRACTICE SE_BAD_FIELD Not available Medium
Class org.opentrafficsim.imb.demo.ModelControlDemo$CircularRoadIMB 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 ModelControlDemo$CircularRoadIMB.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 640 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field ModelControlDemo$CircularRoadIMB.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 636 Medium

org.opentrafficsim.imb.demo.N201IMB$CoordinateTransformRD

Bug Category Details Line Priority
org.opentrafficsim.imb.demo.N201IMB$CoordinateTransformRD is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 303-336 Medium
Should org.opentrafficsim.imb.demo.N201IMB$CoordinateTransformRD be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 303-336 Medium

org.opentrafficsim.imb.demo.N201IMB$N201Model

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.imb.demo.N201IMB$N201Model.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 261 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.imb.demo.N201IMB$N201Model.constructModel(SimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 237 Medium

org.opentrafficsim.imb.demo.N201ODfactory

Bug Category Details Line Priority
Dead store to northBound in org.opentrafficsim.imb.demo.N201ODfactory.getQuery(OTSNetwork, Sampler) STYLE DLS_DEAD_LOCAL_STORE 229 Medium
Dead store to route in org.opentrafficsim.imb.demo.N201ODfactory.makeGeneratorsFromOD(OTSNetwork, ODMatrixTrips, OTSDEVSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 165 Medium
Useless object stored in variable northBound of method org.opentrafficsim.imb.demo.N201ODfactory.getQuery(OTSNetwork, Sampler) STYLE UC_USELESS_OBJECT 229 Medium

org.opentrafficsim.imb.demo.RoadSimulationModelIMB

Bug Category Details Line Priority
Integral division result cast to double or float in org.opentrafficsim.imb.demo.RoadSimulationModelIMB.constructModel(SimulatorInterface) STYLE ICAST_IDIV_CAST_TO_DOUBLE 649 Medium
Class org.opentrafficsim.imb.demo.RoadSimulationModelIMB defines non-transient non-serializable instance field imbConnector BAD_PRACTICE SE_BAD_FIELD Not available Medium
Class org.opentrafficsim.imb.demo.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 584 Medium
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic stored into non-transient field RoadSimulationModelIMB.laneChangeModel BAD_PRACTICE SE_BAD_FIELD_STORE 580 Medium