public abstract class DefUseExecutionTraceAnalyzer extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
timeGetCoveredGoals
Constant
timeGetCoveredGoals=0l |
| Constructor and Description |
|---|
DefUseExecutionTraceAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getActiveDefinitionIdAt(String targetVariable,
ExecutionTrace trace,
int usePos,
int objectId)
Returns the defID of the Definition that is active in the given trace at
usePos
|
static Object |
getActiveObjectAtDefinition(ExecutionTrace trace,
String targetVariable,
int objectId,
int usePos) |
static Object |
getActiveObjectAtUse(ExecutionTrace trace,
String targetVariable,
int objectId,
int usePos) |
static Set<DefUseCoverageTestFitness> |
getCoveredGoals(ExecutionResult result)
getCoveredGoals
|
static Set<DefUseCoverageTestFitness> |
getCoveredGoals(List<ExecutionResult> results)
getCoveredGoals
|
static List<Integer> |
getDefinitionPositions(Definition targetDefinition,
ExecutionTrace trace,
int objectId)
Returns all the duCounterPositions of the goalUse in the given trace
|
static Set<BytecodeInstruction> |
getDefinitionsIn(String targetVariable,
Set<BytecodeInstruction> vertices)
getDefinitionsIn
|
static int |
getNextOverwritingDefinitionPosition(Definition targetDefinition,
ExecutionTrace objectTrace,
Integer goalDefPos,
Integer objectId)
Determines the overwriting definition for the given goalDefPos
An overwriting definition position is the duCounter position of the next
definition for goalVariable that was not the goalDefinition
If no such definition exists Integer.MAX_VALUE is returned
|
static Map<Integer,Integer> |
getOverwritingDefinitionsBetween(Definition targetDefinition,
ExecutionTrace trace,
int startingDUPos,
int endDUPos,
int objectId)
Returns the a map of definitionIds from all definitions that overwrite
the goal definition in the given duCounter-range pointing to the duPos at
which they first overwrote.
|
static Set<BytecodeInstruction> |
getOverwritingDefinitionsIn(Definition targetDefinition,
Collection<BytecodeInstruction> vertices)
Returns a Set containing all elements in the given vertex set that are
overwriting definitions for the given targetDefinition
|
static int |
getPreviousDefinitionId(String targetVariable,
ExecutionTrace objectTrace,
Integer targetDUPos,
Integer objectId)
Determines the definitionId for targetVar before tagetDUPos in the given
ExecutionTrace
If no such definition exists -1 is returned
|
static List<Integer> |
getUsePositions(Use targetUse,
ExecutionTrace trace,
int objectId)
Returns all the duCounterPositions of the targetUse in the given trace
|
static boolean |
isOverwritingDefinition(Definition targetDefinition,
Definition definition)
Determines if the two given Definitions refer to the same variable but
are different
|
static void |
printFinishCalls(ExecutionTrace trace)
Prints all information found concerning finished calls of the given
ExecutionTrace
|
public static long timeGetCoveredGoals
timeGetCoveredGoals=0lpublic static int getPreviousDefinitionId(String targetVariable, ExecutionTrace objectTrace, Integer targetDUPos, Integer objectId)
targetVariable - a String object.objectTrace - a ExecutionTrace object.targetDUPos - a Integer object.objectId - a Integer object.public static int getNextOverwritingDefinitionPosition(Definition targetDefinition, ExecutionTrace objectTrace, Integer goalDefPos, Integer objectId)
targetDefinition - a Definition object.objectTrace - a ExecutionTrace object.goalDefPos - a Integer object.objectId - a Integer object.public static List<Integer> getUsePositions(Use targetUse, ExecutionTrace trace, int objectId)
targetUse - a Use object.trace - a ExecutionTrace object.objectId - a int.List object.public static List<Integer> getDefinitionPositions(Definition targetDefinition, ExecutionTrace trace, int objectId)
targetDefinition - a Definition object.trace - a ExecutionTrace object.objectId - a int.List object.public static Map<Integer,Integer> getOverwritingDefinitionsBetween(Definition targetDefinition, ExecutionTrace trace, int startingDUPos, int endDUPos, int objectId)
targetDefinition - a Definition object.trace - a ExecutionTrace object.startingDUPos - a int.endDUPos - a int.objectId - a int.Map object.public static Set<BytecodeInstruction> getDefinitionsIn(String targetVariable, Set<BytecodeInstruction> vertices)
getDefinitionsIn
public static Set<BytecodeInstruction> getOverwritingDefinitionsIn(Definition targetDefinition, Collection<BytecodeInstruction> vertices)
targetDefinition - a Definition object.vertices - a Collection object.Set object.public static boolean isOverwritingDefinition(Definition targetDefinition, Definition definition)
targetDefinition - a Definition object.definition - a Definition object.public static int getActiveDefinitionIdAt(String targetVariable, ExecutionTrace trace, int usePos, int objectId)
targetVariable - a String object.trace - a ExecutionTrace object.usePos - a int.objectId - a int.public static Object getActiveObjectAtDefinition(ExecutionTrace trace, String targetVariable, int objectId, int usePos)
public static Object getActiveObjectAtUse(ExecutionTrace trace, String targetVariable, int objectId, int usePos)
public static void printFinishCalls(ExecutionTrace trace)
trace - a ExecutionTrace object.public static Set<DefUseCoverageTestFitness> getCoveredGoals(List<ExecutionResult> results)
getCoveredGoals
public static Set<DefUseCoverageTestFitness> getCoveredGoals(ExecutionResult result)
getCoveredGoals
result - a ExecutionResult object.Set object.Copyright © 2010–2017 EvoSuite. All rights reserved.