The following document contains the results of SpotBugs
SpotBugs Version is 4.7.1
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
44 | 25 | 0 | 0 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.animation.gtu.colorer.IdGtuColorer.LEGEND is a mutable collection | MALICIOUS_CODE | MS_MUTABLE_COLLECTION | 29 | High |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |