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 |
54 |
46 |
0 |
0 |
org.opentrafficsim.kpi.sampling.CrossSection
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.kpi.sampling.CrossSection at new org.opentrafficsim.kpi.sampling.CrossSection(Set) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
39 |
Medium |
Exception thrown in class org.opentrafficsim.kpi.sampling.CrossSection at new org.opentrafficsim.kpi.sampling.CrossSection(LinkData, double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
51 |
Medium |
org.opentrafficsim.kpi.sampling.DataType
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.kpi.sampling.DataType at new org.opentrafficsim.kpi.sampling.DataType(String, String, Class) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
39 |
Medium |
org.opentrafficsim.kpi.sampling.LanePosition
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.kpi.sampling.LanePosition at new org.opentrafficsim.kpi.sampling.LanePosition(LaneData, Length) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
37 |
Medium |
org.opentrafficsim.kpi.sampling.LanePosition.getPosition() may expose internal representation by returning LanePosition.position |
MALICIOUS_CODE |
EI_EXPOSE_REP |
58 |
Medium |
new org.opentrafficsim.kpi.sampling.LanePosition(LaneData, Length) may expose internal representation by storing an externally mutable object into LanePosition.position |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
40 |
Medium |
Class org.opentrafficsim.kpi.sampling.LanePosition defines non-transient non-serializable instance field lane |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
org.opentrafficsim.kpi.sampling.Query
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.Query.getInterval() may expose internal representation by returning Query.interval |
MALICIOUS_CODE |
EI_EXPOSE_REP |
219 |
Medium |
org.opentrafficsim.kpi.sampling.Query.getUpdateFrequency() may expose internal representation by returning Query.updateFrequency |
MALICIOUS_CODE |
EI_EXPOSE_REP |
210 |
Medium |
new org.opentrafficsim.kpi.sampling.Query(Sampler, String, String, FilterDataSet, Frequency, Duration) may expose internal representation by storing an externally mutable object into Query.interval |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
127 |
Medium |
new org.opentrafficsim.kpi.sampling.Query(Sampler, String, String, FilterDataSet, Frequency, Duration) may expose internal representation by storing an externally mutable object into Query.updateFrequency |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
126 |
Medium |
org.opentrafficsim.kpi.sampling.Query.getTrajectoryGroups(Time, Time) makes inefficient use of keySet iterator instead of entrySet iterator |
PERFORMANCE |
WMI_WRONG_MAP_ITERATOR |
369 |
Medium |
org.opentrafficsim.kpi.sampling.Sampler
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.Sampler.getSamplerData() may expose internal representation by returning Sampler.samplerData |
MALICIOUS_CODE |
EI_EXPOSE_REP |
70 |
Medium |
org.opentrafficsim.kpi.sampling.SpaceTimeRegion
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.SpaceTimeRegion.endPosition() may expose internal representation by returning SpaceTimeRegion.endPosition |
MALICIOUS_CODE |
EI_EXPOSE_REP |
24 |
Medium |
org.opentrafficsim.kpi.sampling.SpaceTimeRegion.endTime() may expose internal representation by returning SpaceTimeRegion.endTime |
MALICIOUS_CODE |
EI_EXPOSE_REP |
24 |
Medium |
org.opentrafficsim.kpi.sampling.SpaceTimeRegion.startPosition() may expose internal representation by returning SpaceTimeRegion.startPosition |
MALICIOUS_CODE |
EI_EXPOSE_REP |
24 |
Medium |
org.opentrafficsim.kpi.sampling.SpaceTimeRegion.startTime() may expose internal representation by returning SpaceTimeRegion.startTime |
MALICIOUS_CODE |
EI_EXPOSE_REP |
24 |
Medium |
new org.opentrafficsim.kpi.sampling.SpaceTimeRegion(LaneData, Length, Length, Time, Time) may expose internal representation by storing an externally mutable object into SpaceTimeRegion.endPosition |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
37 |
Medium |
new org.opentrafficsim.kpi.sampling.SpaceTimeRegion(LaneData, Length, Length, Time, Time) may expose internal representation by storing an externally mutable object into SpaceTimeRegion.endTime |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
37 |
Medium |
new org.opentrafficsim.kpi.sampling.SpaceTimeRegion(LaneData, Length, Length, Time, Time) may expose internal representation by storing an externally mutable object into SpaceTimeRegion.startPosition |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
37 |
Medium |
new org.opentrafficsim.kpi.sampling.SpaceTimeRegion(LaneData, Length, Length, Time, Time) may expose internal representation by storing an externally mutable object into SpaceTimeRegion.startTime |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
37 |
Medium |
org.opentrafficsim.kpi.sampling.Trajectory
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.Trajectory.subSet(Trajectory$Boundaries) makes inefficient use of keySet iterator instead of entrySet iterator |
PERFORMANCE |
WMI_WRONG_MAP_ITERATOR |
798 |
Medium |
org.opentrafficsim.kpi.sampling.Trajectory$Boundaries
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.kpi.sampling.Trajectory$Boundaries at new org.opentrafficsim.kpi.sampling.Trajectory$Boundaries(Trajectory, int, double, int, double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
997 |
Medium |
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView.getDistance() may expose internal representation by returning Trajectory$SpaceTimeView.distance |
MALICIOUS_CODE |
EI_EXPOSE_REP |
1099 |
Medium |
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView.getTime() may expose internal representation by returning Trajectory$SpaceTimeView.time |
MALICIOUS_CODE |
EI_EXPOSE_REP |
1108 |
Medium |
org.opentrafficsim.kpi.sampling.TrajectoryGroup
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.kpi.sampling.TrajectoryGroup at new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Time, Length, Length, LaneData) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
61 |
Medium |
Exception thrown in class org.opentrafficsim.kpi.sampling.TrajectoryGroup at new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Time, LaneData) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
49 |
Medium |
org.opentrafficsim.kpi.sampling.TrajectoryGroup.getStartTime() may expose internal representation by returning TrajectoryGroup.startTime |
MALICIOUS_CODE |
EI_EXPOSE_REP |
89 |
Medium |
new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Time, Length, Length, LaneData) may expose internal representation by storing an externally mutable object into TrajectoryGroup.endPosition |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
70 |
Medium |
new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Time, Length, Length, LaneData) may expose internal representation by storing an externally mutable object into TrajectoryGroup.startPosition |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
69 |
Medium |
new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Time, Length, Length, LaneData) may expose internal representation by storing an externally mutable object into TrajectoryGroup.startTime |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
68 |
Medium |
org.opentrafficsim.kpi.sampling.data.ExtendedDataDuration
Bug |
Category |
Details |
Line |
Priority |
Boxing/unboxing to parse a primitive org.opentrafficsim.kpi.sampling.data.ExtendedDataDuration.parseValue(String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
59 |
High |
org.opentrafficsim.kpi.sampling.data.ExtendedDataLength
Bug |
Category |
Details |
Line |
Priority |
Boxing/unboxing to parse a primitive org.opentrafficsim.kpi.sampling.data.ExtendedDataLength.parseValue(String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
59 |
High |
org.opentrafficsim.kpi.sampling.data.ExtendedDataSpeed
Bug |
Category |
Details |
Line |
Priority |
Boxing/unboxing to parse a primitive org.opentrafficsim.kpi.sampling.data.ExtendedDataSpeed.parseValue(String) |
PERFORMANCE |
DM_BOXED_PRIMITIVE_FOR_PARSING |
58 |
High |
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator.getValue(Query, Time, Time, List) may expose internal representation by returning AbstractIndicator.lastValue |
MALICIOUS_CODE |
EI_EXPOSE_REP |
77 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator.getValue(Query, Time, Time, List) may expose internal representation by storing an externally mutable object into AbstractIndicator.lastEndTime |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
74 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator.getValue(Query, Time, Time, List) may expose internal representation by storing an externally mutable object into AbstractIndicator.lastQuery |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
72 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator.getValue(Query, Time, Time, List) may expose internal representation by storing an externally mutable object into AbstractIndicator.lastStartTime |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
73 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval.getLowerValue() may expose internal representation by returning ConfidenceInterval.lowerValue |
MALICIOUS_CODE |
EI_EXPOSE_REP |
40 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval.getUpperValue() may expose internal representation by returning ConfidenceInterval.upperValue |
MALICIOUS_CODE |
EI_EXPOSE_REP |
48 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.Persistent
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.indicator.Persistent.getMax() may expose internal representation by returning Persistent.max |
MALICIOUS_CODE |
EI_EXPOSE_REP |
175 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.Persistent.getMin() may expose internal representation by returning Persistent.min |
MALICIOUS_CODE |
EI_EXPOSE_REP |
167 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.Persistent.getSum() may expose internal representation by returning Persistent.sum |
MALICIOUS_CODE |
EI_EXPOSE_REP |
238 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.TotalDelay
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.kpi.sampling.indicator.TotalDelay(Speed) may expose internal representation by storing an externally mutable object into TotalDelay.referenceSpeed |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
36 |
Medium |
org.opentrafficsim.kpi.sampling.indicator.TotalDelayReference
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.kpi.sampling.indicator.TotalDelayReference.calculate(Query, Time, Time, List) makes inefficient use of keySet iterator instead of entrySet iterator |
PERFORMANCE |
WMI_WRONG_MAP_ITERATOR |
100 |
Medium |
org.opentrafficsim.kpi.sampling.meta.FilterDataSet
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.kpi.sampling.meta.FilterDataSet at new org.opentrafficsim.kpi.sampling.meta.FilterDataSet(FilterDataSet) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
44 |
Medium |