File tree Expand file tree Collapse file tree
core/src/main/kotlin/org/evomaster/core/search/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,6 +152,9 @@ abstract class Sampler<T> : TrackOperator where T : Individual {
152152 val candidates = action.getNamedExamples()
153153 // we skip named examples that are used only once
154154 .filter { it.value >= 2 }
155+ if (candidates.isEmpty()){
156+ return
157+ }
155158
156159 if (inUse.any { it.value == candidates[it.key] }) {
157160 // one example is already fully covered
@@ -160,6 +163,7 @@ abstract class Sampler<T> : TrackOperator where T : Individual {
160163
161164 // we look at something already selected, with more than 1 occurrence, and not fully used yet
162165 val options = inUse.filter { candidates.contains(it.key) }
166+ assert (options.isNotEmpty())
163167
164168 val choice = randomness.choose(options.keys)
165169
You can’t perform that action at this time.
0 commit comments