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
313 152 0 0

Files

Class Bugs
org.opentrafficsim.core.compatibility.GTUCompatibility 2
org.opentrafficsim.core.distributions.Distribution 1
org.opentrafficsim.core.dsol.OTSDEVSRTParallelMove 3
org.opentrafficsim.core.dsol.OTSLoggingAnimator 2
org.opentrafficsim.core.dsol.OTSReplication 2
org.opentrafficsim.core.egtf.EGTF 1
org.opentrafficsim.core.egtf.EGTF$DualWeightedMean 1
org.opentrafficsim.core.egtf.EGTF$WeightedMean 1
org.opentrafficsim.core.egtf.FilterDouble 2
org.opentrafficsim.core.geometry.OTS2DSet 1
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeIterator 1
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeNode 1
org.opentrafficsim.core.geometry.OTSLine3D 6
org.opentrafficsim.core.geometry.OTSOffsetLinePK 1
org.opentrafficsim.core.geometry.OTSShape 2
org.opentrafficsim.core.gtu.AbstractGTU 17
org.opentrafficsim.core.gtu.AbstractLinkBasedGTU 3
org.opentrafficsim.core.gtu.GTUCharacteristics 12
org.opentrafficsim.core.gtu.GTUDumper 4
org.opentrafficsim.core.gtu.GTUType 3
org.opentrafficsim.core.gtu.RelativePosition 6
org.opentrafficsim.core.gtu.perception.AbstractPerception 4
org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory 2
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan 14
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$AccelerationSegment 1
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$Segment 2
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress 2
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SpeedSegment 1
org.opentrafficsim.core.math.Acceleration3D 1
org.opentrafficsim.core.math.Angle3D 1
org.opentrafficsim.core.math.Direction3D 1
org.opentrafficsim.core.math.Speed3D 1
org.opentrafficsim.core.network.CapacityOTSLink 4
org.opentrafficsim.core.network.DirectedLinkPosition 1
org.opentrafficsim.core.network.LinkDirection 2
org.opentrafficsim.core.network.LinkEdge 2
org.opentrafficsim.core.network.LinkLocation 3
org.opentrafficsim.core.network.LinkType 4
org.opentrafficsim.core.network.LinkType$ReversedLinkType 1
org.opentrafficsim.core.network.OTSLink 6
org.opentrafficsim.core.network.OTSNetwork 4
org.opentrafficsim.core.network.OTSNetworkUtils 1
org.opentrafficsim.core.network.OTSNode 3
org.opentrafficsim.core.network.route.FixedRouteGenerator 1
org.opentrafficsim.core.network.route.Route 1
org.opentrafficsim.core.object.StaticObject 1
org.opentrafficsim.core.parameters.ParameterFactoryByType 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger 2
org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry 2
org.opentrafficsim.core.perception.HistoricalParameters 1
org.opentrafficsim.core.perception.HistoryManagerDEVS 2
org.opentrafficsim.core.perception.collections.AbstractHistoricalList 1
org.opentrafficsim.core.units.distributions.AbstractContinuousDistScalar 1
org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar 1

org.opentrafficsim.core.compatibility.GTUCompatibility

Bug Category Details Line Priority
org.opentrafficsim.core.compatibility.GTUCompatibility.isCompatible(GTUType, GTUDirectionality) has Boolean return type and returns explicit null BAD_PRACTICE NP_BOOLEAN_RETURN_NULL 68 High
org.opentrafficsim.core.compatibility.GTUCompatibility.isCompatibleWith(Compatibility, boolean) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 175 Medium

org.opentrafficsim.core.distributions.Distribution

Bug Category Details Line Priority
Null passed for non-null parameter of java.util.List.addAll(Collection) in new org.opentrafficsim.core.distributions.Distribution(List, StreamInterface) CORRECTNESS NP_NULL_PARAM_DEREF 48 High

org.opentrafficsim.core.dsol.OTSDEVSRTParallelMove

Bug Category Details Line Priority
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 166 Medium
Class org.opentrafficsim.core.dsol.OTSDEVSRTParallelMove defines non-transient non-serializable instance field executor BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.core.dsol.OTSLoggingAnimator

