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
221 62 0 0

Files

Class Bugs
org.opentrafficsim.core.animation.TextAnimation$AnimationImpl 1
org.opentrafficsim.core.distributions.Distribution 1
org.opentrafficsim.core.dsol.OTSDEVSRTParallelMove 1
org.opentrafficsim.core.dsol.OTSSimTimeDouble 1
org.opentrafficsim.core.geometry.OTS2DSet 1
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeIterator 1
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeNode 1
org.opentrafficsim.core.geometry.OTSLine3D 3
org.opentrafficsim.core.geometry.OTSShape 1
org.opentrafficsim.core.geometry.Test 1
org.opentrafficsim.core.geometry.Test$MyCallable 2
org.opentrafficsim.core.gtu.AbstractGTU 3
org.opentrafficsim.core.gtu.GTUType 1
org.opentrafficsim.core.gtu.animation.IDGTUColorer 1
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntry 2
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntryDouble 2
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeBoolean 1
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeDouble 1
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeInteger 1
org.opentrafficsim.core.gtu.perception.AbstractPerception 1
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan 1
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress 2
org.opentrafficsim.core.network.CapacityOTSLink 1
org.opentrafficsim.core.network.OTSNetwork 4
org.opentrafficsim.core.network.OTSNode 1
org.opentrafficsim.core.network.animation.LinkAnimation 1
org.opentrafficsim.core.network.animation.NodeAnimation 1
org.opentrafficsim.core.network.factory.xml.units.AccelerationUnits 1
org.opentrafficsim.core.network.factory.xml.units.AngleUnits 2
org.opentrafficsim.core.network.factory.xml.units.DurationUnits 2
org.opentrafficsim.core.network.factory.xml.units.LengthUnits 2
org.opentrafficsim.core.network.factory.xml.units.PositionUnits 1
org.opentrafficsim.core.network.factory.xml.units.SpeedUnits 1
org.opentrafficsim.core.network.factory.xml.units.TimeUnits 1
org.opentrafficsim.core.object.animation.StaticObjectAnimation 1
org.opentrafficsim.gui.OTSAnimationPanel 4
org.opentrafficsim.gui.OTSAnimationPanel$DisposeOnCloseThread 1
org.opentrafficsim.gui.OTSControlPanel 7
org.opentrafficsim.gui.OTSControlPanel$DisposeOnCloseThread 1

org.opentrafficsim.core.animation.TextAnimation$AnimationImpl

Bug Category Details Line Priority
org.opentrafficsim.core.animation.TextAnimation$AnimationImpl is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 364-379 High

org.opentrafficsim.core.distributions.Distribution

Bug Category Details Line Priority
Null passed for non-null parameter of java.util.List.addAll(Collection) in new org.opentrafficsim.core.distributions.Distribution(List, StreamInterface) CORRECTNESS NP_NULL_PARAM_DEREF 47 High

org.opentrafficsim.core.dsol.OTSDEVSRTParallelMove

Bug Category Details Line Priority
Class org.opentrafficsim.core.dsol.OTSDEVSRTParallelMove defines non-transient non-serializable instance field executor BAD_PRACTICE SE_BAD_FIELD Not available Medium

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 56 Medium

org.opentrafficsim.core.geometry.OTS2DSet

Bug Category Details Line Priority
Possible null pointer dereference of boundingBox in new org.opentrafficsim.core.geometry.OTS2DSet(Rectangle2D, double) CORRECTNESS NP_NULL_ON_SOME_PATH 59 High

org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeIterator

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeIterator is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 275-318 Medium

org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeNode

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeNode is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 332-758 Medium

org.opentrafficsim.core.geometry.OTSLine3D

Bug Category Details Line Priority
Invocation of toString on OTSLine3D.lengthIndexedLine in org.opentrafficsim.core.geometry.OTSLine3D.find(double) CORRECTNESS DMI_INVOKING_TOSTRING_ON_ARRAY 1045 Medium
org.opentrafficsim.core.geometry.OTSLine3D.getPoints() may expose internal representation by returning OTSLine3D.points MALICIOUS_CODE EI_EXPOSE_REP 883 Medium
Inconsistent synchronization of org.opentrafficsim.core.geometry.OTSLine3D.length; locked 71% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 545 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 47 Medium

org.opentrafficsim.core.geometry.Test$MyCallable

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.Test$MyCallable is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 973-1015 High
Should org.opentrafficsim.core.geometry.Test$MyCallable be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 973-1015 Medium

org.opentrafficsim.core.gtu.AbstractGTU

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.AbstractGTU.ALIGN_COUNT should be package protected MALICIOUS_CODE MS_PKGPROTECT 108 Medium
org.opentrafficsim.core.gtu.AbstractGTU.ALIGNED isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 104 High
Write to static field org.opentrafficsim.core.gtu.AbstractGTU.staticUNIQUENUMBER from instance method new org.opentrafficsim.core.gtu.AbstractGTU(String, GTUType, OTSDEVSSimulatorInterface, PerceivableContext) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 131 Medium

