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
299 66 0 0

Files

Class Bugs
org.opentrafficsim.core.compatibility.GTUCompatibility 3
org.opentrafficsim.core.distributions.Distribution 1
org.opentrafficsim.core.dsol.OTSDEVSRTParallelMove 1
org.opentrafficsim.core.dsol.OTSReplication 1
org.opentrafficsim.core.egtf.EGTF 1
org.opentrafficsim.core.egtf.EGTF$DualWeightedMean 1
org.opentrafficsim.core.egtf.EGTF$WeightedMean 1
org.opentrafficsim.core.egtf.FilterDouble 2
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 2
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 3
org.opentrafficsim.core.gtu.perception.AbstractPerception 2
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan 2
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress 2
org.opentrafficsim.core.math.Draw 1
org.opentrafficsim.core.network.CapacityOTSLink 1
org.opentrafficsim.core.network.DirectedLinkPosition 1
org.opentrafficsim.core.network.LinkType 2
org.opentrafficsim.core.network.LinkType$ReversedLinkType 1
org.opentrafficsim.core.network.OTSNetwork 4
org.opentrafficsim.core.network.OTSNetworkUtils 1
org.opentrafficsim.core.network.OTSNode 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.network.route.FixedRouteGenerator 1
org.opentrafficsim.core.parameters.ParameterFactoryByType 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry 2
org.opentrafficsim.core.perception.collections.AbstractHistoricalList 1

org.opentrafficsim.core.compatibility.GTUCompatibility

Bug Category Details Line Priority
org.opentrafficsim.core.compatibility.GTUCompatibility.isCompatible(GTUType, GTUDirectionality) has Boolean return type and returns explicit null BAD_PRACTICE NP_BOOLEAN_RETURN_NULL 69 High
Format string "%s" needs argument 3 but only 2 are provided in org.opentrafficsim.core.compatibility.GTUCompatibility.isCompatibleWith(Compatibility, boolean) CORRECTNESS VA_FORMAT_STRING_MISSING_ARGUMENT 180 High
org.opentrafficsim.core.compatibility.GTUCompatibility.isCompatibleWith(Compatibility, boolean) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 176 Medium

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 48 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.OTSReplication

Bug Category Details Line Priority
org.opentrafficsim.core.perception.HistoryManagerDEVS stored into non-transient field OTSReplication.historyManager BAD_PRACTICE SE_BAD_FIELD_STORE 72 Medium

org.opentrafficsim.core.egtf.EGTF

Bug Category Details Line Priority
Possible null pointer dereference of wMean in org.opentrafficsim.core.egtf.EGTF.filterSI(double[], double[], Quantity[]) CORRECTNESS NP_NULL_ON_SOME_PATH 663 Medium

org.opentrafficsim.core.egtf.EGTF$DualWeightedMean

Bug Category Details Line Priority
Should org.opentrafficsim.core.egtf.EGTF$DualWeightedMean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1067-1143 Medium

org.opentrafficsim.core.egtf.EGTF$WeightedMean

Bug Category Details Line Priority
Should org.opentrafficsim.core.egtf.EGTF$WeightedMean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1152-1184 Medium

org.opentrafficsim.core.egtf.FilterDouble

Bug Category Details Line Priority
org.opentrafficsim.core.egtf.FilterDouble.getLocation() may expose internal representation by returning FilterDouble.location MALICIOUS_CODE EI_EXPOSE_REP 44 Medium
org.opentrafficsim.core.egtf.FilterDouble.getTime() may expose internal representation by returning FilterDouble.time MALICIOUS_CODE EI_EXPOSE_REP 51 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 60 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 276-319 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 333-759 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 890 Medium
Inconsistent synchronization of org.opentrafficsim.core.geometry.OTSLine3D.length; locked 71% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 552 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 107 Medium
org.opentrafficsim.core.gtu.AbstractGTU.ALIGNED isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 103 High
Write to static field org.opentrafficsim.core.gtu.AbstractGTU.staticUNIQUENUMBER from instance method new org.opentrafficsim.core.gtu.AbstractGTU(String, GTUType, OTSSimulatorInterface, PerceivableContext) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 147 Medium

