Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita7a1f39

Browse files
minor
1 parenta226ed1 commita7a1f39

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

‎utbot-framework/src/main/kotlin/org/utbot/framework/concrete/UtFuzzingExecutionInstrumentation.kt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
packageorg.utbot.framework.concrete
22

3+
importorg.objectweb.asm.Type
34
importorg.utbot.framework.concrete.constructors.ConstructOnlyUserClassesOrCachedObjectsStrategy
45
importorg.utbot.framework.concrete.mock.InstrumentationContext
56
importorg.utbot.framework.concrete.phases.PhaseError
@@ -62,7 +63,7 @@ object UtFuzzingExecutionInstrumentation : UtExecutionInstrumentationWithStatsCo
6263

6364
// statistics collection
6465
val coverage= statisticsCollectionContext.start { getCoverage(clazz) }.toLocalCoverage(traceHandler)
65-
val classJVMName=clazz.name.replace('.','/')
66+
val classJVMName=Type.getInternalName(clazz)
6667
val methodInstructions=
6768
traceHandler.processingStorage.getMethodInstructions(classJVMName, methodSignature)
6869

@@ -140,7 +141,7 @@ object UtFuzzingExecutionInstrumentationWithStateAfterCollection : UtExecutionIn
140141

141142
// statistics collection
142143
val coverage= statisticsCollectionContext.start { getCoverage(clazz) }.toLocalCoverage(traceHandler)
143-
val classJVMName=clazz.name.replace('.','/')
144+
val classJVMName=Type.getInternalName(clazz)
144145
val methodInstructions=
145146
traceHandler.processingStorage.getMethodInstructions(classJVMName, methodSignature)
146147

‎utbot-greyboxfuzzer/src/main/kotlin/org/utbot/greyboxfuzzer/GreyBoxFuzzer.kt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package org.utbot.greyboxfuzzer
33
importkotlinx.coroutines.flow.FlowCollector
44
importkotlinx.coroutines.flow.flow
55
importmu.KotlinLogging
6+
importorg.objectweb.asm.Type
67
importorg.utbot.framework.plugin.api.*
78
importorg.utbot.framework.plugin.api.util.isConstructor
89
importorg.utbot.framework.plugin.api.util.isStatic
@@ -242,7 +243,7 @@ class GreyBoxFuzzer(
242243
):Set<Instruction> {
243244
val currentMethodCoverage= coverage.coveredInstructions
244245
.asSequence()
245-
.filter { it.className== methodUnderTest.classId.name.replace('.','/') }
246+
.filter { it.className==Type.getInternalName(methodUnderTest.classId.jClass) }
246247
.filter { it.methodSignature== methodUnderTest.signature }
247248
// .map { it.id }
248249
//.filter { it in methodInstructionsIds!! }
@@ -256,7 +257,7 @@ class GreyBoxFuzzer(
256257
methodInstructions?:returnfalse
257258
val coveredInstructions=
258259
CoverageCollector.coverage
259-
.filter { it.className== methodUnderTest.classId.name.replace('.','/') }
260+
.filter { it.className==Type.getInternalName(methodUnderTest.classId.jClass) }
260261
.filter { it.methodSignature== methodUnderTest.signature }
261262
.toSet()
262263
return coveredInstructions.containsAll(methodInstructions!!)

‎utbot-greyboxfuzzer/src/main/kotlin/org/utbot/greyboxfuzzer/util/GreyBoxFuzzingStatisticPrinter.kt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
packageorg.utbot.greyboxfuzzer.util
22

3+
importorg.objectweb.asm.Type
34
importorg.utbot.framework.plugin.api.ExecutableId
45
importorg.utbot.framework.plugin.api.UtExecution
6+
importorg.utbot.framework.plugin.api.util.jClass
57

68
object GreyBoxFuzzingStatisticPrinter {
79

@@ -16,7 +18,7 @@ object GreyBoxFuzzingStatisticPrinter {
1618
for ((method, instructions)in methodsToInstructionsNumbers) {
1719
val coveredMethodInstructions=CoverageCollector.coverage
1820
.asSequence()
19-
.filter { it.className== method.classId.name.replace('.','/') }
21+
.filter { it.className==Type.getInternalName(method.classId.jClass) }
2022
.filter { it.methodSignature== method.signature }
2123
.toSet()
2224
val coveredMethodLines= coveredMethodInstructions.map { it.lineNumber }.toSet()

‎utbot-junit-contest/src/main/kotlin/org/utbot/contest/GreyBoxFuzzerContest.kt‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ class GreyBoxFuzzerContest {
105105
var testsCounter=0
106106
for (testin testSet) {
107107
val method= test.method
108-
val statsForMethod=StatsForMethod(
109-
"${method.classId.simpleName}#${method.name}#${method.signature}",
110-
Type.getInternalName(method.classId.jClass)
111-
)
108+
val statsForMethod=StatsForMethod("${method.classId.simpleName}#${method.name}")
112109
statsForClass.statsForMethods.add(statsForMethod)
113110
for (resultin test.executions) {
114111
try {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp