1
1
package org.utbot.summary
2
2
3
- import org.utbot.framework.plugin.api.Step
4
- import org.utbot.framework.plugin.api.UtConcreteExecutionFailure
5
- import org.utbot.framework.plugin.api.UtSymbolicExecution
6
- import org.utbot.framework.plugin.api.UtExecutionResult
7
- import org.utbot.framework.plugin.api.UtExecutionSuccess
8
- import org.utbot.framework.plugin.api.UtExplicitlyThrownException
9
- import org.utbot.framework.plugin.api.UtImplicitlyThrownException
10
- import org.utbot.framework.plugin.api.UtOverflowFailure
11
- import org.utbot.framework.plugin.api.UtMethodTestSet
12
- import org.utbot.framework.plugin.api.UtSandboxFailure
13
- import org.utbot.framework.plugin.api.UtTimeoutException
3
+ import org.utbot.framework.plugin.api.*
14
4
import org.utbot.framework.plugin.api.util.humanReadableName
15
5
import org.utbot.framework.plugin.api.util.isCheckedException
6
+ import org.utbot.fuzzer.UtFuzzedExecution
16
7
import org.utbot.summary.UtSummarySettings.MIN_NUMBER_OF_EXECUTIONS_FOR_CLUSTERING
17
8
import org.utbot.summary.clustering.MatrixUniqueness
18
9
import org.utbot.summary.clustering.SplitSteps
@@ -28,7 +19,7 @@ class TagGenerator {
28
19
29
20
if (clusteredExecutions.isNotEmpty()) {
30
21
val listOfSplitSteps = clusteredExecutions.map {
31
- val mUniqueness = MatrixUniqueness (it.executions)
22
+ val mUniqueness = MatrixUniqueness (it.executions as List < UtSymbolicExecution > )
32
23
mUniqueness.splitSteps()
33
24
}
34
25
@@ -63,7 +54,7 @@ class TagGenerator {
63
54
traceTagClusters.add(
64
55
TraceTagCluster (
65
56
cluster.header,
66
- generateExecutionTags(cluster.executions, splitSteps),
57
+ generateExecutionTags(cluster.executions as List < UtSymbolicExecution > , splitSteps),
67
58
TraceTagWithoutExecution (
68
59
commonStepsInCluster.toList(),
69
60
cluster.executions.first().result,
@@ -131,7 +122,7 @@ fun groupExecutionsWithEmptyPaths(testSet: UtMethodTestSet): List<ExecutionClust
131
122
* @return clustered executions
132
123
*/
133
124
fun groupFuzzedExecutions (testSet : UtMethodTestSet ): List <ExecutionCluster > {
134
- val methodExecutions = testSet.executions.filterIsInstance<UtSymbolicExecution >()
125
+ val methodExecutions = testSet.executions.filterIsInstance<UtFuzzedExecution >()
135
126
val clusters = mutableListOf<ExecutionCluster >()
136
127
val commentPrefix = " FUZZER:"
137
128
val commentPostfix = " for method ${testSet.method.humanReadableName} "
@@ -202,7 +193,7 @@ private fun toClusterExecutions(testSet: UtMethodTestSet): List<ExecutionCluster
202
193
}
203
194
204
195
private fun addClustersOfFailedExecutions (
205
- grouped : Map <ExecutionGroup , List <UtSymbolicExecution >>,
196
+ grouped : Map <ExecutionGroup , List <UtExecution >>,
206
197
commentPrefix : String ,
207
198
commentPostfix : String
208
199
): List <FailedExecutionCluster > {
@@ -242,18 +233,18 @@ private fun UtExecutionResult.clusterKind() = when (this) {
242
233
/* *
243
234
* Structure used to represent execution cluster with header
244
235
*/
245
- sealed class ExecutionCluster (var header : String , val executions : List <UtSymbolicExecution >)
236
+ sealed class ExecutionCluster (var header : String , val executions : List <UtExecution >)
246
237
247
238
/* *
248
239
* Represents successful execution cluster
249
240
*/
250
- private class SuccessfulExecutionCluster (header : String , executions : List <UtSymbolicExecution >) :
241
+ private class SuccessfulExecutionCluster (header : String , executions : List <UtExecution >) :
251
242
ExecutionCluster (header, executions)
252
243
253
244
/* *
254
245
* Represents failed execution cluster
255
246
*/
256
- private class FailedExecutionCluster (header : String , executions : List <UtSymbolicExecution >) :
247
+ private class FailedExecutionCluster (header : String , executions : List <UtExecution >) :
257
248
ExecutionCluster (header, executions)
258
249
259
250
/* *
0 commit comments