Bug Category Details Line Priority
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 182 Medium
Class org.opentrafficsim.core.dsol.OTSLoggingAnimator defines non-transient non-serializable instance field animationThread BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.opentrafficsim.core.dsol.OTSReplication

Bug Category Details Line Priority
org.opentrafficsim.core.dsol.OTSReplication.getStartTimeAbs() may expose internal representation by returning OTSReplication.startTimeAbs MALICIOUS_CODE EI_EXPOSE_REP 74 Medium
new org.opentrafficsim.core.dsol.OTSReplication(String, Time, Duration, Duration) may expose internal representation by storing an externally mutable object into OTSReplication.startTimeAbs MALICIOUS_CODE EI_EXPOSE_REP2 41 Medium

org.opentrafficsim.core.egtf.EGTF

Bug Category Details Line Priority
Possible null pointer dereference of wMean in org.opentrafficsim.core.egtf.EGTF.filterSI(double[], double[], Quantity[]) CORRECTNESS NP_NULL_ON_SOME_PATH 663 Medium

org.opentrafficsim.core.egtf.EGTF$DualWeightedMean

Bug Category Details Line Priority
Should org.opentrafficsim.core.egtf.EGTF$DualWeightedMean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1067-1143 Medium

org.opentrafficsim.core.egtf.EGTF$WeightedMean

Bug Category Details Line Priority
Should org.opentrafficsim.core.egtf.EGTF$WeightedMean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 1152-1184 Medium

org.opentrafficsim.core.egtf.FilterDouble

Bug Category Details Line Priority
org.opentrafficsim.core.egtf.FilterDouble.getLocation() may expose internal representation by returning FilterDouble.location MALICIOUS_CODE EI_EXPOSE_REP 44 Medium
org.opentrafficsim.core.egtf.FilterDouble.getTime() may expose internal representation by returning FilterDouble.time MALICIOUS_CODE EI_EXPOSE_REP 51 Medium

org.opentrafficsim.core.geometry.OTS2DSet

Bug Category Details Line Priority
Possible null pointer dereference of boundingBox in new org.opentrafficsim.core.geometry.OTS2DSet(Rectangle2D, double) CORRECTNESS NP_NULL_ON_SOME_PATH 59 High

org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeIterator

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeIterator is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 275-319 Medium

org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeNode

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTS2DSet$QuadTreeNode is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 333-759 Medium

org.opentrafficsim.core.geometry.OTSLine3D

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTSLine3D.getEnvelope() may expose internal representation by returning OTSLine3D.envelope MALICIOUS_CODE EI_EXPOSE_REP 1819 Medium
org.opentrafficsim.core.geometry.OTSLine3D.getLength() may expose internal representation by returning OTSLine3D.length MALICIOUS_CODE EI_EXPOSE_REP 905 Medium
org.opentrafficsim.core.geometry.OTSLine3D.getPoints() may expose internal representation by returning OTSLine3D.points MALICIOUS_CODE EI_EXPOSE_REP 914 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 622 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 648 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 982 Medium

org.opentrafficsim.core.geometry.OTSOffsetLinePK

Bug Category Details Line Priority
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 140 Medium

org.opentrafficsim.core.geometry.OTSShape

