SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.1.4

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
121 24 0 0

Files

Class Bugs
org.opentrafficsim.draw.core.BoundsPaintScale 2
org.opentrafficsim.draw.graphs.ContourDataSource 9
org.opentrafficsim.draw.graphs.FundamentalDiagram 2
org.opentrafficsim.draw.graphs.FundamentalDiagram$AbstractSpaceSamplerFdSource 2
org.opentrafficsim.draw.graphs.FundamentalDiagram$MultiFdSource 1
org.opentrafficsim.draw.graphs.GraphUpdater 1
org.opentrafficsim.draw.graphs.TrajectoryPlot$OffsetTrajectory 1
org.opentrafficsim.draw.graphs.XYInterpolatedBlockRenderer 1
org.opentrafficsim.draw.graphs.XYInterpolatedBlockRenderer$1$1 1
org.opentrafficsim.draw.graphs.road.GraphLaneUtil$4 1
org.opentrafficsim.draw.gtu.DefaultCarAnimation 1
org.opentrafficsim.draw.gtu.DefaultCarAnimation$Text 1
org.opentrafficsim.draw.gtu.GtuGeneratorQueueAnimation 1

org.opentrafficsim.draw.core.BoundsPaintScale

Bug Category Details Line Priority
org.opentrafficsim.draw.core.BoundsPaintScale.GREEN_RED is a mutable array MALICIOUS_CODE MS_MUTABLE_ARRAY 26 High
org.opentrafficsim.draw.core.BoundsPaintScale.GREEN_RED_DARK is a mutable array MALICIOUS_CODE MS_MUTABLE_ARRAY 30 High

org.opentrafficsim.draw.graphs.ContourDataSource

Bug Category Details Line Priority
Inconsistent synchronization of org.opentrafficsim.draw.graphs.ContourDataSource.redo; locked 75% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 796 Medium
Inconsistent synchronization of org.opentrafficsim.draw.graphs.ContourDataSource.smooth; locked 66% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 444 Medium
Inconsistent synchronization of org.opentrafficsim.draw.graphs.ContourDataSource.toTime; locked 83% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 512 Medium
org.opentrafficsim.draw.graphs.ContourDataSource.DEFAULT_SPACE_GRANULARITIES should be package protected MALICIOUS_CODE MS_PKGPROTECT 58 Medium
org.opentrafficsim.draw.graphs.ContourDataSource.DEFAULT_TIME_GRANULARITIES should be package protected MALICIOUS_CODE MS_PKGPROTECT 64 Medium
Method org.opentrafficsim.draw.graphs.ContourDataSource.setStatusLabel(String) seems to be useless STYLE UC_USELESS_VOID_METHOD 899 Medium
org.opentrafficsim.draw.graphs.ContourDataSource.getGranularity(ContourDataSource$Dimension) is unsynchronized, org.opentrafficsim.draw.graphs.ContourDataSource.setGranularity(ContourDataSource$Dimension, double) is synchronized MT_CORRECTNESS UG_SYNC_SET_UNSYNC_GET 365 Medium
org.opentrafficsim.draw.graphs.ContourDataSource.update(Time) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 773 Medium
org.opentrafficsim.draw.graphs.ContourDataSource.update(Time) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 790 Medium

org.opentrafficsim.draw.graphs.FundamentalDiagram

Bug Category Details Line Priority
org.opentrafficsim.draw.graphs.FundamentalDiagram.DEFAULT_PERIODS should be package protected MALICIOUS_CODE MS_PKGPROTECT 55 Medium
org.opentrafficsim.draw.graphs.FundamentalDiagram.DEFAULT_UPDATE_FREQUENCIES should be package protected MALICIOUS_CODE MS_PKGPROTECT 58 Medium

org.opentrafficsim.draw.graphs.FundamentalDiagram$AbstractSpaceSamplerFdSource

Bug Category Details Line Priority
Inconsistent synchronization of org.opentrafficsim.draw.graphs.FundamentalDiagram$AbstractSpaceSamplerFdSource.firstMeasurement; locked 75% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 1126 Medium
Inconsistent synchronization of org.opentrafficsim.draw.graphs.FundamentalDiagram$AbstractSpaceSamplerFdSource.secondMeasurement; locked 71% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 1126 Medium

org.opentrafficsim.draw.graphs.FundamentalDiagram$MultiFdSource

Bug Category Details Line Priority
Possible null pointer dereference of sources in new org.opentrafficsim.draw.graphs.FundamentalDiagram$MultiFdSource(Map) CORRECTNESS NP_NULL_ON_SOME_PATH 1215 Medium

org.opentrafficsim.draw.graphs.GraphUpdater

Bug Category Details Line Priority
Exceptional return value of java.util.concurrent.BlockingQueue.offer(Object) ignored in org.opentrafficsim.draw.graphs.GraphUpdater.offer(Object) BAD_PRACTICE RV_RETURN_VALUE_IGNORED_BAD_PRACTICE 69 Medium

org.opentrafficsim.draw.graphs.TrajectoryPlot$OffsetTrajectory

Bug Category Details Line Priority
Should org.opentrafficsim.draw.graphs.TrajectoryPlot$OffsetTrajectory be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 477-572 Medium

org.opentrafficsim.draw.graphs.XYInterpolatedBlockRenderer

Bug Category Details Line Priority
org.opentrafficsim.draw.graphs.XYInterpolatedBlockRenderer doesn't override org.jfree.chart.renderer.xy.XYBlockRenderer.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.draw.graphs.XYInterpolatedBlockRenderer$1$1

Bug Category Details Line Priority
Integral division result cast to double or float in org.opentrafficsim.draw.graphs.XYInterpolatedBlockRenderer$1$1.getRaster(int, int, int, int) STYLE ICAST_IDIV_CAST_TO_DOUBLE 183 Medium

org.opentrafficsim.draw.graphs.road.GraphLaneUtil$4

Bug Category Details Line Priority
org.opentrafficsim.draw.graphs.road.GraphLaneUtil$4.compare(Lane, Lane) negates the return value of org.djunits.value.vdouble.scalar.base.AbstractDoubleScalar.compareTo(AbstractDoubleScalar) BAD_PRACTICE RV_NEGATING_RESULT_OF_COMPARETO 363 Medium

org.opentrafficsim.draw.gtu.DefaultCarAnimation

Bug Category Details Line Priority
org.opentrafficsim.core.animation.gtu.colorer.IDGTUColorer stored into non-transient field DefaultCarAnimation.gtuColorer BAD_PRACTICE SE_BAD_FIELD_STORE 109 High

org.opentrafficsim.draw.gtu.DefaultCarAnimation$Text

Bug Category Details Line Priority
Potentially ambiguous invocation of either an outer or inherited method org.opentrafficsim.draw.core.TextAnimation.destroy() in org.opentrafficsim.draw.gtu.DefaultCarAnimation$Text.paint(Graphics2D, ImageObserver) STYLE IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD 358 High

org.opentrafficsim.draw.gtu.GtuGeneratorQueueAnimation

Bug Category Details Line Priority
org.opentrafficsim.draw.gtu.GtuGeneratorQueueAnimation.paint(Graphics2D, ImageObserver) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 64 Medium