The following document contains the results of SpotBugs
SpotBugs Version is 3.1.12
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
222 | 147 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in loadfromxml.LoadXML.main(String[]): new String(byte[]) | I18N | DM_DEFAULT_ENCODING | 135 | High |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.CircularLaneModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 210 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.CircularRoadModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 263 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable lanes of method org.opentrafficsim.demo.CircularRoadSwing.addStatisticsTabs(OTSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 342 | Medium |
Useless object stored in variable positions of method org.opentrafficsim.demo.CircularRoadSwing.addStatisticsTabs(OTSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 343 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.CrossingTrafficLightsModel.constructModel() | STYLE | UC_USELESS_OBJECT | 194 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Integer remainder modulo 1 computed in org.opentrafficsim.demo.NetworksSwing.addStatisticsTabs(OTSSimulatorInterface) | STYLE | INT_BAD_REM_BY_1 | 152 | High |
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 |
Useless object stored in variable detectors34 of method org.opentrafficsim.demo.RampMeteringDemo.setupSimulation(OTSSimulatorInterface) | STYLE | UC_USELESS_OBJECT | 312 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Useless object stored in variable links of method org.opentrafficsim.demo.SequentialLanes$SequentialModel.constructModel() | STYLE | UC_USELESS_OBJECT | 301 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.ShortMerge$ShortMergeModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 242 | 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 | 276 | High |
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 |
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 |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflict.BusStreetDemo$BusStreetModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 223 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.demo.conflict.BusStreetDemo$CharacteristicsGenerator(DEVSSimulatorInterface$TimeDoubleUnit, double[], OTSRoadNetwork) may expose internal representation by storing an externally mutable object into BusStreetDemo$CharacteristicsGenerator.probabilities | MALICIOUS_CODE | EI_EXPOSE_REP2 | 365 | Medium |
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 | 121 | Medium |
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 | 119 | Medium |
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 | 121 | Medium |
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 | 251 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 157 | Medium |
Exception is caught when Exception is not thrown in org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | REC_CATCH_EXCEPTION | 282 | Medium |
Useless object stored in variable sensors of method org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | UC_USELESS_OBJECT | 179 | Medium |
Useless object stored in variable trafficLights of method org.opentrafficsim.demo.conflictAndControl.DemoTrafcodAndTurbo$TrafCODModel.constructModel() | STYLE | UC_USELESS_OBJECT | 178 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to capacity in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 242 | Medium |
Dead store to length in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 230 | Medium |
Dead store to speed in org.opentrafficsim.demo.geometry.shape.ShapeFileReader.readLinks(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 240 | 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(OTSRoadNetwork, String, Map, Map, OTSSimulatorInterface) | STYLE | REC_CATCH_EXCEPTION | 281 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.geometry.shape.ShapeModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 57 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.geometry.shape.ShapeModel.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 55 | Medium |
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 | 133 | Medium |
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 | 133 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to colorer in org.opentrafficsim.demo.network.xml.N201ODfactory.makeGeneratorsFromOD(OTSRoadNetwork, ODMatrix, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 149 | High |
Dead store to northBound in org.opentrafficsim.demo.network.xml.N201ODfactory.getQuery(OTSRoadNetwork, Sampler, FilterDataSet) | STYLE | DLS_DEAD_LOCAL_STORE | 229 | Medium |
Dead store to route in org.opentrafficsim.demo.network.xml.N201ODfactory.makeGeneratorsFromOD(OTSRoadNetwork, ODMatrix, OTSSimulatorInterface) | STYLE | DLS_DEAD_LOCAL_STORE | 161 | Medium |
Useless object stored in variable northBound of method org.opentrafficsim.demo.network.xml.N201ODfactory.getQuery(OTSRoadNetwork, Sampler, FilterDataSet) | STYLE | UC_USELESS_OBJECT | 229 | Medium |
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 | 133 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserA58$TestXMLModelA58.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 145 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserA58$TestXMLModelA58.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 162 | Medium |
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 | 131 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserAmsterdam$TestXMLModelAmsterdam.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 164 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserAmsterdam$TestXMLModelAmsterdam.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 184 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserEindhoven$TestXMLModelEindhoven.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 163 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserEindhoven$TestXMLModelEindhoven.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 146 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 165 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 203 | Medium |
Class org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs defines non-transient non-serializable instance field meanSpeed | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs defines non-transient non-serializable instance field meanTravelTimePerDistance | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs defines non-transient non-serializable instance field meanTripLength | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs defines non-transient non-serializable instance field totalDelay | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs defines non-transient non-serializable instance field totalNumberOfStops | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs defines non-transient non-serializable instance field totalTravelDistance | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Class org.opentrafficsim.demo.network.xml.TestXMLParserKPIs$TestXMLModelKPIs defines non-transient non-serializable instance field totalTravelTime | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserN201$TestXMLModelN201.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 145 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserN201$TestXMLModelN201.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 162 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserReadXstream$TestXMLModelReadXStream.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 148 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserReadXstream$TestXMLModelReadXStream.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 133 | Medium |
Found reliance on default encoding in org.opentrafficsim.demo.network.xml.TestXMLParserReadXstream$TestXMLModelReadXStream.constructModel(): new String(byte[]) | I18N | DM_DEFAULT_ENCODING | 133 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserWriteXstream$TestXMLModelWriteXStream.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 137 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserWriteXstream$TestXMLModelWriteXStream.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 158 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.network.xml.TestXMLParserWriteXstream$TestXMLModelWriteXStream.constructModel() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 149 | Medium |
Found reliance on default encoding in org.opentrafficsim.demo.network.xml.TestXMLParserWriteXstream$TestXMLModelWriteXStream.constructModel(): String.getBytes() | I18N | DM_DEFAULT_ENCODING | 149 | High |
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 | 579 | High |
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 |
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 |
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 |
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 |
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 |
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 | 174 | Medium |
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 |
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 | 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 |
HTTP parameter written to Servlet output in org.opentrafficsim.demo.web.OTSDemoServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) | SECURITY | XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER | 464 | Medium |
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 |
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 | 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 |
HTTP parameter written to Servlet output in org.opentrafficsim.demo.web.OTSFederatedDemoServer$XHRHandler.handle(String, Request, HttpServletRequest, HttpServletResponse) | SECURITY | XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER | 345 | Medium |
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 |
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 | 308 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.SuperDemoWebApplication.init() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 143 | Medium |
Hard coded reference to an absolute pathname in org.opentrafficsim.demo.web.SuperDemoWebApplication.init() | STYLE | DMI_HARDCODED_ABSOLUTE_FILENAME | 149 | Medium |
org.opentrafficsim.demo.web.SuperDemoWebApplication.processKillFederate() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 526 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.remotecontrol.Sim0MQControlledOTS.loadNetwork(String, Duration, Duration, Long) | STYLE | REC_CATCH_EXCEPTION | 334 | Medium |
org.opentrafficsim.remotecontrol.Sim0MQControlledOTS.sendToMaster(byte[]) calls Thread.sleep() with a lock held | MT_CORRECTNESS | SWL_SLEEP_WITH_LOCK_HELD | 552 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQOTSModel be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 696-745 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.remotecontrol.Sim0MQControlledOTS$Sim0MQRemoteControlSwingApplication be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 668-670 | Medium |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$LmrsStrategiesAnimation be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 501-514 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
strategies.LmrsStrategies$LmrsStrategiesModel.constructModel() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 830 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$LmrsStrategiesSimulation be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 473-475 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$SigmaMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1038-1095 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VDes0Measurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1257-1316 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VDesMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1184-1241 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.LmrsStrategies$VGainMeasurement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1111-1168 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.StrategiesDemo$LmrsStrategiesPerceptionFactory be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 700-719 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should strategies.StrategiesDemo$SocioIDMFactory be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 680-695 | Medium |