File tree Expand file tree Collapse file tree
core/src/main/kotlin/org/evomaster/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ abstract class HttpWsSampler<T> : ApiWsSampler<T>() where T : Individual{
3737 val action = randomness.choose(actionCluster).copy() as HttpWsAction
3838 action.doInitialize(randomness)
3939 action.auth = getRandomAuth(noAuthP)
40+ action.forceNewTaints()
4041 return action
4142 }
4243
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package org.evomaster.core.search.action
33import org.evomaster.core.search.Individual
44import org.evomaster.core.search.StructuralElement
55import org.evomaster.core.search.gene.Gene
6+ import org.evomaster.core.search.gene.interfaces.TaintableGene
67import org.evomaster.core.search.service.Randomness
78import org.slf4j.Logger
89import org.slf4j.LoggerFactory
@@ -76,6 +77,16 @@ abstract class Action(children: List<StructuralElement>) : ActionComponent(
7677 postRandomizedChecks(randomness)
7778 }
7879
80+ fun forceNewTaints (){
81+ seeTopGenes().forEach { g ->
82+ g.flatView().forEach { r ->
83+ if (r is TaintableGene && ! r.isDependentTaint()){
84+ r.forceNewTaintId()
85+ }
86+ }
87+ }
88+ }
89+
7990 fun isInitialized (): Boolean {
8091 return seeTopGenes().all { it.initialized }
8192 }
@@ -107,4 +118,4 @@ abstract class Action(children: List<StructuralElement>) : ActionComponent(
107118 * once an action is mounted inside an initialized individual
108119 */
109120 open fun resolveTempData () : Boolean = true
110- }
121+ }
You can’t perform that action at this time.
0 commit comments