SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
205 149 0 0

Files

Class Bugs
loadfromxml.LoadXML 1
loadfromxml.LoadXML$XMLModel 1
org.opentrafficsim.ahfe.AHFEAnimation$1 2
org.opentrafficsim.ahfe.AHFEAnimation$AHFEModel 1
org.opentrafficsim.ahfe.AHFESimulation$1 2
org.opentrafficsim.ahfe.AHFESimulation$AHFEModel 1
org.opentrafficsim.ahfe.AHFEUtil 1
org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory 2
org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory$DelayedInfoType 1
org.opentrafficsim.ahfe.AnticipationRelianceScript 2
org.opentrafficsim.ahfe.AnticipationRelianceScript$CarFollowingTaskAR 1
org.opentrafficsim.ahfe.AnticipationRelianceScript$IdmPlusFactoryAR 1
org.opentrafficsim.ahfe.AnticipationRelianceScript$LaneChangeTaskAR 1
org.opentrafficsim.ahfe.AnticipationRelianceScript$SituationalAwarenessDataType 1
org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskAnticipationRelianceDataType 1
org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskDemandDataType 1
org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskManagerAR 1
org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskSaturationDataType 1
org.opentrafficsim.ahfe.DelayedNeighborsPerception$ErrorValue 1
org.opentrafficsim.demo.CircularLaneModel 6
org.opentrafficsim.demo.CircularRoadModel 5
org.opentrafficsim.demo.CircularRoadSwing 2
org.opentrafficsim.demo.CrossingTrafficLightsModel 2
org.opentrafficsim.demo.InputParameterHelper 1
org.opentrafficsim.demo.NetworksModel 3
org.opentrafficsim.demo.NetworksSwing 1
org.opentrafficsim.demo.RampMeteringDemo 4
org.opentrafficsim.demo.RampMeteringDemo$ControlledTacticalPlanner 1
org.opentrafficsim.demo.SequentialLanes$SequentialModel 1
org.opentrafficsim.demo.ShortMerge$ShortMergeModel 4
org.opentrafficsim.demo.StraightModel 2
org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel 3
org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator 2
org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel 2
org.opentrafficsim.demo.conflict.TestNetworkDemo$TestNetworkModel 1
org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel 2
org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel 5
org.opentrafficsim.demo.fd.FundamentalDiagramDemo$SwingFundamentalDiagramNoControl 1
org.opentrafficsim.demo.fd.FundamentalDiagramModel 1
org.opentrafficsim.demo.geometry.TestModel 1
org.opentrafficsim.demo.lanechange.LaneChangeGraph 2
org.opentrafficsim.demo.network.xml.Circuit$TestXMLModel 1
org.opentrafficsim.demo.network.xml.FourStop$TestXMLModel 1
org.opentrafficsim.demo.network.xml.Grid10X10 6
org.opentrafficsim.demo.network.xml.NetworkTest$TestXMLModel 1
org.opentrafficsim.demo.network.xml.TestXMLParserAimsun$TestAimsunModel 1
org.opentrafficsim.demo.sdm.SdmSimulation 3
org.opentrafficsim.demo.sdm.SdmStrategicalPlannerFactory$SdmPerception 1
org.opentrafficsim.demo.steering.SteeringSimulation 1
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo1 1
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo1$TrafCODModel 2
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2 1
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel 1
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2_Generators 1
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2_Generators$TrafCODModel 1
org.opentrafficsim.demo.web.OTSDemoServer$MyResourceHandler 2
org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler 5
org.opentrafficsim.demo.web.OTSFederatedDemoServer$MyResourceHandler 2
org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler 5
org.opentrafficsim.demo.web.SimpleLoadBalancer 3
org.opentrafficsim.demo.web.SuperDemoWebApplication 4
org.opentrafficsim.remotecontrol.Sim0MQControlledOTS 3
org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQOTSModel 1
org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQRemoteControlSwingApplication 1
org.opentrafficsim.remotecontrol.Sim0MQRemoteController 3
org.opentrafficsim.remotecontrol.Sim0MQRemoteController$1 2
org.opentrafficsim.remotecontrol.Sim0MQRemoteController$PollerThread 1
org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew 3
org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$1 2
org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$PollerThread 1
strategies.LmrsStrategies 2
strategies.LmrsStrategies$LmrsStrategiesAnimation 1
strategies.LmrsStrategies$LmrsStrategiesModel 2
strategies.LmrsStrategies$LmrsStrategiesModel$2 1
strategies.LmrsStrategies$LmrsStrategiesSimulation 1
strategies.LmrsStrategies$SigmaMeasurement 1
strategies.LmrsStrategies$VDes0Measurement 1
strategies.LmrsStrategies$VDesMeasurement 1
strategies.LmrsStrategies$VGainMeasurement 1
strategies.StrategiesDemo 1
strategies.StrategiesDemo$LmrsStrategiesPerceptionFactory 1
strategies.StrategiesDemo$SocioIDMFactory 1

