FindBugs Bug Detector Report

The following document contains the results of FindBugs

FindBugs Version is 3.0.1

Threshold is medium

Effort is min

Summary

Classes Bugs Errors Missing Classes
177 32 0 0

org.opentrafficsim.core.dsol.OTSSimTimeDouble

Bug Category Details Line Priority
org.opentrafficsim.core.dsol.OTSSimTimeDouble defines compareTo(OTSSimTimeDouble) and uses Object.equals() BAD_PRACTICE EQ_COMPARETO_USE_OBJECT_EQUALS 57 Medium

org.opentrafficsim.core.geometry.OTSBufferingAV

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTSBufferingAV.p(List) concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 967 Medium

org.opentrafficsim.core.geometry.OTSLine3D

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTSLine3D.getPoints() may expose internal representation by returning OTSLine3D.points MALICIOUS_CODE EI_EXPOSE_REP 782 Medium
Test for floating point equality in org.opentrafficsim.core.geometry.OTSLine3D.extract(double, double) STYLE FE_FLOATING_POINT_EQUALITY 498 High
Inconsistent synchronization of org.opentrafficsim.core.geometry.OTSLine3D.length; locked 71% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 448 Medium

org.opentrafficsim.core.geometry.OTSShape

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTSShape doesn't override OTSLine3D.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.core.geometry.Test

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.Test.checkAll(OTSLine3D, double) concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 46 Medium

org.opentrafficsim.core.geometry.Test$MyCallable

Bug Category Details Line Priority
Should org.opentrafficsim.core.geometry.Test$MyCallable be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 846-879 Medium

org.opentrafficsim.core.gtu.AbstractGTU

Bug Category Details Line Priority
Nullcheck of initialLocation at line 142 of value previously dereferenced in new org.opentrafficsim.core.gtu.AbstractGTU(String, GTUType, OTSDEVSSimulatorInterface, StrategicalPlanner, Perception, DirectedPoint, Speed, PerceivableContext) CORRECTNESS RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE 118 High

org.opentrafficsim.core.gtu.TemplateGTUType

Bug Category Details Line Priority
Class org.opentrafficsim.core.gtu.TemplateGTUType defines non-transient non-serializable instance field idGenerator BAD_PRACTICE SE_BAD_FIELD Not available High

org.opentrafficsim.core.gtu.plan.operational.OperationalPlan

Bug Category Details Line Priority
Dead store to p in org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getLocation(Time$Abs) STYLE DLS_DEAD_LOCAL_STORE 399 Medium

org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress

Bug Category Details Line Priority
Should org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 292-329 Medium

org.opentrafficsim.core.network.CapacityOTSLink

Bug Category Details Line Priority
org.opentrafficsim.core.network.CapacityOTSLink doesn't override OTSLink.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.core.network.factory.xml.units.AngleUnits

Bug Category Details Line Priority
org.opentrafficsim.core.network.factory.xml.units.AngleUnits.ANGLE_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 25 Medium

org.opentrafficsim.core.network.factory.xml.units.LengthUnits

Bug Category Details Line Priority
org.opentrafficsim.core.network.factory.xml.units.LengthUnits.LENGTH_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 26 Medium
org.opentrafficsim.core.network.factory.xml.units.LengthUnits.PER_LENGTH_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 29 Medium

org.opentrafficsim.core.network.factory.xml.units.SpeedUnits

Bug Category Details Line Priority
org.opentrafficsim.core.network.factory.xml.units.SpeedUnits.SPEED_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 24 Medium

org.opentrafficsim.core.network.factory.xml.units.TimeUnits

Bug Category Details Line Priority
org.opentrafficsim.core.network.factory.xml.units.TimeUnits.PER_TIME_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 29 Medium
org.opentrafficsim.core.network.factory.xml.units.TimeUnits.TIME_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 26 Medium

org.opentrafficsim.gui.OTSAnimationPanel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 113 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 115 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 114 Medium
new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer) invokes org.opentrafficsim.gui.OTSAnimationPanel$UpdateTimer.start() MT_CORRECTNESS SC_START_IN_CTOR 129 Medium

org.opentrafficsim.gui.OTSAnimationPanel$DisposeOnCloseThread

Bug Category Details Line Priority
Should org.opentrafficsim.gui.OTSAnimationPanel$DisposeOnCloseThread be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 249-280 Medium

org.opentrafficsim.gui.OTSControlPanel

Bug Category Details Line Priority
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSControlPanel(OTSDEVSSimulatorInterface, WrappableAnimation) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 129 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSControlPanel(OTSDEVSSimulatorInterface, WrappableAnimation) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 130 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSControlPanel(OTSDEVSSimulatorInterface, WrappableAnimation) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 132 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSControlPanel(OTSDEVSSimulatorInterface, WrappableAnimation) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 135 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.gui.OTSControlPanel.fixButtons() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 401 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.gui.OTSControlPanel.fixButtons() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 406 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.gui.OTSControlPanel.actionPerformed(ActionEvent) STYLE REC_CATCH_EXCEPTION 336 Medium

org.opentrafficsim.gui.OTSControlPanel$DisposeOnCloseThread

Bug Category Details Line Priority
Should org.opentrafficsim.gui.OTSControlPanel$DisposeOnCloseThread be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 219-251 Medium