org.opentrafficsim.core.gtu.GTUType

Bug Category Details Line Priority
Null pointer dereference of GTUType.parent in org.opentrafficsim.core.gtu.GTUType.equals(Object) CORRECTNESS NP_ALWAYS_NULL 157 High

org.opentrafficsim.core.gtu.animation.IDGTUColorer

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.animation.IDGTUColorer.LEGEND is a mutable collection MALICIOUS_CODE MS_MUTABLE_COLLECTION 31 High

org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntry

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntry is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 295-319 High
Should org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntry be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 295-319 Medium

org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntryDouble

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntryDouble is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 351-375 High
Should org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristicsFactoryByType$FixedEntryDouble be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 351-375 Medium

org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeBoolean

Bug Category Details Line Priority
Possible null pointer dereference of AbstractParameterType.defaultValue in org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeBoolean.getDefaultValue() CORRECTNESS NP_NULL_ON_SOME_PATH 65 High

org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeDouble

Bug Category Details Line Priority
Possible null pointer dereference of AbstractParameterType.defaultValue in org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeDouble.getDefaultValue() CORRECTNESS NP_NULL_ON_SOME_PATH 100 High

org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeInteger

Bug Category Details Line Priority
Possible null pointer dereference of AbstractParameterType.defaultValue in org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypeInteger.getDefaultValue() CORRECTNESS NP_NULL_ON_SOME_PATH 98 High

org.opentrafficsim.core.gtu.perception.AbstractPerception

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.perception.AbstractPerception.getPerceptionCategory(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 85 Medium

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) STYLE DLS_DEAD_LOCAL_STORE 425 Medium

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

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 315-352 Medium
Should org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 315-352 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.OTSNetwork

Bug Category Details Line Priority
Return value of OTSNode.clone1(Network, OTSSimulatorInterface) ignored, is this OK in org.opentrafficsim.core.network.OTSNetwork.clone(String, OTSSimulatorInterface, OTSSimulatorInterface, boolean) STYLE RV_RETURN_VALUE_IGNORED_INFERRED 718 Medium
Class org.opentrafficsim.core.network.OTSNetwork defines non-transient non-serializable instance field invisibleObjectMap BAD_PRACTICE SE_BAD_FIELD Not available Medium
org.opentrafficsim.core.network.OTSNetwork.clone(String, OTSSimulatorInterface, OTSSimulatorInterface, boolean) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 752 Medium
org.opentrafficsim.core.network.OTSNetwork.getObjectMap(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 268 Medium

org.opentrafficsim.core.network.OTSNode

Bug Category Details Line Priority
org.opentrafficsim.core.network.OTSNode.clone2(Network, OTSSimulatorInterface, boolean) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 457 Medium

org.opentrafficsim.core.network.animation.LinkAnimation

Bug Category Details Line Priority
org.opentrafficsim.core.network.animation.LinkAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 53-87 High

org.opentrafficsim.core.network.animation.NodeAnimation

Bug Category Details Line Priority
org.opentrafficsim.core.network.animation.NodeAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 46-80 High

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

Bug Category Details Line Priority
org.opentrafficsim.core.network.factory.xml.units.AccelerationUnits.ACCELERATION_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.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 27 Medium
org.opentrafficsim.core.network.factory.xml.units.AngleUnits.DIRECTION_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 30 Medium

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

Bug Category Details Line Priority
org.opentrafficsim.core.network.factory.xml.units.DurationUnits.DURATION_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.DurationUnits.FREQUENCY_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.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.PositionUnits

Bug Category Details Line Priority
org.opentrafficsim.core.network.factory.xml.units.PositionUnits.POSITION_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 23 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.TIME_UNITS is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 23 Medium

org.opentrafficsim.core.object.animation.StaticObjectAnimation

Bug Category Details Line Priority
org.opentrafficsim.core.object.animation.StaticObjectAnimation is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 54-126 High

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 139 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 141 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 140 Medium
new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer) invokes org.opentrafficsim.gui.OTSAnimationPanel$UpdateTimer.start() MT_CORRECTNESS SC_START_IN_CTOR 155 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 491-528 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 131 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 134 Medium
Hard coded reference to an absolute pathname in new org.opentrafficsim.gui.OTSControlPanel(OTSDEVSSimulatorInterface, WrappableAnimation) STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 137 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.gui.OTSControlPanel.fixButtons() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 429 Medium
Hard coded reference to an absolute pathname in org.opentrafficsim.gui.OTSControlPanel.fixButtons() STYLE DMI_HARDCODED_ABSOLUTE_FILENAME 434 Medium
Exception is caught when Exception is not thrown in org.opentrafficsim.gui.OTSControlPanel.actionPerformed(ActionEvent) STYLE REC_CATCH_EXCEPTION 364 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 241-279 Medium