SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
44 25 0 0

Files

Class Bugs
org.opentrafficsim.core.animation.gtu.colorer.AccelerationGtuColorer 2
org.opentrafficsim.core.animation.gtu.colorer.IdGtuColorer 1
org.opentrafficsim.core.animation.gtu.colorer.SpeedGtuColorer 1
org.opentrafficsim.core.animation.gtu.colorer.SwitchableGtuColorer 1
org.opentrafficsim.core.animation.network.NetworkAnimation 2
org.opentrafficsim.road.gtu.colorer.BlockingColorer 1
org.opentrafficsim.road.gtu.colorer.ControlColorer 1
org.opentrafficsim.road.gtu.colorer.DesireColorer 1
org.opentrafficsim.road.gtu.colorer.DesiredHeadwayColorer 1
org.opentrafficsim.road.gtu.colorer.DesiredSpeedColorer 2
org.opentrafficsim.road.gtu.colorer.GtuTypeColorer 3
org.opentrafficsim.road.gtu.colorer.ReactionTimeColorer 2
org.opentrafficsim.road.gtu.colorer.SocialPressureColorer 1
org.opentrafficsim.road.gtu.colorer.SplitColorer 3
org.opentrafficsim.road.gtu.colorer.SynchronizationColorer 1
org.opentrafficsim.road.gtu.colorer.TaskColorer 1
org.opentrafficsim.road.gtu.colorer.TaskSaturationColorer 1

org.opentrafficsim.core.animation.gtu.colorer.AccelerationGtuColorer

Bug Category Details Line Priority
new org.opentrafficsim.core.animation.gtu.colorer.AccelerationGtuColorer(Acceleration, Acceleration) may expose internal representation by storing an externally mutable object into AccelerationGtuColorer.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP2 51 Medium
new org.opentrafficsim.core.animation.gtu.colorer.AccelerationGtuColorer(Acceleration, Acceleration) may expose internal representation by storing an externally mutable object into AccelerationGtuColorer.maximumDeceleration MALICIOUS_CODE EI_EXPOSE_REP2 50 Medium

org.opentrafficsim.core.animation.gtu.colorer.IdGtuColorer

Bug Category Details Line Priority
org.opentrafficsim.core.animation.gtu.colorer.IdGtuColorer.LEGEND is a mutable collection MALICIOUS_CODE MS_MUTABLE_COLLECTION 29 High

org.opentrafficsim.core.animation.gtu.colorer.SpeedGtuColorer

Bug Category Details Line Priority
new org.opentrafficsim.core.animation.gtu.colorer.SpeedGtuColorer(Speed) may expose internal representation by storing an externally mutable object into SpeedGtuColorer.maximumSpeed MALICIOUS_CODE EI_EXPOSE_REP2 40 Medium

org.opentrafficsim.core.animation.gtu.colorer.SwitchableGtuColorer

Bug Category Details Line Priority
org.opentrafficsim.core.animation.gtu.colorer.SwitchableGtuColorer.getColorers() may expose internal representation by returning SwitchableGtuColorer.colorers MALICIOUS_CODE EI_EXPOSE_REP 90 Medium

org.opentrafficsim.core.animation.network.NetworkAnimation

Bug Category Details Line Priority
org.opentrafficsim.core.animation.network.NetworkAnimation.getNetwork() may expose internal representation by returning NetworkAnimation.network MALICIOUS_CODE EI_EXPOSE_REP 147 Medium
new org.opentrafficsim.core.animation.network.NetworkAnimation(Network) may expose internal representation by storing an externally mutable object into NetworkAnimation.network MALICIOUS_CODE EI_EXPOSE_REP2 47 Medium

org.opentrafficsim.road.gtu.colorer.BlockingColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.BlockingColorer.getLegend() may expose internal representation by returning BlockingColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 45 Medium

org.opentrafficsim.road.gtu.colorer.ControlColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.ControlColorer.getLegend() may expose internal representation by returning ControlColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 82 Medium

org.opentrafficsim.road.gtu.colorer.DesireColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.DesireColorer.getLegend() may expose internal representation by returning DesireColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 63 Medium

org.opentrafficsim.road.gtu.colorer.DesiredHeadwayColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.DesiredHeadwayColorer.getLegend() may expose internal representation by returning DesiredHeadwayColorer.legend MALICIOUS_CODE EI_EXPOSE_REP 125 Medium

org.opentrafficsim.road.gtu.colorer.DesiredSpeedColorer

Bug Category Details Line Priority
new org.opentrafficsim.road.gtu.colorer.DesiredSpeedColorer(Speed, Speed) may expose internal representation by storing an externally mutable object into DesiredSpeedColorer.maximumSpeed MALICIOUS_CODE EI_EXPOSE_REP2 46 Medium
new org.opentrafficsim.road.gtu.colorer.DesiredSpeedColorer(Speed, Speed) may expose internal representation by storing an externally mutable object into DesiredSpeedColorer.minimumSpeed MALICIOUS_CODE EI_EXPOSE_REP2 45 Medium

org.opentrafficsim.road.gtu.colorer.GtuTypeColorer

Bug Category Details Line Priority
Redundant nullcheck of color, which is known to be non-null in org.opentrafficsim.road.gtu.colorer.GtuTypeColorer.getColor(Gtu) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 106 High
Nullcheck of gtuType at line 101 of value previously dereferenced in org.opentrafficsim.road.gtu.colorer.GtuTypeColorer.getColor(Gtu) CORRECTNESS RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE 100 Medium
org.opentrafficsim.road.gtu.colorer.GtuTypeColorer.getLegend() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 121 Medium

org.opentrafficsim.road.gtu.colorer.ReactionTimeColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.ReactionTimeColorer.getLegend() may expose internal representation by returning ReactionTimeColorer.legend MALICIOUS_CODE EI_EXPOSE_REP 86 Medium
new org.opentrafficsim.road.gtu.colorer.ReactionTimeColorer(Duration) may expose internal representation by storing an externally mutable object into ReactionTimeColorer.maxReactionTime MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium

org.opentrafficsim.road.gtu.colorer.SocialPressureColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.SocialPressureColorer.getLegend() may expose internal representation by returning SocialPressureColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 64 Medium

org.opentrafficsim.road.gtu.colorer.SplitColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.SplitColorer.getLegend() may expose internal representation by returning SplitColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 186 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 122 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 126 Medium

org.opentrafficsim.road.gtu.colorer.SynchronizationColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.SynchronizationColorer.getLegend() may expose internal representation by returning SynchronizationColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 88 Medium

org.opentrafficsim.road.gtu.colorer.TaskColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.TaskColorer.getLegend() may expose internal representation by returning TaskColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 101 Medium

org.opentrafficsim.road.gtu.colorer.TaskSaturationColorer

Bug Category Details Line Priority
org.opentrafficsim.road.gtu.colorer.TaskSaturationColorer.getLegend() may expose internal representation by returning TaskSaturationColorer.LEGEND MALICIOUS_CODE EI_EXPOSE_REP 81 Medium