SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 3.1.12

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
79 21 0 0

Files

Class Bugs
org.opentrafficsim.road.network.factory.xml.demand.XmlOdParser 1
org.opentrafficsim.road.network.factory.xml.old.FillTag 2
org.opentrafficsim.road.network.factory.xml.old.GeneratorTag 1
org.opentrafficsim.road.network.factory.xml.old.LinkTag 1
org.opentrafficsim.road.network.factory.xml.old.Links 2
org.opentrafficsim.road.network.factory.xml.old.ListGeneratorTag 1
org.opentrafficsim.road.network.factory.xml.old.XmlNetworkLaneParserOld 3
org.opentrafficsim.road.network.factory.xml.parser.DefinitionsParser 3
org.opentrafficsim.road.network.factory.xml.parser.GeneratorSinkParser 2
org.opentrafficsim.road.network.factory.xml.parser.ODParser 1
org.opentrafficsim.road.network.factory.xml.parser.XmlNetworkLaneParser 4

org.opentrafficsim.road.network.factory.xml.demand.XmlOdParser

Bug Category Details Line Priority
Class org.opentrafficsim.road.network.factory.xml.demand.XmlOdParser defines non-transient non-serializable instance field demand BAD_PRACTICE SE_BAD_FIELD Not available High

org.opentrafficsim.road.network.factory.xml.old.FillTag

Bug Category Details Line Priority
Dead store to rg in org.opentrafficsim.road.network.factory.xml.old.FillTag.makeFill(FillTag, XmlNetworkLaneParserOld, LinkTag, DEVSSimulatorInterface$TimeDoubleUnit) STYLE DLS_DEAD_LOCAL_STORE 224 High
Dead store of org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU.class in org.opentrafficsim.road.network.factory.xml.old.FillTag.makeFill(FillTag, XmlNetworkLaneParserOld, LinkTag, DEVSSimulatorInterface$TimeDoubleUnit) CORRECTNESS DLS_DEAD_STORE_OF_CLASS_LITERAL 217 Medium

org.opentrafficsim.road.network.factory.xml.old.GeneratorTag

Bug Category Details Line Priority
Dead store to generator in org.opentrafficsim.road.network.factory.xml.old.GeneratorTag.makeGenerator(GeneratorTag, XmlNetworkLaneParserOld, LinkTag, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 362 High

org.opentrafficsim.road.network.factory.xml.old.LinkTag

Bug Category Details Line Priority
Class org.opentrafficsim.road.network.factory.xml.old.LinkTag defines non-transient non-serializable instance field bezierTag BAD_PRACTICE SE_BAD_FIELD Not available High

org.opentrafficsim.road.network.factory.xml.old.Links

Bug Category Details Line Priority
Useless object stored in variable cseList of method org.opentrafficsim.road.network.factory.xml.old.Links.applyRoadTypeToLink(LinkTag, XmlNetworkLaneParserOld, OTSSimulatorInterface) STYLE UC_USELESS_OBJECT 287 Medium
Useless object stored in variable lanes of method org.opentrafficsim.road.network.factory.xml.old.Links.applyRoadTypeToLink(LinkTag, XmlNetworkLaneParserOld, OTSSimulatorInterface) STYLE UC_USELESS_OBJECT 288 Medium

org.opentrafficsim.road.network.factory.xml.old.ListGeneratorTag

Bug Category Details Line Priority
Unwritten field: org.opentrafficsim.road.network.factory.xml.old.ListGeneratorTag.gtuColorer CORRECTNESS UWF_UNWRITTEN_FIELD 144 Medium

org.opentrafficsim.road.network.factory.xml.old.XmlNetworkLaneParserOld

Bug Category Details Line Priority
Write to static field org.opentrafficsim.road.network.factory.xml.old.GTUColorerTag.defaultColorer from instance method new org.opentrafficsim.road.network.factory.xml.old.XmlNetworkLaneParserOld(OTSSimulatorInterface, GTUColorer) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 173 High
Useless object stored in variable templates of method org.opentrafficsim.road.network.factory.xml.old.XmlNetworkLaneParserOld.fixOD(OTSRoadNetwork) STYLE UC_USELESS_OBJECT 563 Medium
org.opentrafficsim.road.network.factory.xml.old.XmlNetworkLaneParserOld.build(InputStream, OTSRoadNetwork, boolean) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 371 Medium

org.opentrafficsim.road.network.factory.xml.parser.DefinitionsParser

Bug Category Details Line Priority
Redundant nullcheck of networkGtuType, which is known to be non-null in org.opentrafficsim.road.network.factory.xml.parser.DefinitionsParser.parseGtuTypes(DEFINITIONS, OTSRoadNetwork, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 88 Medium
Redundant nullcheck of networkLaneType, which is known to be non-null in org.opentrafficsim.road.network.factory.xml.parser.DefinitionsParser.parseLaneTypes(DEFINITIONS, OTSRoadNetwork, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 181 Medium
Redundant nullcheck of networkLinkType, which is known to be non-null in org.opentrafficsim.road.network.factory.xml.parser.DefinitionsParser.parseLinkTypes(DEFINITIONS, OTSRoadNetwork, boolean, Map) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 132 Medium

org.opentrafficsim.road.network.factory.xml.parser.GeneratorSinkParser

Bug Category Details Line Priority
Redundant nullcheck of nodeTo, which is known to be non-null in org.opentrafficsim.road.network.factory.xml.parser.GeneratorSinkParser.parseShortestRoutes(OTSRoadNetwork, NETWORKDEMAND) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 133 High
Exception is caught when Exception is not thrown in org.opentrafficsim.road.network.factory.xml.parser.GeneratorSinkParser.parseGenerators(OTSRoadNetwork, NETWORKDEMAND, Map, Map, Map, OTSSimulatorInterface, Map) STYLE REC_CATCH_EXCEPTION 363 Medium

org.opentrafficsim.road.network.factory.xml.parser.ODParser

Bug Category Details Line Priority
Useless object stored in variable categoryFactors of method org.opentrafficsim.road.network.factory.xml.parser.ODParser.parseDemand(OTSRoadNetwork, OTSSimulatorInterface, List, Map, Map, Map, Map) STYLE UC_USELESS_OBJECT 174 Medium

org.opentrafficsim.road.network.factory.xml.parser.XmlNetworkLaneParser

Bug Category Details Line Priority
Dead store to animation in org.opentrafficsim.road.network.factory.xml.parser.XmlNetworkLaneParser.build(OTS, OTSRoadNetwork, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 319 Medium
Dead store to modelParameters in org.opentrafficsim.road.network.factory.xml.parser.XmlNetworkLaneParser.build(OTS, OTSRoadNetwork, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 317 Medium
Dead store to scenario in org.opentrafficsim.road.network.factory.xml.parser.XmlNetworkLaneParser.build(OTS, OTSRoadNetwork, OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 318 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.road.network.factory.xml.parser.XmlNetworkLaneParser.main(String[]) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 334 Medium