loadfromxml.LoadXML

Bug Category Details Line Priority
Found reliance on default encoding in loadfromxml.LoadXML.main(String[]): new String(byte[]) I18N DM_DEFAULT_ENCODING 135 High

loadfromxml.LoadXML$XMLModel

Bug Category Details Line Priority
Do not catch NullPointerException like in loadfromxml.LoadXML$XMLModel.constructModel() STYLE DCN_NULLPOINTER_EXCEPTION 199 Medium

org.opentrafficsim.ahfe.AHFEAnimation$1

Bug Category Details Line Priority
Found reliance on default encoding in org.opentrafficsim.ahfe.AHFEAnimation$1.run(): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 339 High
org.opentrafficsim.ahfe.AHFEAnimation$1.run() invokes System.exit(...), which shuts down the entire virtual machine BAD_PRACTICE DM_EXIT 386 Medium

org.opentrafficsim.ahfe.AHFEAnimation$AHFEModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.ahfe.AHFEAnimation$AHFEModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 497 Medium

org.opentrafficsim.ahfe.AHFESimulation$1

Bug Category Details Line Priority
Found reliance on default encoding in org.opentrafficsim.ahfe.AHFESimulation$1.run(): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 326 High
org.opentrafficsim.ahfe.AHFESimulation$1.run() invokes System.exit(...), which shuts down the entire virtual machine BAD_PRACTICE DM_EXIT 373 Medium

org.opentrafficsim.ahfe.AHFESimulation$AHFEModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.ahfe.AHFESimulation$AHFEModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 477 Medium

org.opentrafficsim.ahfe.AHFEUtil

Bug Category Details Line Priority
Bad attempt to compute absolute value of signed random integer in org.opentrafficsim.ahfe.AHFEUtil.createDemand(OTSRoadNetwork, GTUColorer, OTSSimulatorInterface, int, String, Duration, Duration, double, Time, Frequency, Frequency, double, double, double, double) CORRECTNESS RV_ABSOLUTE_VALUE_OF_RANDOM_INT 153 High

org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory

Bug Category Details Line Priority
Load of known null value in org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory.changeLane(LateralDirectionality) STYLE NP_LOAD_OF_KNOWN_NULL_VALUE 184 Medium
org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory.changeLane(LateralDirectionality) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 176 Medium

org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory$DelayedInfoType

Bug Category Details Line Priority
There is an apparent infinite recursive loop in org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory$DelayedInfoType.getId() CORRECTNESS IL_INFINITE_RECURSIVE_LOOP 231 High

org.opentrafficsim.ahfe.AnticipationRelianceScript

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.ahfe.AnticipationRelianceScript.setupSimulation(OTSSimulatorInterface) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 347 Medium
Write to static field org.opentrafficsim.core.gtu.AbstractGTU.ALIGNED from instance method org.opentrafficsim.ahfe.AnticipationRelianceScript.setupSimulation(OTSSimulatorInterface) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 344 High

org.opentrafficsim.ahfe.AnticipationRelianceScript$CarFollowingTaskAR

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$CarFollowingTaskAR be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 591-609 Medium

org.opentrafficsim.ahfe.AnticipationRelianceScript$IdmPlusFactoryAR

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$IdmPlusFactoryAR be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 746-774 Medium

org.opentrafficsim.ahfe.AnticipationRelianceScript$LaneChangeTaskAR

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$LaneChangeTaskAR be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 619-629 Medium

org.opentrafficsim.ahfe.AnticipationRelianceScript$SituationalAwarenessDataType

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$SituationalAwarenessDataType be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 858-878 Medium

org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskAnticipationRelianceDataType

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskAnticipationRelianceDataType be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 805-826 Medium