Bug Category Details Line Priority
org.opentrafficsim.core.geometry.OTSShape.getShape() may expose internal representation by returning OTSShape.shape MALICIOUS_CODE EI_EXPOSE_REP 108 Medium
org.opentrafficsim.core.geometry.OTSShape doesn't override OTSLine3D.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.core.gtu.AbstractGTU

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.AbstractGTU.getAcceleration(Time) may expose internal representation by returning AbstractGTU.cachedAcceleration MALICIOUS_CODE EI_EXPOSE_REP 575 Medium
org.opentrafficsim.core.gtu.AbstractGTU.getMaximumAcceleration() may expose internal representation by returning AbstractGTU.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP 585 Medium
org.opentrafficsim.core.gtu.AbstractGTU.getMaximumDeceleration() may expose internal representation by returning AbstractGTU.maximumDeceleration MALICIOUS_CODE EI_EXPOSE_REP 606 Medium
org.opentrafficsim.core.gtu.AbstractGTU.getParameters() may expose internal representation by returning AbstractGTU.parameters MALICIOUS_CODE EI_EXPOSE_REP 406 Medium
org.opentrafficsim.core.gtu.AbstractGTU.getParent() may expose internal representation by returning AbstractGTU.parent MALICIOUS_CODE EI_EXPOSE_REP 710 Medium
org.opentrafficsim.core.gtu.AbstractGTU.getPerceivableContext() may expose internal representation by returning AbstractGTU.perceivableContext MALICIOUS_CODE EI_EXPOSE_REP 672 Medium
org.opentrafficsim.core.gtu.AbstractGTU.getSpeed(Time) may expose internal representation by returning AbstractGTU.cachedSpeed MALICIOUS_CODE EI_EXPOSE_REP 521 Medium
new org.opentrafficsim.core.gtu.AbstractGTU(String, GTUType, OTSSimulatorInterface, PerceivableContext) may expose internal representation by storing an externally mutable object into AbstractGTU.perceivableContext MALICIOUS_CODE EI_EXPOSE_REP2 156 Medium
org.opentrafficsim.core.gtu.AbstractGTU.setMaximumAcceleration(Acceleration) may expose internal representation by storing an externally mutable object into AbstractGTU.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP2 597 Medium
org.opentrafficsim.core.gtu.AbstractGTU.setMaximumDeceleration(Acceleration) may expose internal representation by storing an externally mutable object into AbstractGTU.maximumDeceleration MALICIOUS_CODE EI_EXPOSE_REP2 620 Medium
org.opentrafficsim.core.gtu.AbstractGTU.setParameters(Parameters) may expose internal representation by storing an externally mutable object into AbstractGTU.parameters MALICIOUS_CODE EI_EXPOSE_REP2 413 Medium
org.opentrafficsim.core.gtu.AbstractGTU.setParent(GTU) may expose internal representation by storing an externally mutable object into AbstractGTU.parent MALICIOUS_CODE EI_EXPOSE_REP2 703 Medium
Test for floating point equality in org.opentrafficsim.core.gtu.AbstractGTU.move(DirectedPoint) STYLE FE_FLOATING_POINT_EQUALITY 311 Medium
org.opentrafficsim.core.gtu.AbstractGTU.ALIGN_COUNT should be package protected MALICIOUS_CODE MS_PKGPROTECT 109 Medium
org.opentrafficsim.core.gtu.AbstractGTU.ALIGNED isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 105 High
Exception is caught when Exception is not thrown in org.opentrafficsim.core.gtu.AbstractGTU.move(DirectedPoint) STYLE REC_CATCH_EXCEPTION 341 Medium
Write to static field org.opentrafficsim.core.gtu.AbstractGTU.staticUNIQUENUMBER from instance method new org.opentrafficsim.core.gtu.AbstractGTU(String, GTUType, OTSSimulatorInterface, PerceivableContext) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 152 Medium

org.opentrafficsim.core.gtu.AbstractLinkBasedGTU

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.AbstractLinkBasedGTU.getNetwork() may expose internal representation by returning AbstractLinkBasedGTU.network MALICIOUS_CODE EI_EXPOSE_REP 42 Medium
new org.opentrafficsim.core.gtu.AbstractLinkBasedGTU(String, GTUType, OTSNetwork) may expose internal representation by storing an externally mutable object into AbstractLinkBasedGTU.network MALICIOUS_CODE EI_EXPOSE_REP2 34 Medium
org.opentrafficsim.core.gtu.AbstractLinkBasedGTU.setNetwork(OTSNetwork) may expose internal representation by storing an externally mutable object into AbstractLinkBasedGTU.network MALICIOUS_CODE EI_EXPOSE_REP2 50 Medium

