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 | 53 | 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 | 52 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.animation.gtu.colorer.IDGTUColorer.LEGEND is a mutable collection | MALICIOUS_CODE | MS_MUTABLE_COLLECTION | 31 | 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 | 42 | 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 | 92 | 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 | 149 | 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 | 46 | 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 | 83 | 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 | 64 | 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 | 126 | 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 | 47 | 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 | 46 | 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 | 124 | High |
Nullcheck of gtuType at line 119 of value previously dereferenced in org.opentrafficsim.road.gtu.colorer.GTUTypeColorer.getColor(GTU) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 118 | Medium |
org.opentrafficsim.road.gtu.colorer.GTUTypeColorer.getLegend() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 139 | 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 | 87 | 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 | 54 | 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 | 65 | 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 | 192 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 128 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 132 | 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 | 89 | 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 | 102 | 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 | 82 | Medium |