org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskDemandDataType

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskDemandDataType be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 832-852 Medium

org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskManagerAR

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskManagerAR be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 708-742 Medium

org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskSaturationDataType

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.AnticipationRelianceScript$TaskSaturationDataType be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 779-799 Medium

org.opentrafficsim.ahfe.DelayedNeighborsPerception$ErrorValue

Bug Category Details Line Priority
Should org.opentrafficsim.ahfe.DelayedNeighborsPerception$ErrorValue be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 512-545 Medium

org.opentrafficsim.demo.CircularLaneModel

Bug Category Details Line Priority
Random object created and used only once in org.opentrafficsim.demo.CircularLaneModel.constructModel() BAD_PRACTICE DMI_RANDOM_USED_ONLY_ONCE 192 High
org.opentrafficsim.demo.CircularLaneModel.getMinimumDistance() may expose internal representation by returning CircularLaneModel.minimumDistance MALICIOUS_CODE EI_EXPOSE_REP 281 Medium
org.opentrafficsim.demo.CircularLaneModel.getNetwork() may expose internal representation by returning CircularLaneModel.network MALICIOUS_CODE EI_EXPOSE_REP 273 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 189 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 201 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.CircularLaneModel.constructModel() STYLE REC_CATCH_EXCEPTION 210 Medium

org.opentrafficsim.demo.CircularRoadModel

Bug Category Details Line Priority
Random object created and used only once in org.opentrafficsim.demo.CircularRoadModel.constructModel() BAD_PRACTICE DMI_RANDOM_USED_ONLY_ONCE 256 High
org.opentrafficsim.demo.CircularRoadModel.getMinimumDistance() may expose internal representation by returning CircularRoadModel.minimumDistance MALICIOUS_CODE EI_EXPOSE_REP 325 Medium
org.opentrafficsim.demo.CircularRoadModel.getNetwork() may expose internal representation by returning CircularRoadModel.network MALICIOUS_CODE EI_EXPOSE_REP 317 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 251 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.CircularRoadModel.constructModel() STYLE REC_CATCH_EXCEPTION 263 Medium

org.opentrafficsim.demo.CircularRoadSwing

Bug Category Details Line Priority
Useless object stored in variable lanes of method org.opentrafficsim.demo.CircularRoadSwing.addStatisticsTabs(OTSSimulatorInterface) STYLE UC_USELESS_OBJECT 335 Medium
Useless object stored in variable positions of method org.opentrafficsim.demo.CircularRoadSwing.addStatisticsTabs(OTSSimulatorInterface) STYLE UC_USELESS_OBJECT 336 Medium

org.opentrafficsim.demo.CrossingTrafficLightsModel

Bug Category Details Line Priority
org.opentrafficsim.demo.CrossingTrafficLightsModel.getNetwork() may expose internal representation by returning CrossingTrafficLightsModel.network MALICIOUS_CODE EI_EXPOSE_REP 388 Medium
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.CrossingTrafficLightsModel.constructModel() STYLE UC_USELESS_OBJECT 194 Medium

org.opentrafficsim.demo.InputParameterHelper

Bug Category Details Line Priority
new org.opentrafficsim.demo.InputParameterHelper(InputParameterMap) may expose internal representation by storing an externally mutable object into InputParameterHelper.rootMap MALICIOUS_CODE EI_EXPOSE_REP2 40 Medium

org.opentrafficsim.demo.NetworksModel

Bug Category Details Line Priority
org.opentrafficsim.demo.NetworksModel.getMaximumDistance() may expose internal representation by returning NetworksModel.maximumDistance MALICIOUS_CODE EI_EXPOSE_REP 544 Medium
org.opentrafficsim.demo.NetworksModel.getMinimumDistance() may expose internal representation by returning NetworksModel.minimumDistance MALICIOUS_CODE EI_EXPOSE_REP 536 Medium
org.opentrafficsim.demo.NetworksModel.getNetwork() may expose internal representation by returning NetworksModel.network MALICIOUS_CODE EI_EXPOSE_REP 510 Medium

org.opentrafficsim.demo.NetworksSwing

Bug Category Details Line Priority
Integer remainder modulo 1 computed in org.opentrafficsim.demo.NetworksSwing.addStatisticsTabs(OTSSimulatorInterface) STYLE INT_BAD_REM_BY_1 153 High

org.opentrafficsim.demo.RampMeteringDemo

Bug Category Details Line Priority
Dead store to lanesBC in org.opentrafficsim.demo.RampMeteringDemo.setupSimulation(OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 284 Medium
Dead store to lanesFB in org.opentrafficsim.demo.RampMeteringDemo.setupSimulation(OTSSimulatorInterface) STYLE DLS_DEAD_LOCAL_STORE 292 Medium
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.RampMeteringDemo.arrayFromString(String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 238 High
Useless object stored in variable detectors34 of method org.opentrafficsim.demo.RampMeteringDemo.setupSimulation(OTSSimulatorInterface) STYLE UC_USELESS_OBJECT 312 Medium

org.opentrafficsim.demo.RampMeteringDemo$ControlledTacticalPlanner

Bug Category Details Line Priority
Class org.opentrafficsim.demo.RampMeteringDemo$ControlledTacticalPlanner defines non-transient non-serializable instance field laneChangeSystem BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.demo.SequentialLanes$SequentialModel

Bug Category Details Line Priority
Useless object stored in variable links of method org.opentrafficsim.demo.SequentialLanes$SequentialModel.constructModel() STYLE UC_USELESS_OBJECT 302 Medium

org.opentrafficsim.demo.ShortMerge$ShortMergeModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.ShortMerge$ShortMergeModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 243 Medium
org.opentrafficsim.demo.ShortMerge$ShortMergeModel.getNetwork() may expose internal representation by returning ShortMerge$ShortMergeModel.network MALICIOUS_CODE EI_EXPOSE_REP 259 Medium
org.opentrafficsim.demo.ShortMerge$ShortMergeModel.setNetwork(OTSRoadNetwork) may expose internal representation by storing an externally mutable object into ShortMerge$ShortMergeModel.network MALICIOUS_CODE EI_EXPOSE_REP2 234 Medium
Bad attempt to compute absolute value of signed random integer in org.opentrafficsim.demo.ShortMerge$ShortMergeModel.addGenerator() CORRECTNESS RV_ABSOLUTE_VALUE_OF_RANDOM_INT 277 High

org.opentrafficsim.demo.StraightModel

Bug Category Details Line Priority
org.opentrafficsim.demo.StraightModel.getNetwork() may expose internal representation by returning StraightModel.network MALICIOUS_CODE EI_EXPOSE_REP 226 Medium
org.opentrafficsim.demo.StraightModel.getPath() may expose internal representation by returning StraightModel.path MALICIOUS_CODE EI_EXPOSE_REP 234 Medium

org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 178 Medium
org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.getNetwork() may expose internal representation by returning BusStreetDemo$BusStreetModel.network MALICIOUS_CODE EI_EXPOSE_REP 233 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel() STYLE REC_CATCH_EXCEPTION 223 Medium

org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator

Bug Category Details Line Priority
new org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator(OTSSimulatorInterface, double[], OTSRoadNetwork) may expose internal representation by storing an externally mutable object into BusStreetDemo$CharacteristicsGenerator.network MALICIOUS_CODE EI_EXPOSE_REP2 365 Medium
new org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator(OTSSimulatorInterface, double[], OTSRoadNetwork) may expose internal representation by storing an externally mutable object into BusStreetDemo$CharacteristicsGenerator.probabilities MALICIOUS_CODE EI_EXPOSE_REP2 364 Medium

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() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 122 Medium
org.opentrafficsim.demo.conflict.TJunctionDemo$TJunctionModel.getNetwork() may expose internal representation by returning TJunctionDemo$TJunctionModel.network MALICIOUS_CODE EI_EXPOSE_REP 196 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() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 120 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() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 122 Medium
org.opentrafficsim.demo.conflict.TurboRoundaboutDemo$TurboRoundaboutModel.getNetwork() may expose internal representation by returning TurboRoundaboutDemo$TurboRoundaboutModel.network MALICIOUS_CODE EI_EXPOSE_REP 211 Medium

org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 252 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 158 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() STYLE REC_CATCH_EXCEPTION 283 Medium
Useless object stored in variable sensors of method org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() STYLE UC_USELESS_OBJECT 180 Medium
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() STYLE UC_USELESS_OBJECT 179 Medium

org.opentrafficsim.demo.fd.FundamentalDiagramDemo$SwingFundamentalDiagramNoControl

Bug Category Details Line Priority
Should org.opentrafficsim.demo.fd.FundamentalDiagramDemo$SwingFundamentalDiagramNoControl be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 789-798 Medium

org.opentrafficsim.demo.fd.FundamentalDiagramModel

Bug Category Details Line Priority
org.opentrafficsim.demo.fd.FundamentalDiagramModel.getNetwork() may expose internal representation by returning FundamentalDiagramModel.network MALICIOUS_CODE EI_EXPOSE_REP 43 Medium

org.opentrafficsim.demo.geometry.TestModel

Bug Category Details Line Priority
org.opentrafficsim.demo.geometry.TestModel.getNetwork() may expose internal representation by returning TestModel.network MALICIOUS_CODE EI_EXPOSE_REP 209 Medium

org.opentrafficsim.demo.lanechange.LaneChangeGraph

Bug Category Details Line Priority
org.opentrafficsim.demo.lanechange.LaneChangeGraph.getNetwork() may expose internal representation by returning LaneChangeGraph.network MALICIOUS_CODE EI_EXPOSE_REP 453 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 180 Medium

org.opentrafficsim.demo.network.xml.Circuit$TestXMLModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.Circuit$TestXMLModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 134 Medium

org.opentrafficsim.demo.network.xml.FourStop$TestXMLModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.FourStop$TestXMLModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 134 Medium

org.opentrafficsim.demo.network.xml.Grid10X10

Bug Category Details Line Priority
Format string should use %n rather than \n in org.opentrafficsim.demo.network.xml.Grid10X10.main(String[]) BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 260 Medium
Format string should use %n rather than \n in org.opentrafficsim.demo.network.xml.Grid10X10.main(String[]) BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 264 Medium
Format string should use %n rather than \n in org.opentrafficsim.demo.network.xml.Grid10X10.main(String[]) BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 246 Medium
Format string should use %n rather than \n in org.opentrafficsim.demo.network.xml.Grid10X10.main(String[]) BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 237 Medium
Format string should use %n rather than \n in org.opentrafficsim.demo.network.xml.Grid10X10.main(String[]) BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 239 Medium
Format string should use %n rather than \n in org.opentrafficsim.demo.network.xml.Grid10X10.main(String[]) BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 244 Medium

org.opentrafficsim.demo.network.xml.NetworkTest$TestXMLModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.NetworkTest$TestXMLModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 134 Medium

org.opentrafficsim.demo.network.xml.TestXMLParserAimsun$TestAimsunModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserAimsun$TestAimsunModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 132 Medium

org.opentrafficsim.demo.sdm.SdmSimulation

Bug Category Details Line Priority
Found reliance on default encoding in org.opentrafficsim.demo.sdm.SdmSimulation.onSimulationEnd(): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 582 High
org.opentrafficsim.demo.sdm.SdmSimulation.getDt() may expose internal representation by returning SdmSimulation.dt MALICIOUS_CODE EI_EXPOSE_REP 614 Medium
org.opentrafficsim.demo.sdm.SdmSimulation.getTrMax() may expose internal representation by returning SdmSimulation.trMax MALICIOUS_CODE EI_EXPOSE_REP 662 Medium

org.opentrafficsim.demo.sdm.SdmStrategicalPlannerFactory$SdmPerception

Bug Category Details Line Priority
Should org.opentrafficsim.demo.sdm.SdmStrategicalPlannerFactory$SdmPerception be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 148-180 Medium

org.opentrafficsim.demo.steering.SteeringSimulation

Bug Category Details Line Priority
Useless object stored in variable originLanes of method org.opentrafficsim.demo.steering.SteeringSimulation.setupSimulation(OTSSimulatorInterface) STYLE UC_USELESS_OBJECT 172 Medium

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo1

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo1.demo(boolean) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 107 Medium

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo1$TrafCODModel

Bug Category Details Line Priority
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo1$TrafCODModel.getNetwork() may expose internal representation by returning TrafCODDemo1$TrafCODModel.network MALICIOUS_CODE EI_EXPOSE_REP 225 Medium
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo1$TrafCODModel.getTrafCOD() may expose internal representation by returning TrafCODDemo1$TrafCODModel.trafCOD MALICIOUS_CODE EI_EXPOSE_REP 233 Medium

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2.demo(boolean) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 107 Medium

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel

Bug Category Details Line Priority
org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2$TrafCODModel.getNetwork() may expose internal representation by returning TrafCODDemo2$TrafCODModel.network MALICIOUS_CODE EI_EXPOSE_REP 207 Medium

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2_Generators

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2_Generators.demo(boolean) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 101 Medium

org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2_Generators$TrafCODModel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.trafficcontrol.TrafCODDemo2_Generators$TrafCODModel.constructModel() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 175 Medium

org.opentrafficsim.demo.web.OTSDemoServer$MyResourceHandler

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.OTSDemoServer$MyResourceHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 325 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.OTSDemoServer$MyResourceHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 331 Medium

org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 697 High
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 702 High
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 717 High
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 712 High
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler.setParameters(OTSModelInterface, String) STYLE REC_CATCH_EXCEPTION 745 Medium

org.opentrafficsim.demo.web.OTSFederatedDemoServer$MyResourceHandler

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.OTSFederatedDemoServer$MyResourceHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 223 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.OTSFederatedDemoServer$MyResourceHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 229 Medium

org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler

Bug Category Details Line Priority
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 578 High
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 583 High
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 598 High
Boxing/unboxing to parse a primitive org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler.setParameters(OTSModelInterface, String) PERFORMANCE DM_BOXED_PRIMITIVE_FOR_PARSING 593 High
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler.setParameters(OTSModelInterface, String) STYLE REC_CATCH_EXCEPTION 626 Medium

org.opentrafficsim.demo.web.SimpleLoadBalancer

Bug Category Details Line Priority
Unread field: org.opentrafficsim.demo.web.SimpleLoadBalancer.messageCount PERFORMANCE URF_UNREAD_FIELD 51 Medium
Unused field: org.opentrafficsim.demo.web.SimpleLoadBalancer.lbContext PERFORMANCE UUF_UNUSED_FIELD Not available Medium
Unused field: org.opentrafficsim.demo.web.SimpleLoadBalancer.lbSocket PERFORMANCE UUF_UNUSED_FIELD Not available Medium

org.opentrafficsim.demo.web.SuperDemoWebApplication

Bug Category Details Line Priority
instanceof will always return true for all non-null values in org.opentrafficsim.demo.web.SuperDemoWebApplication.processSimRunControl(String, FM2SimRunControlMessage), since all org.sim0mq.message.types.NumberDuration are instances of Number STYLE BC_VACUOUS_INSTANCEOF 307 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.SuperDemoWebApplication.init() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 142 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.SuperDemoWebApplication.init() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 148 Medium
org.opentrafficsim.demo.web.SuperDemoWebApplication.processKillFederate() invokes System.exit(...), which shuts down the entire virtual machine BAD_PRACTICE DM_EXIT 524 Medium

org.opentrafficsim.remotecontrol.Sim0MQControlledOTS

Bug Category Details Line Priority
new org.opentrafficsim.remotecontrol.Sim0MQControlledOTS(ZContext, int) may expose internal representation by storing an externally mutable object into Sim0MQControlledOTS.zContext MALICIOUS_CODE EI_EXPOSE_REP2 122 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.remotecontrol.Sim0MQControlledOTS.loadNetwork(String, Duration, Duration, Long) STYLE REC_CATCH_EXCEPTION 333 Medium
org.opentrafficsim.remotecontrol.Sim0MQControlledOTS.sendToMaster(byte[]) calls Thread.sleep() with a lock held MT_CORRECTNESS SWL_SLEEP_WITH_LOCK_HELD 547 Medium

org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQOTSModel

Bug Category Details Line Priority
Should org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQOTSModel be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 691-740 Medium

org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQRemoteControlSwingApplication

Bug Category Details Line Priority
Should org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQRemoteControlSwingApplication be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 663-665 Medium

org.opentrafficsim.remotecontrol.Sim0MQRemoteController

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.remotecontrol.Sim0MQRemoteController.actionPerformed(ActionEvent) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 519 Medium
Found reliance on default encoding in new org.opentrafficsim.remotecontrol.Sim0MQRemoteController(): new java.io.PrintStream(OutputStream, boolean) I18N DM_DEFAULT_ENCODING 309 High
org.opentrafficsim.remotecontrol.Sim0MQRemoteController$PollerThread stored into non-transient field Sim0MQRemoteController.pollerThread BAD_PRACTICE SE_BAD_FIELD_STORE 251 Medium

org.opentrafficsim.remotecontrol.Sim0MQRemoteController$1

Bug Category Details Line Priority
org.opentrafficsim.remotecontrol.Sim0MQRemoteController$1.run() invokes System.exit(...), which shuts down the entire virtual machine BAD_PRACTICE DM_EXIT 139 Medium
Write to static field org.opentrafficsim.remotecontrol.Sim0MQRemoteController.gui from instance method org.opentrafficsim.remotecontrol.Sim0MQRemoteController$1.run() STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 133 Medium

org.opentrafficsim.remotecontrol.Sim0MQRemoteController$PollerThread

Bug Category Details Line Priority
Should org.opentrafficsim.remotecontrol.Sim0MQRemoteController$PollerThread be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 182-238 Medium

org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew.actionPerformed(ActionEvent) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 573 Medium
Found reliance on default encoding in new org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew(): new java.io.PrintStream(OutputStream, boolean) I18N DM_DEFAULT_ENCODING 308 High
org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$PollerThread stored into non-transient field Sim0MQRemoteControllerNew.pollerThread BAD_PRACTICE SE_BAD_FIELD_STORE 250 Medium

org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$1

Bug Category Details Line Priority
org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$1.run() invokes System.exit(...), which shuts down the entire virtual machine BAD_PRACTICE DM_EXIT 140 Medium
Write to static field org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew.gui from instance method org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$1.run() STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 134 Medium

org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$PollerThread

Bug Category Details Line Priority
Should org.opentrafficsim.remotecontrol.Sim0MQRemoteControllerNew$PollerThread be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 183-237 Medium

strategies.LmrsStrategies

Bug Category Details Line Priority
strategies.LmrsStrategies.notify(EventInterface) invokes System.exit(...), which shuts down the entire virtual machine BAD_PRACTICE DM_EXIT 1021 Medium
Return value of new LmrsStrategies$LmrsStrategiesSimulation(LmrsStrategies, OTSModelInterface) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 412 Medium

strategies.LmrsStrategies$LmrsStrategiesAnimation

Bug Category Details Line Priority
Should strategies.LmrsStrategies$LmrsStrategiesAnimation be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 501-514 Medium

strategies.LmrsStrategies$LmrsStrategiesModel

Bug Category Details Line Priority
Useless object stored in variable streams of method strategies.LmrsStrategies$LmrsStrategiesModel.constructModel() STYLE UC_USELESS_OBJECT 561 Medium
strategies.LmrsStrategies$LmrsStrategiesModel.constructModel() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 830 Medium

strategies.LmrsStrategies$LmrsStrategiesModel$2

Bug Category Details Line Priority
Do not catch NullPointerException like in strategies.LmrsStrategies$LmrsStrategiesModel$2.getValue(GtuData) STYLE DCN_NULLPOINTER_EXCEPTION 867 Medium

strategies.LmrsStrategies$LmrsStrategiesSimulation

Bug Category Details Line Priority
Should strategies.LmrsStrategies$LmrsStrategiesSimulation be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 473-475 Medium

strategies.LmrsStrategies$SigmaMeasurement

Bug Category Details Line Priority
Should strategies.LmrsStrategies$SigmaMeasurement be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1038-1095 Medium

strategies.LmrsStrategies$VDes0Measurement

Bug Category Details Line Priority
Should strategies.LmrsStrategies$VDes0Measurement be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1257-1316 Medium

strategies.LmrsStrategies$VDesMeasurement

Bug Category Details Line Priority
Should strategies.LmrsStrategies$VDesMeasurement be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1184-1241 Medium

strategies.LmrsStrategies$VGainMeasurement

Bug Category Details Line Priority
Should strategies.LmrsStrategies$VGainMeasurement be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1111-1168 Medium

strategies.StrategiesDemo

Bug Category Details Line Priority
Integral division result cast to double or float in strategies.StrategiesDemo.setupSimulation(OTSSimulatorInterface) STYLE ICAST_IDIV_CAST_TO_DOUBLE 586 Medium

strategies.StrategiesDemo$LmrsStrategiesPerceptionFactory

Bug Category Details Line Priority
Should strategies.StrategiesDemo$LmrsStrategiesPerceptionFactory be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 700-719 Medium

strategies.StrategiesDemo$SocioIDMFactory

Bug Category Details Line Priority
Should strategies.StrategiesDemo$SocioIDMFactory be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 680-695 Medium