The following document contains the results of FindBugs
FindBugs Version is 3.0.1
Threshold is medium
Effort is min
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 | 387-409 | High |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.dsol.DistNormalTrunc.CUMULATIVE_NORMAL_PROPABILITIES should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 278 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeIterator is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 1-320 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeNode is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 334-760 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.OTSLine3D.getPoints() may expose internal representation by returning OTSLine3D.points | MALICIOUS_CODE | EI_EXPOSE_REP | 887 | Medium |
Inconsistent synchronization of org.opentrafficsim.core.geometry.OTSLine3D.length; locked 71% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 549 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Return value of java.util.List.size() ignored, but method has no side effect | STYLE | RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT | 256 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.OTSShape doesn't override OTSLine3D.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
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 |
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 | 1-1016 | High |
Should org.opentrafficsim.core.geometry.Test$MyCallable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-1016 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.AbstractGTU.ALIGN_COUNT should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 111 | Medium |
org.opentrafficsim.core.gtu.AbstractGTU.ALIGNED isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 107 | High |
Write to static field org.opentrafficsim.core.gtu.AbstractGTU.staticUNIQUENUMBER from instance method new org.opentrafficsim.core.gtu.AbstractGTU(String, GTUType, DEVSSimulatorInterface$TimeDoubleUnit, PerceivableContext) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 150 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.GTUType is Serializable but its superclass doesn't define an accessible void constructor | BAD_PRACTICE | SE_NO_SUITABLE_CONSTRUCTOR | 85-203 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.animation.IDGTUColorer.LEGEND is a mutable collection | MALICIOUS_CODE | MS_MUTABLE_COLLECTION | 31 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType.setParameter(ParameterType, Object, Parameters, Map) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 168 | Medium |
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType.setValues(Parameters, GTUType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 81 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$DistributedEntry is serializable but also an inner class of a non-serializable class | BAD_PRACTICE | SE_BAD_FIELD_INNER_CLASS | 1-532 | High |
Should org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$DistributedEntry be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-532 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$DistributedEntryDouble is serializable but also an inner class of a non-serializable class | BAD_PRACTICE | SE_BAD_FIELD_INNER_CLASS | 1-587 | High |
Should org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$DistributedEntryDouble be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-587 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$FixedEntry is serializable but also an inner class of a non-serializable class | BAD_PRACTICE | SE_BAD_FIELD_INNER_CLASS | 394-418 | High |
Should org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$FixedEntry be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 394-418 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$FixedEntryDouble is serializable but also an inner class of a non-serializable class | BAD_PRACTICE | SE_BAD_FIELD_INNER_CLASS | 1-474 | High |
Should org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactoryByType$FixedEntryDouble be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1-474 | Medium |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to p in org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getLocation(Time) | STYLE | DLS_DEAD_LOCAL_STORE | 432 | 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 | 603 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 318-357 | Medium |
Should org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 318-357 | Medium |
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 | 45 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.CapacityOTSLink doesn't override OTSLink.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
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 | 1-169 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.core.network.LinkType$ReversedLinkType be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 198-214 | Medium |
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 | 556 | Medium |
Return value of OTSNode.clone1(Network, SimulatorInterface$TimeDoubleUnit) ignored, is this OK in org.opentrafficsim.core.network.OTSNetwork.clone(String, SimulatorInterface$TimeDoubleUnit, SimulatorInterface$TimeDoubleUnit, boolean) | STYLE | RV_RETURN_VALUE_IGNORED_INFERRED | 776 | 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, SimulatorInterface$TimeDoubleUnit, SimulatorInterface$TimeDoubleUnit, boolean) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 810 | Medium |
org.opentrafficsim.core.network.OTSNetwork.getObjectMap(Class) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 271 | Medium |
org.opentrafficsim.core.network.OTSNetwork.getRoute(String) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 492 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.OTSNode.clone2(Network, SimulatorInterface$TimeDoubleUnit, boolean) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 460 | Medium |
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 | 1-137 | High |
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 | 47-81 | High |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 | 1-46 | High |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.opentrafficsim.gui.OTSAnimationPanel(Rectangle2D, Dimension, SimpleAnimator, WrappableAnimation, GTUColorer, OTSNetwork) invokes org.opentrafficsim.gui.OTSAnimationPanel$UpdateTimer.start() | MT_CORRECTNESS | SC_START_IN_CTOR | 263 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.gui.OTSAnimationPanel$DisposeOnCloseThread be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 642-679 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in org.opentrafficsim.gui.OTSControlPanel.actionPerformed(ActionEvent) | STYLE | REC_CATCH_EXCEPTION | 443 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.gui.OTSControlPanel$DisposeOnCloseThread be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 320-358 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.opentrafficsim.simulationengine.AbstractWrappableAnimation.buildAnimator(Time, Duration, Duration, List, Rectangle, boolean): new java.io.FileReader(String) | I18N | DM_DEFAULT_ENCODING | 250 | High |
org.opentrafficsim.simulationengine.AbstractWrappableAnimation.buildAnimator(Time, Duration, Duration, List, Rectangle, boolean) may fail to clean up java.io.Reader | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 250 | Medium |
org.opentrafficsim.simulationengine.AbstractWrappableAnimation.buildAnimator(Time, Duration, Duration, List, Rectangle, boolean) may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 250 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.opentrafficsim.simulationengine.AbstractWrappableAnimation$1.windowClosing(WindowEvent): new java.io.FileWriter(File) | I18N | DM_DEFAULT_ENCODING | 233 | High |
org.opentrafficsim.simulationengine.AbstractWrappableAnimation$1.windowClosing(WindowEvent) may fail to clean up java.io.Writer | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 233 | Medium |
org.opentrafficsim.simulationengine.AbstractWrappableAnimation$1.windowClosing(WindowEvent) may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 233 | Medium |
Exceptional return value of java.io.File.mkdirs() ignored in org.opentrafficsim.simulationengine.AbstractWrappableAnimation$1.windowClosing(WindowEvent) | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 232 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.simulationengine.AbstractWrappableAnimation$SubMenuShower be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 824-841 | Medium |