SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
51 36 0 0

Files

Class Bugs
org.opentrafficsim.kpi.sampling.LanePosition 3
org.opentrafficsim.kpi.sampling.Query 5
org.opentrafficsim.kpi.sampling.Sampler 1
org.opentrafficsim.kpi.sampling.SpaceTimeRegion 8
org.opentrafficsim.kpi.sampling.Trajectory 1
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView 2
org.opentrafficsim.kpi.sampling.TrajectoryGroup 4
org.opentrafficsim.kpi.sampling.data.ExtendedDataDuration 1
org.opentrafficsim.kpi.sampling.data.ExtendedDataLength 1
org.opentrafficsim.kpi.sampling.data.ExtendedDataSpeed 1
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator 3
org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval 2
org.opentrafficsim.kpi.sampling.indicator.Persistent 3
org.opentrafficsim.kpi.sampling.indicator.TotalDelay 1

org.opentrafficsim.kpi.sampling.LanePosition

Bug Category Details Line Priority
org.opentrafficsim.kpi.sampling.LanePosition.getPosition() may expose internal representation by returning LanePosition.position MALICIOUS_CODE EI_EXPOSE_REP 57 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 39 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.getEndPosition() may expose internal representation by returning SpaceTimeRegion.endPosition MALICIOUS_CODE EI_EXPOSE_REP 86 Medium
org.opentrafficsim.kpi.sampling.SpaceTimeRegion.getEndTime() may expose internal representation by returning SpaceTimeRegion.endTime MALICIOUS_CODE EI_EXPOSE_REP 104 Medium
org.opentrafficsim.kpi.sampling.SpaceTimeRegion.getStartPosition() may expose internal representation by returning SpaceTimeRegion.startPosition MALICIOUS_CODE EI_EXPOSE_REP 77 Medium
org.opentrafficsim.kpi.sampling.SpaceTimeRegion.getStartTime() may expose internal representation by returning SpaceTimeRegion.startTime MALICIOUS_CODE EI_EXPOSE_REP 95 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 57 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 59 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 56 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 58 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 800 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 1101 Medium
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView.getTime() may expose internal representation by returning Trajectory$SpaceTimeView.time MALICIOUS_CODE EI_EXPOSE_REP 1110 Medium

org.opentrafficsim.kpi.sampling.TrajectoryGroup

Bug Category Details Line Priority
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 61 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 61 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 61 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 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