org.opentrafficsim.core.gtu.GTUType

Bug Category Details Line Priority
GTUType is incompatible with expected argument type GTUType$DEFAULTS in org.opentrafficsim.core.gtu.GTUType.defaultCharacteristics(GTUType, Network, StreamInterface) CORRECTNESS GC_UNRELATED_TYPES 204 High
GTUType is incompatible with expected argument type GTUType$DEFAULTS in org.opentrafficsim.core.gtu.GTUType.defaultCharacteristics(GTUType, Network, StreamInterface) CORRECTNESS GC_UNRELATED_TYPES 206 High
org.opentrafficsim.core.gtu.GTUType is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 132-281 High

org.opentrafficsim.core.gtu.perception.AbstractPerception

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.perception.AbstractPerception.contains(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 80 Medium
org.opentrafficsim.core.gtu.perception.AbstractPerception.getPerceptionCategoryOrNull(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 116 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 433 Medium
Redundant nullcheck of p, which is known to be non-null in org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.timeAtPoint(DirectedPoint, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 604 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 320-357 Medium
Should org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 320-357 Medium

org.opentrafficsim.core.math.Draw

Bug Category Details Line Priority
org.opentrafficsim.core.math.Draw.drawWeighted(Map, StreamInterface) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 46 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.DirectedLinkPosition

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

org.opentrafficsim.core.network.LinkType

Bug Category Details Line Priority
Class org.opentrafficsim.core.network.LinkType defines non-transient non-serializable instance field compatibility BAD_PRACTICE SE_BAD_FIELD Not available High
org.opentrafficsim.core.network.LinkType is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 25-202 High

org.opentrafficsim.core.network.LinkType$ReversedLinkType

Bug Category Details Line Priority
Should org.opentrafficsim.core.network.LinkType$ReversedLinkType be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 217-248 Medium

org.opentrafficsim.core.network.OTSNetwork

Bug Category Details Line Priority
org.opentrafficsim.core.network.OTSNetwork.buildGraph(GTUType, LinkWeight) allocates an object, only to get the class object PERFORMANCE DM_NEW_FOR_GETCLASS 621 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.getObjectMap(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 307 Medium
org.opentrafficsim.core.network.OTSNetwork.getRoute(String) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 557 Medium

org.opentrafficsim.core.network.OTSNetworkUtils

Bug Category Details Line Priority
Return value of OTSNode.clone1(Network, SimulatorInterface$TimeDoubleUnit) ignored, is this OK in org.opentrafficsim.core.network.OTSNetworkUtils.clone(OTSNetwork, String, SimulatorInterface$TimeDoubleUnit, OTSSimulatorInterface) STYLE RV_RETURN_VALUE_IGNORED_INFERRED 50 Medium

org.opentrafficsim.core.network.OTSNode

Bug Category Details Line Priority
org.opentrafficsim.core.network.OTSNode.clone2(Network, SimulatorInterface$TimeDoubleUnit) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 418 Medium

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.network.route.FixedRouteGenerator

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

org.opentrafficsim.core.parameters.ParameterFactoryByType

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType.setParameter(ParameterType, Object, Parameters, Map) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 188 Medium
org.opentrafficsim.core.parameters.ParameterFactoryByType.setValues(Parameters, GTUType) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 94 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 457-497 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 457-497 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 513-552 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 513-552 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 568-607 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 568-607 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 415-438 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 415-438 Medium

org.opentrafficsim.core.perception.collections.AbstractHistoricalList

Bug Category Details Line Priority
org.opentrafficsim.core.perception.collections.AbstractHistoricalList.get(int) is unsynchronized, org.opentrafficsim.core.perception.collections.AbstractHistoricalList.set(int, Object) is synchronized MT_CORRECTNESS UG_SYNC_SET_UNSYNC_GET 114 Medium