The following document contains the results of SpotBugs
SpotBugs Version is 4.7.1
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
305 | 163 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.compatibility.GtuCompatibleInfraType.getGtuCompatibility() may expose internal representation by returning GtuCompatibleInfraType.gtuCompatibility | MALICIOUS_CODE | EI_EXPOSE_REP | 114 | Medium |
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 | 47 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 164 | Medium |
Class org.opentrafficsim.core.dsol.OtsDevsRealTimeParallelMove defines non-transient non-serializable instance field executor | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 180 | Medium |
Class org.opentrafficsim.core.dsol.OtsLoggingAnimator defines non-transient non-serializable instance field animationThread | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.dsol.OtsReplication.getStartTimeAbs() may expose internal representation by returning OtsReplication.startTimeAbs | MALICIOUS_CODE | EI_EXPOSE_REP | 72 | 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 | 39 | Medium |
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 | 670 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.core.egtf.Egtf$DualWeightedMean be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1076-1152 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.opentrafficsim.core.egtf.Egtf$WeightedMean be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 1161-1193 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.egtf.FilterDouble.getLocation() may expose internal representation by returning FilterDouble.location | MALICIOUS_CODE | EI_EXPOSE_REP | 43 | Medium |
org.opentrafficsim.core.egtf.FilterDouble.getTime() may expose internal representation by returning FilterDouble.time | MALICIOUS_CODE | EI_EXPOSE_REP | 50 | Medium |
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 | 57 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeIterator is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 273-317 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.Ots2dSet$QuadTreeNode is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 331-757 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.OtsLine3d.getLength() may expose internal representation by returning OtsLine3d.length | MALICIOUS_CODE | EI_EXPOSE_REP | 902 | Medium |
org.opentrafficsim.core.geometry.OtsLine3d.getPoints() may expose internal representation by returning OtsLine3d.points | MALICIOUS_CODE | EI_EXPOSE_REP | 911 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 619 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 645 | Medium |
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 979 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Using floating-point loop counters can lead to unexpected behavior. | CORRECTNESS | FL_FLOATS_AS_LOOP_COUNTERS | 139 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.geometry.OtsShape.getShape() may expose internal representation by returning OtsShape.shape | MALICIOUS_CODE | EI_EXPOSE_REP | 106 | Medium |
org.opentrafficsim.core.geometry.OtsShape doesn't override OtsLine3d.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.Gtu.getAcceleration(Time) may expose internal representation by returning Gtu.cachedAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 735 | Medium |
org.opentrafficsim.core.gtu.Gtu.getLength() may expose internal representation by returning Gtu.length | MALICIOUS_CODE | EI_EXPOSE_REP | 316 | Medium |
org.opentrafficsim.core.gtu.Gtu.getMaximumAcceleration() may expose internal representation by returning Gtu.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 744 | Medium |
org.opentrafficsim.core.gtu.Gtu.getMaximumDeceleration() may expose internal representation by returning Gtu.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 764 | Medium |
org.opentrafficsim.core.gtu.Gtu.getMaximumSpeed() may expose internal representation by returning Gtu.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 328 | Medium |
org.opentrafficsim.core.gtu.Gtu.getParameters() may expose internal representation by returning Gtu.parameters | MALICIOUS_CODE | EI_EXPOSE_REP | 532 | Medium |
org.opentrafficsim.core.gtu.Gtu.getParent() may expose internal representation by returning Gtu.parent | MALICIOUS_CODE | EI_EXPOSE_REP | 945 | Medium |
org.opentrafficsim.core.gtu.Gtu.getPerceivableContext() may expose internal representation by returning Gtu.perceivableContext | MALICIOUS_CODE | EI_EXPOSE_REP | 897 | Medium |
org.opentrafficsim.core.gtu.Gtu.getSpeed(Time) may expose internal representation by returning Gtu.cachedSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 680 | Medium |
org.opentrafficsim.core.gtu.Gtu.getType() may expose internal representation by returning Gtu.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP | 514 | Medium |
org.opentrafficsim.core.gtu.Gtu.getWidth() may expose internal representation by returning Gtu.width | MALICIOUS_CODE | EI_EXPOSE_REP | 322 | Medium |
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 218 | Medium |
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.length | MALICIOUS_CODE | EI_EXPOSE_REP2 | 207 | Medium |
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 213 | Medium |
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.perceivableContext | MALICIOUS_CODE | EI_EXPOSE_REP2 | 221 | Medium |
new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) may expose internal representation by storing an externally mutable object into Gtu.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 208 | Medium |
org.opentrafficsim.core.gtu.Gtu.setMaximumAcceleration(Acceleration) may expose internal representation by storing an externally mutable object into Gtu.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 756 | Medium |
org.opentrafficsim.core.gtu.Gtu.setMaximumDeceleration(Acceleration) may expose internal representation by storing an externally mutable object into Gtu.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP2 | 778 | Medium |
org.opentrafficsim.core.gtu.Gtu.setParameters(Parameters) may expose internal representation by storing an externally mutable object into Gtu.parameters | MALICIOUS_CODE | EI_EXPOSE_REP2 | 538 | Medium |
org.opentrafficsim.core.gtu.Gtu.setParent(Gtu) may expose internal representation by storing an externally mutable object into Gtu.parent | MALICIOUS_CODE | EI_EXPOSE_REP2 | 936 | Medium |
Test for floating point equality in org.opentrafficsim.core.gtu.Gtu.move(DirectedPoint) | STYLE | FE_FLOATING_POINT_EQUALITY | 421 | Medium |
org.opentrafficsim.core.gtu.Gtu.ALIGN_COUNT should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | 133 | Medium |
org.opentrafficsim.core.gtu.Gtu.ALIGNED isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 129 | High |
org.opentrafficsim.core.gtu.Gtu.DESTROY_EVENT isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 1036 | High |
org.opentrafficsim.core.gtu.Gtu.MOVE_EVENT isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 1023 | High |
Exception is caught when Exception is not thrown in org.opentrafficsim.core.gtu.Gtu.move(DirectedPoint) | STYLE | REC_CATCH_EXCEPTION | 450 | Medium |
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field odometer | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field operationalPlan | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field strategicalPlanner | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field tacticalPlanner | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
Class org.opentrafficsim.core.gtu.Gtu defines non-transient non-serializable instance field errorHandler | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.odometer | BAD_PRACTICE | SE_BAD_FIELD_STORE | 220 | High |
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.operationalPlan | BAD_PRACTICE | SE_BAD_FIELD_STORE | 225 | High |
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.strategicalPlanner | BAD_PRACTICE | SE_BAD_FIELD_STORE | 223 | High |
org.opentrafficsim.core.perception.HistoricalValue stored into non-transient field Gtu.tacticalPlanner | BAD_PRACTICE | SE_BAD_FIELD_STORE | 224 | High |
Write to static field org.opentrafficsim.core.gtu.Gtu.staticUNIQUENUMBER from instance method new org.opentrafficsim.core.gtu.Gtu(String, GtuType, OtsSimulatorInterface, PerceivableContext, Length, Length, Speed, Length, Length) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 217 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.GtuCharacteristics.getFront() may expose internal representation by returning GtuCharacteristics.front | MALICIOUS_CODE | EI_EXPOSE_REP | 127 | Medium |
org.opentrafficsim.core.gtu.GtuCharacteristics.getGtuType() may expose internal representation by returning GtuCharacteristics.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP | 73 | Medium |
org.opentrafficsim.core.gtu.GtuCharacteristics.getLength() may expose internal representation by returning GtuCharacteristics.length | MALICIOUS_CODE | EI_EXPOSE_REP | 82 | Medium |
org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumAcceleration() may expose internal representation by returning GtuCharacteristics.maximumAcceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 109 | Medium |
org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumDeceleration() may expose internal representation by returning GtuCharacteristics.maximumDeceleration | MALICIOUS_CODE | EI_EXPOSE_REP | 118 | Medium |
org.opentrafficsim.core.gtu.GtuCharacteristics.getMaximumSpeed() may expose internal representation by returning GtuCharacteristics.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 100 | Medium |
org.opentrafficsim.core.gtu.GtuCharacteristics.getWidth() may expose internal representation by returning GtuCharacteristics.width | MALICIOUS_CODE | EI_EXPOSE_REP | 91 | 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 | 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.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 58 | 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 | 59 | 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 | 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.maximumDeceleration | 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.maximumSpeed | MALICIOUS_CODE | EI_EXPOSE_REP2 | 61 | 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 | 60 | Medium |
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 | 36 | High |
new org.opentrafficsim.core.gtu.GtuDumper(Time, Duration, Network, String) may expose internal representation by storing an externally mutable object into GtuDumper.interval | MALICIOUS_CODE | EI_EXPOSE_REP2 | 84 | Medium |
new org.opentrafficsim.core.gtu.GtuDumper(Time, Duration, Network, String) may expose internal representation by storing an externally mutable object into GtuDumper.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 85 | Medium |
Format string should use %n rather than \n in org.opentrafficsim.core.gtu.GtuDumper.dump() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 40 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.GtuTemplate.getGtuType() may expose internal representation by returning GtuTemplate.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP | 133 | Medium |
new org.opentrafficsim.core.gtu.GtuTemplate(GtuType, Generator, Generator, Generator, Generator, Generator) may expose internal representation by storing an externally mutable object into GtuTemplate.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 88 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.RelativePosition.getDx() may expose internal representation by returning RelativePosition.dx | MALICIOUS_CODE | EI_EXPOSE_REP | 94 | Medium |
org.opentrafficsim.core.gtu.RelativePosition.getDy() may expose internal representation by returning RelativePosition.dy | MALICIOUS_CODE | EI_EXPOSE_REP | 102 | Medium |
org.opentrafficsim.core.gtu.RelativePosition.getDz() may expose internal representation by returning RelativePosition.dz | MALICIOUS_CODE | EI_EXPOSE_REP | 110 | 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 | 68 | 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 | 69 | 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 | 70 | Medium |
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 | 53 | 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 | 45 | Medium |
org.opentrafficsim.core.gtu.perception.AbstractPerception.contains(Class) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 79 | Medium |
org.opentrafficsim.core.gtu.perception.AbstractPerception.getPerceptionCategoryOrNull(Class) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 115 | Medium |
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 | 48 | 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 | 38 | Medium |
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 | 221 | Medium |
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getOperationalPlanSegmentList() may expose internal representation by returning OperationalPlan.operationalPlanSegmentList | MALICIOUS_CODE | EI_EXPOSE_REP | 231 | Medium |
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getStartSpeed() may expose internal representation by returning OperationalPlan.startSpeed | MALICIOUS_CODE | EI_EXPOSE_REP | 213 | Medium |
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getStartTime() may expose internal representation by returning OperationalPlan.startTime | MALICIOUS_CODE | EI_EXPOSE_REP | 204 | Medium |
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalDuration() may expose internal representation by returning OperationalPlan.totalDuration | MALICIOUS_CODE | EI_EXPOSE_REP | 240 | Medium |
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan.getTotalLength() may expose internal representation by returning OperationalPlan.totalLength | MALICIOUS_CODE | EI_EXPOSE_REP | 249 | 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 | 160 | 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 | 161 | 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 | 164 | 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 | 105 | 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 | 108 | 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 | 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.startTime | MALICIOUS_CODE | EI_EXPOSE_REP2 | 106 | 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 | 606 | Medium |
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 | 882 | Medium |
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 | 760 | 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 | 744 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress is serializable and an inner class | BAD_PRACTICE | SE_INNER_CLASS | 316-353 | Medium |
Should org.opentrafficsim.core.gtu.plan.operational.OperationalPlan$SegmentProgress be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 316-353 | Medium |
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 | 1027 | Medium |
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 | 51 | Medium |
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 | 42 | Medium |
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 | 42 | Medium |
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 | 50 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.CapacityLink.getCapacity() may expose internal representation by returning CapacityLink.capacity | MALICIOUS_CODE | EI_EXPOSE_REP | 47 | Medium |
new org.opentrafficsim.core.network.CapacityLink(Network, String, Node, Node, LinkType, OtsLine3d, Frequency) may expose internal representation by storing an externally mutable object into CapacityLink.capacity | MALICIOUS_CODE | EI_EXPOSE_REP2 | 40 | Medium |
org.opentrafficsim.core.network.CapacityLink.setCapacity(Frequency) may expose internal representation by storing an externally mutable object into CapacityLink.capacity | MALICIOUS_CODE | EI_EXPOSE_REP2 | 54 | Medium |
org.opentrafficsim.core.network.CapacityLink doesn't override Link.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.Connector doesn't override Link.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.Link.getEndNode() may expose internal representation by returning Link.endNode | MALICIOUS_CODE | EI_EXPOSE_REP | 217 | Medium |
org.opentrafficsim.core.network.Link.getNetwork() may expose internal representation by returning Link.network | MALICIOUS_CODE | EI_EXPOSE_REP | 192 | Medium |
org.opentrafficsim.core.network.Link.getStartNode() may expose internal representation by returning Link.startNode | MALICIOUS_CODE | EI_EXPOSE_REP | 208 | Medium |
org.opentrafficsim.core.network.Link.getType() may expose internal representation by returning Link.linkType | MALICIOUS_CODE | EI_EXPOSE_REP | 224 | Medium |
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine3d) may expose internal representation by storing an externally mutable object into Link.endNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 111 | Medium |
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine3d) may expose internal representation by storing an externally mutable object into Link.linkType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 112 | Medium |
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine3d) may expose internal representation by storing an externally mutable object into Link.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 108 | Medium |
new org.opentrafficsim.core.network.Link(Network, String, Node, Node, LinkType, OtsLine3d) may expose internal representation by storing an externally mutable object into Link.startNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 110 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.LinkLocation.getLink() may expose internal representation by returning LinkLocation.link | MALICIOUS_CODE | EI_EXPOSE_REP | 55 | 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 | 36 | 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 | 46 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.LinkPosition.getLink() may expose internal representation by returning LinkPosition.link | MALICIOUS_CODE | EI_EXPOSE_REP | 57 | Medium |
new org.opentrafficsim.core.network.LinkPosition(Link, double) may expose internal representation by storing an externally mutable object into LinkPosition.link | MALICIOUS_CODE | EI_EXPOSE_REP2 | 37 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.Network.setRawRouteMap(Map) may expose internal representation by storing an externally mutable object into Network.routeMap | MALICIOUS_CODE | EI_EXPOSE_REP2 | 937 | Medium |
org.opentrafficsim.core.network.Network.getObjectMap(Class) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 392 | Medium |
org.opentrafficsim.core.network.Network.getRoute(String) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 691 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.network.Node.getHeading() may expose internal representation by returning Node.heading | MALICIOUS_CODE | EI_EXPOSE_REP | 157 | Medium |
org.opentrafficsim.core.network.Node.getNetwork() may expose internal representation by returning Node.network | MALICIOUS_CODE | EI_EXPOSE_REP | 125 | Medium |
new org.opentrafficsim.core.network.Node(Network, String, OtsPoint3d, Direction) may expose internal representation by storing an externally mutable object into Node.heading | MALICIOUS_CODE | EI_EXPOSE_REP2 | 101 | Medium |
new org.opentrafficsim.core.network.Node(Network, String, OtsPoint3d, Direction) may expose internal representation by storing an externally mutable object into Node.network | MALICIOUS_CODE | EI_EXPOSE_REP2 | 98 | Medium |
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 | 28-45 | High |
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 | 159 | Medium |
new org.opentrafficsim.core.network.route.Route(String, GtuType) may expose internal representation by storing an externally mutable object into Route.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 54 | Medium |
new org.opentrafficsim.core.network.route.Route(String, GtuType, List) may expose internal representation by storing an externally mutable object into Route.gtuType | MALICIOUS_CODE | EI_EXPOSE_REP2 | 71 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.opentrafficsim.core.object.StaticObject.getHeight() may expose internal representation by returning StaticObject.height | MALICIOUS_CODE | EI_EXPOSE_REP | 106 | Medium |
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 | 186 | Medium |
org.opentrafficsim.core.parameters.ParameterFactoryByType.setValues(Parameters, GtuType) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 92 | Medium |
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 | 452-492 | High |
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntry be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 452-492 | Medium |
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 | 507-546 | High |
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryDouble be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 507-546 | Medium |
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 | 561-600 | High |
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$DistributedEntryInteger be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 561-600 | Medium |
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 | 411-434 | High |
Should org.opentrafficsim.core.parameters.ParameterFactoryByType$FixedEntry be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 411-434 | Medium |
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 | 35 | Medium |
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 | 52 | 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 | 51 | Medium |
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 | 113 | Medium |
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 | 58 | Medium |
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 | 58 | Medium |