@@ -5,6 +5,7 @@ import org.utbot.common.PathUtil.fileExtension
55import org.utbot.common.PathUtil.toPath
66import org.utbot.framework.UtSettings
77import org.utbot.framework.plugin.api.*
8+ import org.utbot.instrumentation.process.InstrumentedProcessMain
89import java.nio.file.Path
910import kotlin.io.path.nameWithoutExtension
1011
@@ -234,7 +235,7 @@ class SarifReport(
234235 utExecution : UtExecution ,
235236 executionFailure : UtExecutionFailure
236237 ): List <SarifCodeFlow > {
237- val stackTraceResolved = filterStackTrace(method, utExecution, executionFailure)
238+ val stackTraceResolved = filterStackTrace(method, executionFailure)
238239 .mapNotNull { findStackTraceElementLocation(it) }
239240 .toMutableList()
240241
@@ -270,7 +271,6 @@ class SarifReport(
270271
271272 private fun filterStackTrace (
272273 method : ExecutableId ,
273- utExecution : UtExecution ,
274274 executionFailure : UtExecutionFailure
275275 ): List <StackTraceElement > {
276276 /* Example of a typical stack trace:
@@ -300,7 +300,9 @@ class SarifReport(
300300 }
301301
302302 val stackTraceFiltered = stackTrace.filter {
303- ! it.className.startsWith(" org.utbot." ) // filter all internal calls
303+ // filter all internal calls related to the instrumentation process
304+ val forbiddenPackage = InstrumentedProcessMain ::class .java.`package`.name
305+ ! it.className.startsWith(forbiddenPackage)
304306 }
305307
306308 return stackTraceFiltered
0 commit comments