From dc3f81794217f95e1e9abd8bc43b692e45cd6043 Mon Sep 17 00:00:00 2001 From: Andrey Tarbeev <54685068+sofurihafe@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:49:42 +0300 Subject: [PATCH] Place thisInstance null check after timeout check --- .../kotlin/org/utbot/engine/UtBotSymbolicEngine.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt b/utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt index 9cd7d5247c..a213519fc0 100644 --- a/utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt +++ b/utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt @@ -433,12 +433,6 @@ class UtBotSymbolicEngine( names = names, providers = listOf(valueProviders), ) { thisInstance, descr, values -> - if (thisInstance?.model is UtNullModel) { - // We should not try to run concretely any models with null-this. - // But fuzzer does generate such values, because it can fail to generate any "good" values. - return@runJavaFuzzing BaseFeedback(Trie.emptyNode(), Control.PASS) - } - val diff = until - System.currentTimeMillis() val thresholdMillisForFuzzingOperation = 0 // may be better use 10-20 millis as it might not be possible // to concretely execute that values because request to instrumentation process involves @@ -452,6 +446,12 @@ class UtBotSymbolicEngine( return@runJavaFuzzing BaseFeedback(result = Trie.emptyNode(), control = Control.STOP) } + if (thisInstance?.model is UtNullModel) { + // We should not try to run concretely any models with null-this. + // But fuzzer does generate such values, because it can fail to generate any "good" values. + return@runJavaFuzzing BaseFeedback(Trie.emptyNode(), Control.PASS) + } + val stateBefore = EnvironmentModels(thisInstance?.model, values.map { it.model }, mapOf()) val concreteExecutionResult: UtConcreteExecutionResult? = try {