SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.8.6
Threshold is medium
Effort is default
Summary
Classes |
Bugs |
Errors |
Missing Classes |
57 |
47 |
0 |
0 |
org.opentrafficsim.animation.DefaultAnimationFactory
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.animation.DefaultAnimationFactory at new org.opentrafficsim.animation.DefaultAnimationFactory(Network, GtuColorerManager, boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
192 |
Medium |
org.opentrafficsim.animation.colorer.BlockingColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.BlockingColorer.getLegend() may expose internal representation by returning BlockingColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
44 |
Medium |
org.opentrafficsim.animation.colorer.ControlColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.ControlColorer.getLegend() may expose internal representation by returning ControlColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
80 |
Medium |
org.opentrafficsim.animation.colorer.DesireColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.DesireColorer.getLegend() may expose internal representation by returning DesireColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
62 |
Medium |
org.opentrafficsim.animation.colorer.DesiredHeadwayColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.DesiredHeadwayColorer.getLegend() may expose internal representation by returning DesiredHeadwayColorer.legend |
MALICIOUS_CODE |
EI_EXPOSE_REP |
123 |
Medium |
Class org.opentrafficsim.animation.colorer.DesiredHeadwayColorer defines non-transient non-serializable instance field legend |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
High |
org.opentrafficsim.animation.colorer.DesiredSpeedColorer
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.animation.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.animation.colorer.DesiredSpeedColorer(Speed, Speed) may expose internal representation by storing an externally mutable object into DesiredSpeedColorer.minimumSpeed |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
45 |
Medium |
Class org.opentrafficsim.animation.colorer.DesiredSpeedColorer defines non-transient non-serializable instance field legend |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
High |
org.opentrafficsim.animation.colorer.DistractionColorer
Bug |
Category |
Details |
Line |
Priority |
Class org.opentrafficsim.animation.colorer.DistractionColorer defines non-transient non-serializable instance field legend |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
High |
org.opentrafficsim.animation.colorer.GtuTypeColorer
Bug |
Category |
Details |
Line |
Priority |
Redundant nullcheck of color, which is known to be non-null in org.opentrafficsim.animation.colorer.GtuTypeColorer.getColor(Gtu) |
STYLE |
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE |
105 |
High |
Nullcheck of gtuType at line 100 of value previously dereferenced in org.opentrafficsim.animation.colorer.GtuTypeColorer.getColor(Gtu) |
CORRECTNESS |
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE |
99 |
Medium |
org.opentrafficsim.animation.colorer.GtuTypeColorer.getLegend() makes inefficient use of keySet iterator instead of entrySet iterator |
PERFORMANCE |
WMI_WRONG_MAP_ITERATOR |
119 |
Medium |
org.opentrafficsim.animation.colorer.ReactionTimeColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.ReactionTimeColorer.getLegend() may expose internal representation by returning ReactionTimeColorer.legend |
MALICIOUS_CODE |
EI_EXPOSE_REP |
84 |
Medium |
new org.opentrafficsim.animation.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.animation.colorer.SocialPressureColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.SocialPressureColorer.getLegend() may expose internal representation by returning SocialPressureColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
62 |
Medium |
org.opentrafficsim.animation.colorer.SplitColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.SplitColorer.getLegend() may expose internal representation by returning SplitColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
151 |
Medium |
Using floating-point loop counters can lead to unexpected behavior. |
CORRECTNESS |
FL_FLOATS_AS_LOOP_COUNTERS |
118 |
Medium |
Using floating-point loop counters can lead to unexpected behavior. |
CORRECTNESS |
FL_FLOATS_AS_LOOP_COUNTERS |
122 |
Medium |
org.opentrafficsim.animation.colorer.SynchronizationColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.SynchronizationColorer.getLegend() may expose internal representation by returning SynchronizationColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
86 |
Medium |
org.opentrafficsim.animation.colorer.TaskColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.TaskColorer.getLegend() may expose internal representation by returning TaskColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
99 |
Medium |
org.opentrafficsim.animation.colorer.TaskSaturationColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.colorer.TaskSaturationColorer.getLegend() may expose internal representation by returning TaskSaturationColorer.LEGEND |
MALICIOUS_CODE |
EI_EXPOSE_REP |
79 |
Medium |
org.opentrafficsim.animation.data.AnimationConflictData
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.data.AnimationConflictData.getConflict() may expose internal representation by returning AnimationConflictData.conflict |
MALICIOUS_CODE |
EI_EXPOSE_REP |
122 |
Medium |
new org.opentrafficsim.animation.data.AnimationConflictData(Conflict) may expose internal representation by storing an externally mutable object into AnimationConflictData.conflict |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
39 |
Medium |
org.opentrafficsim.animation.data.AnimationCrossSectionElementData
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.data.AnimationCrossSectionElementData.getElement() may expose internal representation by returning AnimationCrossSectionElementData.element |
MALICIOUS_CODE |
EI_EXPOSE_REP |
70 |
Medium |
new org.opentrafficsim.animation.data.AnimationCrossSectionElementData(CrossSectionElement) may expose internal representation by storing an externally mutable object into AnimationCrossSectionElementData.element |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
31 |
Medium |
org.opentrafficsim.animation.data.AnimationGtuData
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.data.AnimationGtuData.getGtu() may expose internal representation by returning AnimationGtuData.gtu |
MALICIOUS_CODE |
EI_EXPOSE_REP |
138 |
Medium |
new org.opentrafficsim.animation.data.AnimationGtuData(GtuColorerManager, LaneBasedGtu, DefaultCarAnimation$GtuData$GtuMarker) may expose internal representation by storing an externally mutable object into AnimationGtuData.gtu |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
44 |
Medium |
new org.opentrafficsim.animation.data.AnimationGtuData(GtuColorerManager, LaneBasedGtu, DefaultCarAnimation$GtuData$GtuMarker) may expose internal representation by storing an externally mutable object into AnimationGtuData.gtuColorerManager |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
43 |
Medium |
org.opentrafficsim.animation.data.AnimationLinkData
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.data.AnimationLinkData.getLink() may expose internal representation by returning AnimationLinkData.link |
MALICIOUS_CODE |
EI_EXPOSE_REP |
89 |
Medium |
new org.opentrafficsim.animation.data.AnimationLinkData(Link) may expose internal representation by storing an externally mutable object into AnimationLinkData.link |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
34 |
Medium |
org.opentrafficsim.animation.data.AnimationNodeData
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.data.AnimationNodeData.getNode() may expose internal representation by returning AnimationNodeData.node |
MALICIOUS_CODE |
EI_EXPOSE_REP |
55 |
Medium |
new org.opentrafficsim.animation.data.AnimationNodeData(Node) may expose internal representation by storing an externally mutable object into AnimationNodeData.node |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
28 |
Medium |
org.opentrafficsim.animation.data.AnimationPriorityData
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.animation.data.AnimationPriorityData(CrossSectionLink) may expose internal representation by storing an externally mutable object into AnimationPriorityData.link |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
36 |
Medium |
org.opentrafficsim.animation.data.AnimationSpeedSignData
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.data.AnimationSpeedSignData.getSpeedSign() may expose internal representation by returning AnimationSpeedSignData.speedSign |
MALICIOUS_CODE |
EI_EXPOSE_REP |
56 |
Medium |
new org.opentrafficsim.animation.data.AnimationSpeedSignData(SpeedSign) may expose internal representation by storing an externally mutable object into AnimationSpeedSignData.speedSign |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
29 |
Medium |
org.opentrafficsim.animation.data.AnimationTrafficLightDetectorData
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.data.AnimationTrafficLightDetectorData.getTrafficLightDetector() may expose internal representation by returning AnimationTrafficLightDetectorData.trafficLigthDetector |
MALICIOUS_CODE |
EI_EXPOSE_REP |
68 |
Medium |
new org.opentrafficsim.animation.data.AnimationTrafficLightDetectorData(TrafficLightDetector) may expose internal representation by storing an externally mutable object into AnimationTrafficLightDetectorData.trafficLigthDetector |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
29 |
Medium |
org.opentrafficsim.animation.gtu.colorer.AccelerationGtuColorer
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.animation.gtu.colorer.AccelerationGtuColorer(Acceleration, Acceleration) may expose internal representation by storing an externally mutable object into AccelerationGtuColorer.maximumAcceleration |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
50 |
Medium |
new org.opentrafficsim.animation.gtu.colorer.AccelerationGtuColorer(Acceleration, Acceleration) may expose internal representation by storing an externally mutable object into AccelerationGtuColorer.maximumDeceleration |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
49 |
Medium |
Class org.opentrafficsim.animation.gtu.colorer.AccelerationGtuColorer defines non-transient non-serializable instance field legend |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
High |
org.opentrafficsim.animation.gtu.colorer.GtuColorerManager
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.animation.gtu.colorer.GtuColorerManager at new org.opentrafficsim.animation.gtu.colorer.GtuColorerManager(Color) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
38 |
Medium |
org.opentrafficsim.animation.gtu.colorer.IdGtuColorer
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.animation.gtu.colorer.IdGtuColorer.LEGEND is a mutable collection |
MALICIOUS_CODE |
MS_MUTABLE_COLLECTION |
30 |
High |
org.opentrafficsim.animation.gtu.colorer.SpeedGtuColorer
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.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 |
Class org.opentrafficsim.animation.gtu.colorer.SpeedGtuColorer defines non-transient non-serializable instance field legend |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
High |
org.opentrafficsim.animation.gtu.colorer.SwitchableGtuColorer
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.animation.gtu.colorer.SwitchableGtuColorer at new org.opentrafficsim.animation.gtu.colorer.SwitchableGtuColorer(int, GtuColorer[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
50 |
Medium |
org.opentrafficsim.animation.gtu.colorer.SwitchableGtuColorer.getColorers() may expose internal representation by returning SwitchableGtuColorer.colorers |
MALICIOUS_CODE |
EI_EXPOSE_REP |
87 |
Medium |