public class ReplaceArithmeticOperator extends Object implements MutationOperator
ReplaceArithmeticOperator class.
| Constructor and Description |
|---|
ReplaceArithmeticOperator() |
| Modifier and Type | Method and Description |
|---|---|
List<Mutation> |
apply(org.objectweb.asm.tree.MethodNode mn,
String className,
String methodName,
BytecodeInstruction instruction,
org.objectweb.asm.tree.analysis.Frame frame)
Insert the mutation into the bytecode
|
static double |
calculate(double x,
double y,
int opcode)
calculate
|
static float |
calculate(float x,
float y,
int opcode)
calculate
|
static int |
calculate(int x,
int y,
int opcode)
calculate
|
static long |
calculate(long x,
long y,
int opcode)
calculate
|
org.objectweb.asm.tree.InsnList |
getInfectionDistance(int opcodeOrig,
int opcodeNew)
getInfectionDistance
|
static double |
getInfectionDistanceDouble(double x,
double y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceDouble
|
static double |
getInfectionDistanceFloat(float x,
float y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceFloat
|
static double |
getInfectionDistanceInt(int x,
int y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceInt
|
static double |
getInfectionDistanceLong(long x,
long y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceLong
|
static int |
getNextIndex(org.objectweb.asm.tree.MethodNode mn)
getNextIndex
|
boolean |
isApplicable(BytecodeInstruction instruction)
Check if the mutation operator is applicable to the instruction
|
public static final String NAME
public static int getNextIndex(org.objectweb.asm.tree.MethodNode mn)
getNextIndex
mn - a MethodNode object.public List<Mutation> apply(org.objectweb.asm.tree.MethodNode mn, String className, String methodName, BytecodeInstruction instruction, org.objectweb.asm.tree.analysis.Frame frame)
apply in interface MutationOperatormn - a MethodNode object.className - a String object.methodName - a String object.instruction - a BytecodeInstruction object.frame - a Frame object.List object.public org.objectweb.asm.tree.InsnList getInfectionDistance(int opcodeOrig,
int opcodeNew)
getInfectionDistance
opcodeOrig - a int.opcodeNew - a int.InsnList object.public static double getInfectionDistanceInt(int x,
int y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceInt
x - a int.y - a int.opcodeOrig - a int.opcodeNew - a int.public static double getInfectionDistanceLong(long x,
long y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceLong
x - a long.y - a long.opcodeOrig - a int.opcodeNew - a int.public static double getInfectionDistanceFloat(float x,
float y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceFloat
x - a float.y - a float.opcodeOrig - a int.opcodeNew - a int.public static double getInfectionDistanceDouble(double x,
double y,
int opcodeOrig,
int opcodeNew)
getInfectionDistanceDouble
x - a double.y - a double.opcodeOrig - a int.opcodeNew - a int.public static int calculate(int x,
int y,
int opcode)
calculate
x - a int.y - a int.opcode - a int.public static long calculate(long x,
long y,
int opcode)
calculate
x - a long.y - a long.opcode - a int.public static float calculate(float x,
float y,
int opcode)
calculate
x - a float.y - a float.opcode - a int.public static double calculate(double x,
double y,
int opcode)
calculate
x - a double.y - a double.opcode - a int.public boolean isApplicable(BytecodeInstruction instruction)
isApplicable in interface MutationOperatorinstruction - a BytecodeInstruction object.Copyright © 2010–2017 EvoSuite. All rights reserved.