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 |
59 |
41 |
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, GtuColorer, boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
199 |
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 |
45 |
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 |
82 |
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 |
63 |
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 |
125 |
Medium |
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 |
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 |
106 |
High |
Nullcheck of gtuType at line 101 of value previously dereferenced in org.opentrafficsim.animation.colorer.GtuTypeColorer.getColor(Gtu) |
CORRECTNESS |
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE |
100 |
Medium |
org.opentrafficsim.animation.colorer.GtuTypeColorer.getLegend() makes inefficient use of keySet iterator instead of entrySet iterator |
PERFORMANCE |
WMI_WRONG_MAP_ITERATOR |
121 |
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 |
86 |
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 |
64 |
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 |
187 |
Medium |
Using floating-point loop counters can lead to unexpected behavior. |
CORRECTNESS |
FL_FLOATS_AS_LOOP_COUNTERS |
123 |
Medium |
Using floating-point loop counters can lead to unexpected behavior. |
CORRECTNESS |
FL_FLOATS_AS_LOOP_COUNTERS |
127 |
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 |
88 |
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 |
101 |
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 |
81 |
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 |
116 |
Medium |
org.opentrafficsim.animation.data.AnimationConflictData.getContour() may expose internal representation by returning AnimationConflictData.contour |
MALICIOUS_CODE |
EI_EXPOSE_REP |
93 |
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 |
36 |
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 |
67 |
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 |
30 |
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 |
141 |
Medium |
new org.opentrafficsim.animation.data.AnimationGtuData(GtuColorer, LaneBasedGtu) may expose internal representation by storing an externally mutable object into AnimationGtuData.gtu |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
40 |
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 |
73 |
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 |
29 |
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 |
58 |
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 |
27 |
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 |
59 |
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 |
73 |
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 |
51 |
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 |
50 |
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 |
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 |
90 |
Medium |