org.opentrafficsim.core.gtu.GTUCharacteristics

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.GTUCharacteristics.getFront() may expose internal representation by returning GTUCharacteristics.front MALICIOUS_CODE EI_EXPOSE_REP 128 Medium
org.opentrafficsim.core.gtu.GTUCharacteristics.getLength() may expose internal representation by returning GTUCharacteristics.length MALICIOUS_CODE EI_EXPOSE_REP 83 Medium
org.opentrafficsim.core.gtu.GTUCharacteristics.getMaximumAcceleration() may expose internal representation by returning GTUCharacteristics.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP 110 Medium
org.opentrafficsim.core.gtu.GTUCharacteristics.getMaximumDeceleration() may expose internal representation by returning GTUCharacteristics.maximumDeceleration MALICIOUS_CODE EI_EXPOSE_REP 119 Medium
org.opentrafficsim.core.gtu.GTUCharacteristics.getMaximumSpeed() may expose internal representation by returning GTUCharacteristics.maximumSpeed MALICIOUS_CODE EI_EXPOSE_REP 101 Medium
org.opentrafficsim.core.gtu.GTUCharacteristics.getWidth() may expose internal representation by returning GTUCharacteristics.width MALICIOUS_CODE EI_EXPOSE_REP 92 Medium
new org.opentrafficsim.core.gtu.GTUCharacteristics(GTUType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GTUCharacteristics.front MALICIOUS_CODE EI_EXPOSE_REP2 65 Medium
new org.opentrafficsim.core.gtu.GTUCharacteristics(GTUType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GTUCharacteristics.length MALICIOUS_CODE EI_EXPOSE_REP2 60 Medium
new org.opentrafficsim.core.gtu.GTUCharacteristics(GTUType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GTUCharacteristics.maximumAcceleration MALICIOUS_CODE EI_EXPOSE_REP2 63 Medium
new org.opentrafficsim.core.gtu.GTUCharacteristics(GTUType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GTUCharacteristics.maximumDeceleration MALICIOUS_CODE EI_EXPOSE_REP2 64 Medium
new org.opentrafficsim.core.gtu.GTUCharacteristics(GTUType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GTUCharacteristics.maximumSpeed MALICIOUS_CODE EI_EXPOSE_REP2 62 Medium
new org.opentrafficsim.core.gtu.GTUCharacteristics(GTUType, Length, Length, Speed, Acceleration, Acceleration, Length) may expose internal representation by storing an externally mutable object into GTUCharacteristics.width MALICIOUS_CODE EI_EXPOSE_REP2 61 Medium

org.opentrafficsim.core.gtu.GTUDumper

Bug Category Details Line Priority
Found reliance on default encoding in org.opentrafficsim.core.gtu.GTUDumper.dump(): new java.io.PrintWriter(File) I18N DM_DEFAULT_ENCODING 37 High
new org.opentrafficsim.core.gtu.GTUDumper(Time, Duration, OTSNetwork, String) may expose internal representation by storing an externally mutable object into GTUDumper.interval MALICIOUS_CODE EI_EXPOSE_REP2 85 Medium
new org.opentrafficsim.core.gtu.GTUDumper(Time, Duration, OTSNetwork, String) may expose internal representation by storing an externally mutable object into GTUDumper.network MALICIOUS_CODE EI_EXPOSE_REP2 86 Medium
Format string should use %n rather than \n in org.opentrafficsim.core.gtu.GTUDumper.dump() BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 41 Medium

org.opentrafficsim.core.gtu.GTUType

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.GTUType.getNetwork() may expose internal representation by returning GTUType.network MALICIOUS_CODE EI_EXPOSE_REP 276 Medium
new org.opentrafficsim.core.gtu.GTUType(String, Network) may expose internal representation by storing an externally mutable object into GTUType.network MALICIOUS_CODE EI_EXPOSE_REP2 141 Medium
org.opentrafficsim.core.gtu.GTUType is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 131-283 High

org.opentrafficsim.core.gtu.RelativePosition

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.RelativePosition.getDx() may expose internal representation by returning RelativePosition.dx MALICIOUS_CODE EI_EXPOSE_REP 98 Medium
org.opentrafficsim.core.gtu.RelativePosition.getDy() may expose internal representation by returning RelativePosition.dy MALICIOUS_CODE EI_EXPOSE_REP 106 Medium
org.opentrafficsim.core.gtu.RelativePosition.getDz() may expose internal representation by returning RelativePosition.dz MALICIOUS_CODE EI_EXPOSE_REP 114 Medium
new org.opentrafficsim.core.gtu.RelativePosition(Length, Length, Length, RelativePosition$TYPE) may expose internal representation by storing an externally mutable object into RelativePosition.dx MALICIOUS_CODE EI_EXPOSE_REP2 72 Medium
new org.opentrafficsim.core.gtu.RelativePosition(Length, Length, Length, RelativePosition$TYPE) may expose internal representation by storing an externally mutable object into RelativePosition.dy MALICIOUS_CODE EI_EXPOSE_REP2 73 Medium
new org.opentrafficsim.core.gtu.RelativePosition(Length, Length, Length, RelativePosition$TYPE) may expose internal representation by storing an externally mutable object into RelativePosition.dz MALICIOUS_CODE EI_EXPOSE_REP2 74 Medium

org.opentrafficsim.core.gtu.perception.AbstractPerception

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.perception.AbstractPerception.getGtu() may expose internal representation by returning AbstractPerception.gtu MALICIOUS_CODE EI_EXPOSE_REP 54 Medium
new org.opentrafficsim.core.gtu.perception.AbstractPerception(GTU) may expose internal representation by storing an externally mutable object into AbstractPerception.gtu MALICIOUS_CODE EI_EXPOSE_REP2 46 Medium
org.opentrafficsim.core.gtu.perception.AbstractPerception.contains(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 80 Medium
org.opentrafficsim.core.gtu.perception.AbstractPerception.getPerceptionCategoryOrNull(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 116 Medium

org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory.getPerception() may expose internal representation by returning AbstractPerceptionCategory.perception MALICIOUS_CODE EI_EXPOSE_REP 49 Medium
new org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory(Perception) may expose internal representation by storing an externally mutable object into AbstractPerceptionCategory.perception MALICIOUS_CODE EI_EXPOSE_REP2 39 Medium

org.opentrafficsim.core.gtu.plan.operational.OperationalPlan

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getEndSpeed() may expose internal representation by returning OperationalPlan.endSpeed MALICIOUS_CODE EI_EXPOSE_REP 223 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getOperationalPlanSegmentList() may expose internal representation by returning OperationalPlan.operationalPlanSegmentList MALICIOUS_CODE EI_EXPOSE_REP 233 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getStartSpeed() may expose internal representation by returning OperationalPlan.startSpeed MALICIOUS_CODE EI_EXPOSE_REP 215 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getStartTime() may expose internal representation by returning OperationalPlan.startTime MALICIOUS_CODE EI_EXPOSE_REP 206 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalDuration() may expose internal representation by returning OperationalPlan.totalDuration MALICIOUS_CODE EI_EXPOSE_REP 242 Medium
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalLength() may expose internal representation by returning OperationalPlan.totalLength MALICIOUS_CODE EI_EXPOSE_REP 251 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(GTU, DirectedPoint, Time, Duration) may expose internal representation by storing an externally mutable object into OperationalPlan.gtu MALICIOUS_CODE EI_EXPOSE_REP2 162 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(GTU, DirectedPoint, Time, Duration) may expose internal representation by storing an externally mutable object into OperationalPlan.startTime MALICIOUS_CODE EI_EXPOSE_REP2 163 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(GTU, DirectedPoint, Time, Duration) may expose internal representation by storing an externally mutable object into OperationalPlan.totalDuration MALICIOUS_CODE EI_EXPOSE_REP2 166 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(GTU, OTSLine3D, Time, Speed, List) may expose internal representation by storing an externally mutable object into OperationalPlan.gtu MALICIOUS_CODE EI_EXPOSE_REP2 107 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(GTU, OTSLine3D, Time, Speed, List) may expose internal representation by storing an externally mutable object into OperationalPlan.operationalPlanSegmentList MALICIOUS_CODE EI_EXPOSE_REP2 110 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(GTU, OTSLine3D, Time, Speed, List) may expose internal representation by storing an externally mutable object into OperationalPlan.startSpeed MALICIOUS_CODE EI_EXPOSE_REP2 109 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan(GTU, OTSLine3D, Time, Speed, List) may expose internal representation by storing an externally mutable object into OperationalPlan.startTime MALICIOUS_CODE EI_EXPOSE_REP2 108 Medium
Redundant nullcheck of p, which is known to be non-null in org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.timeAtPoint(DirectedPoint, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 609 Medium

org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$AccelerationSegment

Bug Category Details Line Priority
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$AccelerationSegment(Duration, Acceleration) may expose internal representation by storing an externally mutable object into OperationalPlan$AccelerationSegment.acceleration MALICIOUS_CODE EI_EXPOSE_REP2 889 Medium

org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$Segment

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$Segment.getDuration() may expose internal representation by returning OperationalPlan$Segment.duration MALICIOUS_CODE EI_EXPOSE_REP 765 Medium
new org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$Segment(Duration) may expose internal representation by storing an externally mutable object into OperationalPlan$Segment.duration MALICIOUS_CODE EI_EXPOSE_REP2 749 Medium

org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 319-356 Medium
Should org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 319-356 Medium

org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SpeedSegment

Bug Category Details Line Priority
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SpeedSegment.getSpeed() may expose internal representation by returning OperationalPlan$Segment.v0 MALICIOUS_CODE EI_EXPOSE_REP 1036 Medium

org.opentrafficsim.core.math.Acceleration3D

Bug Category Details Line Priority
new org.opentrafficsim.core.math.Acceleration3D(AccelerationVector) may expose internal representation by storing an externally mutable object into Acceleration3D.acceleration MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium

org.opentrafficsim.core.math.Angle3D

Bug Category Details Line Priority
new org.opentrafficsim.core.math.Angle3D(AngleVector) may expose internal representation by storing an externally mutable object into Angle3D.rotation MALICIOUS_CODE EI_EXPOSE_REP2 44 Medium

org.opentrafficsim.core.math.Direction3D

Bug Category Details Line Priority
new org.opentrafficsim.core.math.Direction3D(DirectionVector) may expose internal representation by storing an externally mutable object into Direction3D.rotation MALICIOUS_CODE EI_EXPOSE_REP2 44 Medium

org.opentrafficsim.core.math.Speed3D

Bug Category Details Line Priority
new org.opentrafficsim.core.math.Speed3D(SpeedVector) may expose internal representation by storing an externally mutable object into Speed3D.speed MALICIOUS_CODE EI_EXPOSE_REP2 52 Medium

org.opentrafficsim.core.network.CapacityOTSLink

Bug Category Details Line Priority
org.opentrafficsim.core.network.CapacityOTSLink.getCapacity() may expose internal representation by returning CapacityOTSLink.capacity MALICIOUS_CODE EI_EXPOSE_REP 63 Medium
new org.opentrafficsim.core.network.CapacityOTSLink(Network, String, Node, Node, LinkType, OTSLine3D, Frequency) may expose internal representation by storing an externally mutable object into CapacityOTSLink.capacity MALICIOUS_CODE EI_EXPOSE_REP2 42 Medium
org.opentrafficsim.core.network.CapacityOTSLink.setCapacity(Frequency) may expose internal representation by storing an externally mutable object into CapacityOTSLink.capacity MALICIOUS_CODE EI_EXPOSE_REP2 70 Medium
org.opentrafficsim.core.network.CapacityOTSLink doesn't override OTSLink.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.core.network.DirectedLinkPosition

Bug Category Details Line Priority
org.opentrafficsim.core.network.DirectedLinkPosition doesn't override LinkDirection.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.core.network.LinkDirection

Bug Category Details Line Priority
org.opentrafficsim.core.network.LinkDirection.getLink() may expose internal representation by returning LinkDirection.link MALICIOUS_CODE EI_EXPOSE_REP 45 Medium
new org.opentrafficsim.core.network.LinkDirection(Link, GTUDirectionality) may expose internal representation by storing an externally mutable object into LinkDirection.link MALICIOUS_CODE EI_EXPOSE_REP2 36 Medium

org.opentrafficsim.core.network.LinkEdge

Bug Category Details Line Priority
org.opentrafficsim.core.network.LinkEdge.getLink() may expose internal representation by returning LinkEdge.link MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
new org.opentrafficsim.core.network.LinkEdge(Link) may expose internal representation by storing an externally mutable object into LinkEdge.link MALICIOUS_CODE EI_EXPOSE_REP2 39 Medium

org.opentrafficsim.core.network.LinkLocation

Bug Category Details Line Priority
org.opentrafficsim.core.network.LinkLocation.getLink() may expose internal representation by returning LinkLocation.link MALICIOUS_CODE EI_EXPOSE_REP 56 Medium
new org.opentrafficsim.core.network.LinkLocation(Link, double) may expose internal representation by storing an externally mutable object into LinkLocation.link MALICIOUS_CODE EI_EXPOSE_REP2 37 Medium
new org.opentrafficsim.core.network.LinkLocation(Link, Length) may expose internal representation by storing an externally mutable object into LinkLocation.link MALICIOUS_CODE EI_EXPOSE_REP2 47 Medium

org.opentrafficsim.core.network.LinkType

Bug Category Details Line Priority
org.opentrafficsim.core.network.LinkType.getNetwork() may expose internal representation by returning LinkType.network MALICIOUS_CODE EI_EXPOSE_REP 188 Medium
new org.opentrafficsim.core.network.LinkType(String, LinkType, GTUCompatibility, Network) may expose internal representation by storing an externally mutable object into LinkType.network MALICIOUS_CODE EI_EXPOSE_REP2 92 Medium
Class org.opentrafficsim.core.network.LinkType defines non-transient non-serializable instance field compatibility BAD_PRACTICE SE_BAD_FIELD Not available High
org.opentrafficsim.core.network.LinkType is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 25-203 High

org.opentrafficsim.core.network.LinkType$ReversedLinkType

Bug Category Details Line Priority
Should org.opentrafficsim.core.network.LinkType$ReversedLinkType be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 218-256 Medium

org.opentrafficsim.core.network.OTSLink

Bug Category Details Line Priority
org.opentrafficsim.core.network.OTSLink.getEndNode() may expose internal representation by returning OTSLink.endNode MALICIOUS_CODE EI_EXPOSE_REP 174 Medium
org.opentrafficsim.core.network.OTSLink.getNetwork() may expose internal representation by returning OTSLink.network MALICIOUS_CODE EI_EXPOSE_REP 153 Medium
org.opentrafficsim.core.network.OTSLink.getStartNode() may expose internal representation by returning OTSLink.startNode MALICIOUS_CODE EI_EXPOSE_REP 167 Medium
new org.opentrafficsim.core.network.OTSLink(Network, String, Node, Node, LinkType, OTSLine3D) may expose internal representation by storing an externally mutable object into OTSLink.endNode MALICIOUS_CODE EI_EXPOSE_REP2 81 Medium
new org.opentrafficsim.core.network.OTSLink(Network, String, Node, Node, LinkType, OTSLine3D) may expose internal representation by storing an externally mutable object into OTSLink.network MALICIOUS_CODE EI_EXPOSE_REP2 78 Medium
new org.opentrafficsim.core.network.OTSLink(Network, String, Node, Node, LinkType, OTSLine3D) may expose internal representation by storing an externally mutable object into OTSLink.startNode MALICIOUS_CODE EI_EXPOSE_REP2 80 Medium

org.opentrafficsim.core.network.OTSNetwork

Bug Category Details Line Priority
org.opentrafficsim.core.network.OTSNetwork.buildGraph(GTUType, LinkWeight) allocates an object, only to get the class object PERFORMANCE DM_NEW_FOR_GETCLASS 691 Medium
org.opentrafficsim.core.network.OTSNetwork.setRawRouteMap(Map) may expose internal representation by storing an externally mutable object into OTSNetwork.routeMap MALICIOUS_CODE EI_EXPOSE_REP2 862 Medium
org.opentrafficsim.core.network.OTSNetwork.getObjectMap(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 374 Medium
org.opentrafficsim.core.network.OTSNetwork.getRoute(String) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 627 Medium

org.opentrafficsim.core.network.OTSNetworkUtils

Bug Category Details Line Priority
Return value of OTSNode.clone1(Network) ignored, is this OK in org.opentrafficsim.core.network.OTSNetworkUtils.clone(OTSNetwork, String, OTSSimulatorInterface) STYLE RV_RETURN_VALUE_IGNORED_INFERRED 46 Medium

org.opentrafficsim.core.network.OTSNode

Bug Category Details Line Priority
org.opentrafficsim.core.network.OTSNode.getNetwork() may expose internal representation by returning OTSNode.network MALICIOUS_CODE EI_EXPOSE_REP 100 Medium
new org.opentrafficsim.core.network.OTSNode(Network, String, OTSPoint3D, double) may expose internal representation by storing an externally mutable object into OTSNode.network MALICIOUS_CODE EI_EXPOSE_REP2 88 Medium
org.opentrafficsim.core.network.OTSNode.clone2(Network) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 451 Medium

org.opentrafficsim.core.network.route.FixedRouteGenerator

Bug Category Details Line Priority
org.opentrafficsim.core.network.route.FixedRouteGenerator is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 29-46 High

org.opentrafficsim.core.network.route.Route

Bug Category Details Line Priority
org.opentrafficsim.core.network.route.Route.getNodes() may expose internal representation by returning Route.nodes MALICIOUS_CODE EI_EXPOSE_REP 130 Medium

org.opentrafficsim.core.object.StaticObject

Bug Category Details Line Priority
org.opentrafficsim.core.object.StaticObject.getHeight() may expose internal representation by returning StaticObject.height MALICIOUS_CODE EI_EXPOSE_REP 109 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType.setParameter(ParameterType, Object, Parameters, Map) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 187 Medium
org.opentrafficsim.core.parameters.ParameterFactoryByType.setValues(Parameters, GTUType) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 93 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 456-496 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 456-496 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 512-551 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 512-551 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 567-606 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 567-606 Medium

org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry

Bug Category Details Line Priority
org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry is serializable but also an inner class of a non-serializable class BAD_PRACTICE SE_BAD_FIELD_INNER_CLASS 414-437 High
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 414-437 Medium

org.opentrafficsim.core.perception.HistoricalParameters

Bug Category Details Line Priority
new org.opentrafficsim.core.perception.HistoricalParameters(HistoryManager, Parameters) may expose internal representation by storing an externally mutable object into HistoricalParameters.params MALICIOUS_CODE EI_EXPOSE_REP2 36 Medium

org.opentrafficsim.core.perception.HistoryManagerDEVS

Bug Category Details Line Priority
new org.opentrafficsim.core.perception.HistoryManagerDEVS(OTSSimulatorInterface, Duration, Duration) may expose internal representation by storing an externally mutable object into HistoryManagerDEVS.cleanUpInterval MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium
new org.opentrafficsim.core.perception.HistoryManagerDEVS(OTSSimulatorInterface, Duration, Duration) may expose internal representation by storing an externally mutable object into HistoryManagerDEVS.history MALICIOUS_CODE EI_EXPOSE_REP2 52 Medium

org.opentrafficsim.core.perception.collections.AbstractHistoricalList

Bug Category Details Line Priority
org.opentrafficsim.core.perception.collections.AbstractHistoricalList.get(int) is unsynchronized, org.opentrafficsim.core.perception.collections.AbstractHistoricalList.set(int, Object) is synchronized MT_CORRECTNESS UG_SYNC_SET_UNSYNC_GET 114 Medium

org.opentrafficsim.core.units.distributions.AbstractContinuousDistScalar

Bug Category Details Line Priority
org.opentrafficsim.core.units.distributions.AbstractContinuousDistScalar.getDistribution() may expose internal representation by returning AbstractContinuousDistScalar.distribution MALICIOUS_CODE EI_EXPOSE_REP 60 Medium

org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar

Bug Category Details Line Priority
org.opentrafficsim.core.units.distributions.AbstractDiscreteDistScalar.getDistribution() may expose internal representation by returning AbstractDiscreteDistScalar.distribution MALICIOUS_CODE EI_EXPOSE_REP 60 Medium