The following document contains the results of FindBugs
FindBugs Version is 3.0.1
Threshold is medium
Effort is min
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.graphs.ContourPlot.STANDARDDISTANCEGRANULARITIES should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 88 | Medium |
org.opentrafficsim.graphs.ContourPlot.STANDARDTIMEGRANULARITIES should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 82 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Comparison of String objects using == or != in org.opentrafficsim.graphs.FundamentalDiagram.actionPerformed(ActionEvent) | BAD_PRACTICE | ES_COMPARING_STRINGS_WITH_EQ | 527 | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagram defines non-transient non-serializable instance field densityAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagram defines non-transient non-serializable instance field flowAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagram defines non-transient non-serializable instance field samples | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagram defines non-transient non-serializable instance field speedAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagram defines non-transient non-serializable instance field xAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagram defines non-transient non-serializable instance field yAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Comparison of String objects using == or != in org.opentrafficsim.graphs.FundamentalDiagramLane.actionPerformed(ActionEvent) | BAD_PRACTICE | ES_COMPARING_STRINGS_WITH_EQ | 442 | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagramLane defines non-transient non-serializable instance field densityAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagramLane defines non-transient non-serializable instance field flowAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagramLane defines non-transient non-serializable instance field samples | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagramLane defines non-transient non-serializable instance field speedAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagramLane defines non-transient non-serializable instance field xAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.FundamentalDiagramLane defines non-transient non-serializable instance field yAxis | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.graphs.TrajectoryPlot defines non-transient non-serializable instance field trajectories | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.graphs.TrajectoryPlot defines non-transient non-serializable instance field trajectoryIndices | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.car.LaneBasedIndividualCar defines non-transient non-serializable instance field animation | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.car.LaneBasedIndividualCar.toString() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 227 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.car.LaneBasedTemplateCar defines non-transient non-serializable instance field animation | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.car.LaneBasedTemplateCar.toString() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 169 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Field only ever set to null: org.opentrafficsim.road.car.LaneBasedTemplateCar$LaneBasedTemplateCarBuilder.gtuFollowingModel | CORRECTNESS | UWF_NULL_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Return value of org.djunits.value.vdouble.scalar.DoubleScalar$Abs.getSI() ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 189 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in new org.opentrafficsim.road.gtu.generator.ListGTUGenerator(String, OTSDEVSSimulatorInterface, GTUType, GTUFollowingModel, LaneChangeModel, Speed$Abs, Lane, Length$Rel, LaneBasedRouteGenerator, GTUColorer, String): new java.io.FileReader(File) | I18N | DM_DEFAULT_ENCODING | 114 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.scheduleTriggers() invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead | PERFORMANCE | DM_BOOLEAN_CTOR | 786 | Medium |
Argument of type String can't be handled by format specifier %5d in org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.toString(Lane, Time$Abs) | CORRECTNESS | VA_FORMAT_STRING_BAD_CONVERSION | 1568 | High |
new org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU(String, GTUType, GTUFollowingModel, LaneChangeModel, Map, Speed$Abs, LaneBasedRouteNavigator, OTSDEVSSimulatorInterface) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 168 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.checkConsistency() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 723 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.laneDrop(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 615 | Medium |
org.opentrafficsim.road.gtu.lane.AbstractLaneBasedGTU.suitability(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 687 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.gtu.lane.LaneBlock defines non-transient non-serializable instance field animation | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.gtu.lane.changing.AbstractLaneChangeModel.computeLaneChangeAndAcceleration(LaneBasedGTU, Collection, Collection, Collection, Speed$Abs, Acceleration$Rel, Acceleration$Rel, Acceleration$Rel) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 43 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.road.network.factory.TestOpenDriveParser$TestOpenDriveModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 139 | Medium |
Should org.opentrafficsim.road.network.factory.TestOpenDriveParser$TestOpenDriveModel be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 124-157 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.road.network.factory.TestXMLParser$TestXMLModel.constructModel(SimulatorInterface) | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 141 | Medium |
Should org.opentrafficsim.road.network.factory.TestXMLParser$TestXMLModel be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 124-160 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.opendrive.JunctionTag.name | PERFORMANCE | URF_UNREAD_FIELD | 20 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.leftNeighborDirection | PERFORMANCE | URF_UNREAD_FIELD | 52 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.leftNeighborRoadId | PERFORMANCE | URF_UNREAD_FIELD | 48 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.predecessorContactPoint | PERFORMANCE | URF_UNREAD_FIELD | 32 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.predecessorJunctionId | PERFORMANCE | URF_UNREAD_FIELD | 28 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.predecessorRoadId | PERFORMANCE | URF_UNREAD_FIELD | 24 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.rightNeighborDirection | PERFORMANCE | URF_UNREAD_FIELD | 60 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.rightNeighborRoadId | PERFORMANCE | URF_UNREAD_FIELD | 56 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.successorContactPoint | PERFORMANCE | URF_UNREAD_FIELD | 44 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.successorJunctionId | PERFORMANCE | URF_UNREAD_FIELD | 40 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.LinkTag.successorRoadId | PERFORMANCE | URF_UNREAD_FIELD | 36 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.factory.opendrive.OpenDriveNetworkLaneParser.noTrafficLaneType isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 59 | High |
Unread public/protected field: org.opentrafficsim.road.network.factory.opendrive.OpenDriveNetworkLaneParser.gtuTypes | STYLE | URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD | 50 | Medium |
Unread public/protected field: org.opentrafficsim.road.network.factory.opendrive.OpenDriveNetworkLaneParser.simulator | STYLE | URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD | 70 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.opendrive.RoadTag.length | PERFORMANCE | URF_UNREAD_FIELD | 32 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.RoadTag.linkTag | PERFORMANCE | URF_UNREAD_FIELD | 40 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.RoadTag.name | PERFORMANCE | URF_UNREAD_FIELD | 28 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.opendrive.TypeTag.maxSpeed | PERFORMANCE | URF_UNREAD_FIELD | 33 | Medium |
Unread field: org.opentrafficsim.road.network.factory.opendrive.TypeTag.type | PERFORMANCE | URF_UNREAD_FIELD | 29 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Write to static field org.opentrafficsim.road.network.factory.osm.events.ProgressEvent.first from instance method new org.opentrafficsim.road.network.factory.osm.events.ProgressEvent(Object, String) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 40 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Write to static field org.opentrafficsim.road.network.factory.osm.output.Convert.baseX from instance method new org.opentrafficsim.road.network.factory.osm.output.Convert() | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 64 | High |
org.opentrafficsim.road.network.factory.osm.output.Convert.makeLanes(OSMLink, OTSDEVSSimulatorInterface, WarningListener) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 606 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to rg in org.opentrafficsim.road.network.factory.xml.FillTag.makeFill(FillTag, XmlNetworkLaneParser, LinkTag, OTSDEVSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 216 | High |
Dead store to lane in org.opentrafficsim.road.network.factory.xml.FillTag.makeFill(FillTag, XmlNetworkLaneParser, LinkTag, OTSDEVSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 209 | Medium |
Dead store of org.opentrafficsim.road.car.LaneBasedIndividualCar.class in org.opentrafficsim.road.network.factory.xml.FillTag.makeFill(FillTag, XmlNetworkLaneParser, LinkTag, OTSDEVSSimulatorInterface) | CORRECTNESS | DLS_DEAD_STORE_OF_CLASS_LITERAL | 210 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.FillTag.distanceDist | PERFORMANCE | URF_UNREAD_FIELD | 49 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.FillTag.initialSpeedDist | PERFORMANCE | URF_UNREAD_FIELD | 53 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.FillTag.maxGTUs | PERFORMANCE | URF_UNREAD_FIELD | 57 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.FillTag.routeMixTag | PERFORMANCE | URF_UNREAD_FIELD | 65 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.FillTag.shortestRouteMixTag | PERFORMANCE | URF_UNREAD_FIELD | 73 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.FillTag.shortestRouteTag | PERFORMANCE | URF_UNREAD_FIELD | 69 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.xml.GeneratorTag.routeMixTag | PERFORMANCE | URF_UNREAD_FIELD | 80 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.GeneratorTag.shortestRouteMixTag | PERFORMANCE | URF_UNREAD_FIELD | 88 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.GeneratorTag.shortestRouteTag | PERFORMANCE | URF_UNREAD_FIELD | 84 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.xml.LinkTag.offsetEnd | PERFORMANCE | URF_UNREAD_FIELD | 54 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.LinkTag.offsetStart | PERFORMANCE | URF_UNREAD_FIELD | 50 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.LinkTag.rotationEnd | PERFORMANCE | URF_UNREAD_FIELD | 62 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.LinkTag.rotationStart | PERFORMANCE | URF_UNREAD_FIELD | 58 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.factory.xml.Links.calculateNodeCoordinates(XmlNetworkLaneParser) concatenates strings using + in a loop | PERFORMANCE | SBSC_USE_STRINGBUFFER_CONCATENATION | 134 | Medium |
Useless object stored in variable cseList of method org.opentrafficsim.road.network.factory.xml.Links.applyRoadTypeToLink(LinkTag, XmlNetworkLaneParser, OTSDEVSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 392 | Medium |
Useless object stored in variable lanes of method org.opentrafficsim.road.network.factory.xml.Links.applyRoadTypeToLink(LinkTag, XmlNetworkLaneParser, OTSDEVSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 393 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.xml.ListGeneratorTag.initialSpeedDist | PERFORMANCE | URF_UNREAD_FIELD | 44 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.ListGeneratorTag.positionStr | PERFORMANCE | URF_UNREAD_FIELD | 32 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.ListGeneratorTag.uri | PERFORMANCE | URF_UNREAD_FIELD | 28 | Medium |
Unused field: org.opentrafficsim.road.network.factory.xml.ListGeneratorTag.gtuColorer | PERFORMANCE | UUF_UNUSED_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Unread field: org.opentrafficsim.road.network.factory.xml.ShortestRouteTag.costPerDistance | PERFORMANCE | URF_UNREAD_FIELD | 50 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.ShortestRouteTag.costPerTime | PERFORMANCE | URF_UNREAD_FIELD | 46 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.ShortestRouteTag.from | PERFORMANCE | URF_UNREAD_FIELD | 34 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.ShortestRouteTag.to | PERFORMANCE | URF_UNREAD_FIELD | 42 | Medium |
Unread field: org.opentrafficsim.road.network.factory.xml.ShortestRouteTag.via | PERFORMANCE | URF_UNREAD_FIELD | 38 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.factory.xml.XmlNetworkLaneParser.noTrafficLaneType isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 91 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.CrossSectionLink doesn't override org.opentrafficsim.core.network.OTSLink.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.opentrafficsim.road.network.lane.Lane defines non-transient non-serializable instance field overtakingConditions | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.road.network.lane.Lane.getSensorMap(GTUType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 441 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.road.network.lane.Lane$GTUTypeSensor is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 982-1000 | Medium |
Should org.opentrafficsim.road.network.lane.Lane$GTUTypeSensor be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 982-1000 | Medium |