public interface ExecutionTrace
| Modifier and Type | Method and Description |
|---|---|
void |
branchPassed(int branch,
int bytecode_id,
double true_distance,
double false_distance)
Add branch to currently active method call
|
void |
classInitialized(String classNameWithDots)
Logs that a
|
void |
clear()
Reset to 0
|
void |
definitionPassed(Object object,
Object caller,
int defID)
Adds Definition-Use-Coverage trace information for the given definition.
|
void |
enteredMethod(String className,
String methodName,
Object caller)
Add a new method call to stack
|
void |
exitMethod(String classname,
String methodname)
Pop last method call from stack
|
void |
finishCalls()
Finish all method calls.
|
Set<Integer> |
getAllCoveredLines()
Retrieve the set of all line numbers covered
|
List<ExecutionTraceImpl.BranchEval> |
getBranchesTrace()
getBranchesTrace
|
Set<String> |
getClassesWithStaticReads()
Retrieve a list of those classes that were affected by a GETSTATIC.
|
Set<String> |
getClassesWithStaticWrites()
Retrieve a list of those classes that were affected by a PUTSTATIC.
|
Map<String,Map<String,Map<Integer,Integer>>> |
getCoverageData()
Retrieve detailed line coverage count
|
Set<String> |
getCoveredBranchlessMethods()
Retrieve the names of all covered branchless methods
|
Set<Integer> |
getCoveredDefinitions()
Retrieve set of definitions that were executed
|
Set<Integer> |
getCoveredFalseBranches()
Retrieve set of branches that evaluated to false
|
Set<Integer> |
getCoveredLines()
Retrieve the set of line numbers covered of
Properties.TARGET_CLASS class |
Set<Integer> |
getCoveredLines(String className)
Retrieve the set of line numbers covered
|
Set<String> |
getCoveredMethods()
Retrieve the names of all called methods
|
Set<Integer> |
getCoveredPredicates()
Retrieve set of branches that were executed
|
Set<Integer> |
getCoveredTrueBranches()
Retrieve set of branches that evaluated to true
|
Map<String,HashMap<Integer,HashMap<Integer,Integer>>> |
getDefinitionData()
Retrieve data definitions
|
Map<String,HashMap<Integer,HashMap<Integer,Object>>> |
getDefinitionDataObjects()
Retrieve data definitions
|
Map<Integer,Integer> |
getDefinitionExecutionCount()
Retrieve execution counts for definitions
|
Throwable |
getExplicitException()
Retrieve the exception thrown in this trace
|
double |
getFalseDistance(int branchId)
Retrieve minimum branch distance to false branch
|
Map<Integer,Double> |
getFalseDistances()
Retrieve map of all minimal false distances
|
Map<Integer,Map<CallContext,Double>> |
getFalseDistancesContext()
Retrieve map of all minimal false distances
|
Map<Integer,Double> |
getFalseDistancesSum()
getFalseDistancesSum
|
Set<Integer> |
getInfectedMutants()
Retrieve IDs of all executed mutants with an infection distance == 0.0
|
List<String> |
getInitializedClasses()
Returns the list (with no repetitions) following the order in which the
|
List<MethodCall> |
getMethodCalls()
Retrieve all traced method calls
|
Map<String,Map<CallContext,Integer>> |
getMethodContextCount()
Retrieve map of all context method counts
|
Map<String,Integer> |
getMethodExecutionCount()
Retrieve execution counts for methods
|
double |
getMutationDistance(int mutationId)
Retrieve the minimum infection distance for a mutant
|
Map<Integer,Double> |
getMutationDistances()
Retrieve all minimal infection distances
|
Set<Integer> |
getPassedDefIDs()
Deprecated.
|
Map<Integer,HashMap<Integer,Integer>> |
getPassedDefinitions(String variableName)
Retrieve the data definitions for a given variable
|
Set<Integer> |
getPassedUseIDs()
Retrieve the set of all uses by id
|
Map<String,HashMap<Integer,HashMap<Integer,Integer>>> |
getPassedUses()
getPassedUses
|
Map<Integer,HashMap<Integer,Integer>> |
getPassedUses(String variableName)
Retrieve the data uses for a given variable
|
Map<Integer,Map<CallContext,Integer>> |
getPredicateContextExecutionCount()
Retrieve number of predicate executions
|
Map<Integer,Integer> |
getPredicateExecutionCount()
Retrieve execution counts for branches
|
Map<String,Map<String,Map<Integer,Integer>>> |
getReturnData()
Retrieve return value data
|
void |
getStaticPassed(String classNameWithDots,
String fieldName)
Record a GETSTATIC statement
|
Set<Integer> |
getTouchedMutants()
Retrieve IDs of all executed mutants
|
ExecutionTrace |
getTraceForObject(int objectId)
Returns a copy of this trace where all MethodCall-information traced from
objects other then the one identified by the given objectID is removed
from the finished_calls-field
WARNING: this will not affect this.true_distances and other fields of
ExecutionTrace this only affects the finished_calls field (which should
suffice for BranchCoverageFitness-calculation)
|
ExecutionTrace |
getTraceInDUCounterRange(DefUse targetDU,
boolean wantToCoverTargetDU,
int duCounterStart,
int duCounterEnd)
Returns a copy of this trace where all MethodCall-information associated
with duCounters outside the range of the given duCounter-Start and -End
is removed from the finished_calls-traces
finished_calls without any point in the trace at which the given
duCounter range is hit are removed completely
Also traces for methods other then the one that holds the given targetDU
are removed as well as trace information that would pass the branch of
the given targetDU If wantToCoverTargetDU is false instead those
targetDUBranch information is removed that would pass the alternative
branch of targetDU
The latter is because this method only gets called when the given
targetDU was not active in the given duCounter-range if and only if
wantToCoverTargetDU is set, and since useFitness calculation is on branch
level and the branch of the targetDU can be passed before the targetDU is
passed this can lead to a flawed branchFitness.
|
double |
getTrueDistance(int branchId)
Retrieve minimum branch distance to true branch
|
Map<Integer,Double> |
getTrueDistances()
Retrieve map of all minimal true distances
|
Map<Integer,Map<CallContext,Double>> |
getTrueDistancesContext()
Retrieve map of all minimal true distances
|
Map<Integer,Double> |
getTrueDistancesSum()
getTrueDistancesSum
|
Map<String,HashMap<Integer,HashMap<Integer,Integer>>> |
getUseData()
Retrieve data uses
|
Map<String,HashMap<Integer,HashMap<Integer,Object>>> |
getUseDataObjects()
Retrieve data uses
|
boolean |
hasFalseDistance(int predicateId)
Determine if a branch has a false distance stored
|
boolean |
hasTrueDistance(int predicateId)
Determine if a branch has a true distance stored
|
ExecutionTrace |
lazyClone()
Create a lazy copy
|
void |
linePassed(String className,
String methodName,
int line)
Add line to currently active method call
|
void |
mutationPassed(int mutationId,
double distance)
Record a mutant execution
|
void |
putStaticPassed(String classNameWithDots,
String fieldName)
Record a PUTSTATIC statement
|
void |
returnValue(String className,
String methodName,
int value)
Record a return value
|
void |
setExplicitException(Throwable explicitException)
Set the exception thrown in this trace
|
String |
toDefUseTraceInformation()
Returns a String containing the information in passedDefs and passedUses
Used for Definition-Use-Coverage-debugging
|
String |
toDefUseTraceInformation(String targetVar)
Returns a String containing the information in passedDefs and passedUses
filtered for a specific variable
Used for Definition-Use-Coverage-debugging
|
String |
toDefUseTraceInformation(String var,
int objectId)
Returns a String containing the information in passedDefs and passedUses
for the given variable
Used for Definition-Use-Coverage-debugging
|
void |
usePassed(Object object,
Object caller,
int useID)
Adds Definition-Use-Coverage trace information for the given use.
|
boolean |
wasMutationTouched(int mutationId)
Determine is a mutant was executed
|
void branchPassed(int branch,
int bytecode_id,
double true_distance,
double false_distance)
branch - a int.true_distance - a double.false_distance - a double.bytecode_id - a int.double getFalseDistance(int branchId)
branchId - a int.double getTrueDistance(int branchId)
branchId - a int.Set<Integer> getCoveredTrueBranches()
Set object.Set<Integer> getCoveredFalseBranches()
Set object.Set<Integer> getCoveredPredicates()
Set object.Set<Integer> getCoveredDefinitions()
Set object.Map<Integer,Integer> getPredicateExecutionCount()
Map object.Map<String,Integer> getMethodExecutionCount()
Map object.Map<Integer,Integer> getDefinitionExecutionCount()
Map object.boolean hasTrueDistance(int predicateId)
predicateId - a int.boolean hasFalseDistance(int predicateId)
predicateId - a int.Map<Integer,Double> getTrueDistances()
Map object.Map<Integer,Double> getFalseDistances()
Map object.Map<Integer,Map<CallContext,Double>> getTrueDistancesContext()
Map object.Map<Integer,Map<CallContext,Double>> getFalseDistancesContext()
Map object.Map<String,Map<CallContext,Integer>> getMethodContextCount()
Map object.Map<Integer,Map<CallContext,Integer>> getPredicateContextExecutionCount()
Map object.Set<Integer> getCoveredLines(String className)
Set<Integer> getCoveredLines()
Properties.TARGET_CLASS classSet object.Set<Integer> getAllCoveredLines()
Map<String,Map<String,Map<Integer,Integer>>> getCoverageData()
Map object.Map<String,Map<String,Map<Integer,Integer>>> getReturnData()
Map object.Map<String,HashMap<Integer,HashMap<Integer,Integer>>> getDefinitionData()
Map object.Map<String,HashMap<Integer,HashMap<Integer,Object>>> getDefinitionDataObjects()
Map object.Map<String,HashMap<Integer,HashMap<Integer,Integer>>> getUseData()
Map object.Map<String,HashMap<Integer,HashMap<Integer,Object>>> getUseDataObjects()
Map object.Map<Integer,HashMap<Integer,Integer>> getPassedDefinitions(String variableName)
Map<Integer,HashMap<Integer,Integer>> getPassedUses(String variableName)
Throwable getExplicitException()
Throwable object.List<MethodCall> getMethodCalls()
List object.Set<String> getCoveredMethods()
Set object.Set<String> getCoveredBranchlessMethods()
Set object.double getMutationDistance(int mutationId)
mutationId - a int.Map<Integer,Double> getMutationDistances()
Map object.boolean wasMutationTouched(int mutationId)
mutationId - a int.Set<Integer> getTouchedMutants()
Set object.Set<Integer> getInfectedMutants()
Set object.void clear()
void definitionPassed(Object object, Object caller, int defID)
caller - a Object object.defID - a int.void enteredMethod(String className, String methodName, Object caller)
void finishCalls()
ExecutionTrace getTraceForObject(int objectId)
objectId - a int.ExecutionTrace object.ExecutionTrace getTraceInDUCounterRange(DefUse targetDU, boolean wantToCoverTargetDU, int duCounterStart, int duCounterEnd)
targetDU - a DefUse object.wantToCoverTargetDU - a boolean.duCounterStart - a int.duCounterEnd - a int.ExecutionTrace object.void linePassed(String className, String methodName, int line)
void mutationPassed(int mutationId,
double distance)
mutationId - a int.distance - a double.String toDefUseTraceInformation()
String object.String toDefUseTraceInformation(String targetVar)
String toDefUseTraceInformation(String var, int objectId)
void usePassed(Object object, Object caller, int useID)
caller - a Object object.useID - a int.void setExplicitException(Throwable explicitException)
explicitException - a Throwable object.ExecutionTrace lazyClone()
ExecutionTrace object.List<ExecutionTraceImpl.BranchEval> getBranchesTrace()
getBranchesTrace
List object.Map<Integer,Double> getFalseDistancesSum()
getFalseDistancesSum
Map object.Map<Integer,Double> getTrueDistancesSum()
getTrueDistancesSum
Map object.Map<String,HashMap<Integer,HashMap<Integer,Integer>>> getPassedUses()
getPassedUses
Map object.@Deprecated Set<Integer> getPassedDefIDs()
void putStaticPassed(String classNameWithDots, String fieldName)
classNameWithDots - fieldName - void getStaticPassed(String classNameWithDots, String fieldName)
classNameWithDots - fieldName - Set<String> getClassesWithStaticWrites()
Set<String> getClassesWithStaticReads()
void classInitialized(String classNameWithDots)
classNameWithDots - Copyright © 2010–2017 EvoSuite. All rights reserved.