diff options
4 files changed, 6 insertions, 0 deletions
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java index 0a5cd7fc..1ae09916 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java | |||
@@ -46,6 +46,7 @@ public class DesignSpaceExplorationAdapterImpl implements DesignSpaceExploration | |||
46 | private Map<Version, Version> parents = new HashMap<>(); | 46 | private Map<Version, Version> parents = new HashMap<>(); |
47 | private final List<Version> solutions = new ArrayList<>(); | 47 | private final List<Version> solutions = new ArrayList<>(); |
48 | private Map<Version, List<Activation>> statesAndTraversedActivations; | 48 | private Map<Version, List<Activation>> statesAndTraversedActivations; |
49 | @SuppressWarnings("squid:S2245") | ||
49 | private Random random = new Random(); | 50 | private Random random = new Random(); |
50 | private boolean isNewState = false; | 51 | private boolean isNewState = false; |
51 | private final boolean isVisualizationEnabled; | 52 | private final boolean isVisualizationEnabled; |
@@ -182,6 +183,7 @@ public class DesignSpaceExplorationAdapterImpl implements DesignSpaceExploration | |||
182 | } | 183 | } |
183 | 184 | ||
184 | @Override | 185 | @Override |
186 | @SuppressWarnings("squid:S2245") | ||
185 | public void setRandom(long seed) { | 187 | public void setRandom(long seed) { |
186 | this.random = new Random(seed); | 188 | this.random = new Random(seed); |
187 | } | 189 | } |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java index 8123c0d6..37117164 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java | |||
@@ -26,10 +26,12 @@ public class TransformationRule { | |||
26 | private Random random; | 26 | private Random random; |
27 | private ModelQueryAdapter queryEngine; | 27 | private ModelQueryAdapter queryEngine; |
28 | 28 | ||
29 | @SuppressWarnings("squid:S2245") | ||
29 | public TransformationRule(String name, RelationalQuery precondition, ActionFactory actionFactory) { | 30 | public TransformationRule(String name, RelationalQuery precondition, ActionFactory actionFactory) { |
30 | this(name, precondition, actionFactory, new Random()); | 31 | this(name, precondition, actionFactory, new Random()); |
31 | } | 32 | } |
32 | 33 | ||
34 | @SuppressWarnings("squid:S2245") | ||
33 | public TransformationRule(String name, RelationalQuery precondition, ActionFactory actionFactory, long seed) { | 35 | public TransformationRule(String name, RelationalQuery precondition, ActionFactory actionFactory, long seed) { |
34 | this(name, precondition, actionFactory, new Random(seed)); | 36 | this(name, precondition, actionFactory, new Random(seed)); |
35 | } | 37 | } |
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java index 327d5e2f..cdd1754f 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java | |||
@@ -22,6 +22,7 @@ import java.util.Random; | |||
22 | public class AlwaysSatisfiedRandomHardObjective extends BaseObjective { | 22 | public class AlwaysSatisfiedRandomHardObjective extends BaseObjective { |
23 | 23 | ||
24 | private static final String DEFAULT_NAME = "AlwaysSatisfiedDummyHardObjective"; | 24 | private static final String DEFAULT_NAME = "AlwaysSatisfiedDummyHardObjective"; |
25 | @SuppressWarnings("squid:S2245") | ||
25 | private static final Random random = new Random(0); | 26 | private static final Random random = new Random(0); |
26 | 27 | ||
27 | public AlwaysSatisfiedRandomHardObjective() { | 28 | public AlwaysSatisfiedRandomHardObjective() { |
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java b/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java index 531969b4..e60ae4b7 100644 --- a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java +++ b/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java | |||
@@ -220,6 +220,7 @@ public class ModelVisualizerAdapterImpl implements ModelVisualizerAdapter { | |||
220 | } | 220 | } |
221 | 221 | ||
222 | private Integer[] typeColor(String name) { | 222 | private Integer[] typeColor(String name) { |
223 | @SuppressWarnings("squid:S2245") | ||
223 | var random = new Random(name.hashCode()); | 224 | var random = new Random(name.hashCode()); |
224 | return new Integer[] { random.nextInt(128) + 128, random.nextInt(128) + 128, random.nextInt(128) + 128 }; | 225 | return new Integer[] { random.nextInt(128) + 128, random.nextInt(128) + 128, random.nextInt(128) + 128 }; |
225 | } | 226 | } |