SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.9.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
55 52 0 0

Files

Class Bugs
org.opentrafficsim.kpi.sampling.CrossSection 2
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 7
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 37 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 50 Medium

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 98 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 105 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 41 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 129 Medium
org.opentrafficsim.kpi.sampling.Query.getSampler() may expose internal representation by returning Query.sampler MALICIOUS_CODE EI_EXPOSE_REP 339 Medium
org.opentrafficsim.kpi.sampling.Query.getUpdateFrequency() may expose internal representation by returning Query.updateFrequency MALICIOUS_CODE EI_EXPOSE_REP 120 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 96 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 91 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 95 Medium
org.opentrafficsim.kpi.sampling.Query.getTrajectoryGroups(Duration, Duration) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 280 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, Duration, Duration) 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, Duration, Duration) 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, Duration, Duration) 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, Duration, Duration) 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(Duration, 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 62 Medium
Exception thrown in class org.opentrafficsim.kpi.sampling.TrajectoryGroup at new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Duration, 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 90 Medium
new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Duration, Length, Length, LaneData) may expose internal representation by storing an externally mutable object into TrajectoryGroup.endPosition MALICIOUS_CODE EI_EXPOSE_REP2 71 Medium
new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Duration, Length, Length, LaneData) may expose internal representation by storing an externally mutable object into TrajectoryGroup.startPosition MALICIOUS_CODE EI_EXPOSE_REP2 70 Medium
new org.opentrafficsim.kpi.sampling.TrajectoryGroup(Duration, Length, Length, LaneData) may expose internal representation by storing an externally mutable object into TrajectoryGroup.startTime MALICIOUS_CODE EI_EXPOSE_REP2 69 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, Duration, Duration, List) may expose internal representation by returning AbstractIndicator.lastValue MALICIOUS_CODE EI_EXPOSE_REP 85 Medium
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator.getValue(Query, Duration, Duration, List) may expose internal representation by storing an externally mutable object into AbstractIndicator.lastEndTime MALICIOUS_CODE EI_EXPOSE_REP2 82 Medium
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator.getValue(Query, Duration, Duration, List) may expose internal representation by storing an externally mutable object into AbstractIndicator.lastQuery MALICIOUS_CODE EI_EXPOSE_REP2 80 Medium
org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator.getValue(Query, Duration, Duration, List) may expose internal representation by storing an externally mutable object into AbstractIndicator.lastStartTime MALICIOUS_CODE EI_EXPOSE_REP2 81 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
Operation on the "mean" shared variable in "Persistent" class is not atomic MT_CORRECTNESS AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE 69 Medium
Operation on the "n" shared variable in "Persistent" class is not atomic MT_CORRECTNESS AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE 72 Medium
Operation on the "varianceSum" shared variable in "Persistent" class is not atomic MT_CORRECTNESS AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE 70 Medium
Operation on the "weightSum" shared variable in "Persistent" class is not atomic MT_CORRECTNESS AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE 71 Medium
org.opentrafficsim.kpi.sampling.indicator.Persistent.getMax() may expose internal representation by returning Persistent.max MALICIOUS_CODE EI_EXPOSE_REP 181 Medium
org.opentrafficsim.kpi.sampling.indicator.Persistent.getMin() may expose internal representation by returning Persistent.min MALICIOUS_CODE EI_EXPOSE_REP 172 Medium
org.opentrafficsim.kpi.sampling.indicator.Persistent.getSum() may expose internal representation by returning Persistent.sum MALICIOUS_CODE EI_EXPOSE_REP 250 Medium

org.opentrafficsim.kpi.sampling.indicator.TotalDelayReference

Bug Category Details Line Priority
org.opentrafficsim.kpi.sampling.indicator.TotalDelayReference.calculate(Query, Duration, Duration, List) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 90 Medium