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
55 49 0 0

Files

Class Bugs
org.opentrafficsim.kpi.sampling.CrossSection 3
org.opentrafficsim.kpi.sampling.CrossSection$LanePosition 2
org.opentrafficsim.kpi.sampling.DataType 1
org.opentrafficsim.kpi.sampling.Query 7
org.opentrafficsim.kpi.sampling.Sampler 1
org.opentrafficsim.kpi.sampling.SpaceTimeRegion 8
org.opentrafficsim.kpi.sampling.Trajectory 1
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView 4
org.opentrafficsim.kpi.sampling.TrajectoryGroup 6
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.filter.FilterDataSet 1
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator 4
org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval 4
org.opentrafficsim.kpi.sampling.indicator.Persistent 3
org.opentrafficsim.kpi.sampling.indicator.TotalDelayReference 1

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 41 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 54 Medium
Class org.opentrafficsim.kpi.sampling.CrossSection defines non-transient non-serializable instance field lanePositions BAD_PRACTICE SE_BAD_FIELD Not available High

org.opentrafficsim.kpi.sampling.CrossSection$LanePosition

Bug Category Details Line Priority
org.opentrafficsim.kpi.sampling.CrossSection$LanePosition.position() may expose internal representation by returning CrossSection$LanePosition.position MALICIOUS_CODE EI_EXPOSE_REP 102 Medium
new org.opentrafficsim.kpi.sampling.CrossSection$LanePosition(LaneData, Length) may expose internal representation by storing an externally mutable object into CrossSection$LanePosition.position MALICIOUS_CODE EI_EXPOSE_REP2 108 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.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 130 Medium
org.opentrafficsim.kpi.sampling.Query.getSampler() may expose internal representation by returning Query.sampler MALICIOUS_CODE EI_EXPOSE_REP 340 Medium
org.opentrafficsim.kpi.sampling.Query.getUpdateFrequency() may expose internal representation by returning Query.updateFrequency MALICIOUS_CODE EI_EXPOSE_REP 121 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 97 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.sampler MALICIOUS_CODE EI_EXPOSE_REP2 92 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 96 Medium
org.opentrafficsim.kpi.sampling.Query.getTrajectoryGroups(Time, Time) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 281 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 68 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 773 Medium

org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView

Bug Category Details Line Priority
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView.distance() may expose internal representation by returning Trajectory$SpaceTimeView.distance MALICIOUS_CODE EI_EXPOSE_REP 953 Medium
org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView.time() may expose internal representation by returning Trajectory$SpaceTimeView.time MALICIOUS_CODE EI_EXPOSE_REP 953 Medium
new org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView(Length, Duration) may expose internal representation by storing an externally mutable object into Trajectory$SpaceTimeView.distance MALICIOUS_CODE EI_EXPOSE_REP2 953 Medium
new org.opentrafficsim.kpi.sampling.Trajectory$SpaceTimeView(Length, Duration) may expose internal representation by storing an externally mutable object into Trajectory$SpaceTimeView.time MALICIOUS_CODE EI_EXPOSE_REP2 953 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 54 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 54 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 53 High

org.opentrafficsim.kpi.sampling.filter.FilterDataSet

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.kpi.sampling.filter.FilterDataSet at new org.opentrafficsim.kpi.sampling.filter.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 45 Medium

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 43 Medium
org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval.getUpperValue() may expose internal representation by returning ConfidenceInterval.upperValue MALICIOUS_CODE EI_EXPOSE_REP 52 Medium
new org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval(DoubleScalarRel, DoubleScalarRel) may expose internal representation by storing an externally mutable object into ConfidenceInterval.lowerValue MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium
new org.opentrafficsim.kpi.sampling.indicator.ConfidenceInterval(DoubleScalarRel, DoubleScalarRel) may expose internal representation by storing an externally mutable object into ConfidenceInterval.upperValue MALICIOUS_CODE EI_EXPOSE_REP2 34 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 176 Medium
org.opentrafficsim.kpi.sampling.indicator.Persistent.getMin() may expose internal representation by returning Persistent.min MALICIOUS_CODE EI_EXPOSE_REP 168 Medium
org.opentrafficsim.kpi.sampling.indicator.Persistent.getSum() may expose internal representation by returning Persistent.sum MALICIOUS_CODE EI_EXPOSE_REP 239 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 82 Medium