Changed isInvokeCallInst() to getDifferentInvokeCallOpcode().
Test: Ran dexfuzz until the mutation showed up and found the diff using
the bytecode differences.
Change-Id: I4ffddedcbc53e48866b64d4c37c1e25ef982ade6
diff --git a/tools/dexfuzz/src/dexfuzz/program/mutators/InvokeChanger.java b/tools/dexfuzz/src/dexfuzz/program/mutators/InvokeChanger.java
index 3488503..8750fc6 100644
--- a/tools/dexfuzz/src/dexfuzz/program/mutators/InvokeChanger.java
+++ b/tools/dexfuzz/src/dexfuzz/program/mutators/InvokeChanger.java
@@ -136,7 +136,7 @@
String oldInsnString = invokeInsn.toString();
- Opcode newOpcode = isInvokeCalIInst(invokeInsn);
+ Opcode newOpcode = getDifferentInvokeCallOpcode(invokeInsn);
invokeInsn.insn.info = Instruction.getOpcodeInfo(newOpcode);
@@ -148,7 +148,7 @@
invokeCallInsns = null;
}
- private Opcode isInvokeCalIInst(MInsn mInsn) {
+ private Opcode getDifferentInvokeCallOpcode(MInsn mInsn) {
Opcode opcode = mInsn.insn.info.opcode;
if (isSimpleInvokeInst(opcode)) {
int index = opcode.ordinal() - Opcode.INVOKE_VIRTUAL.ordinal();
@@ -159,7 +159,7 @@
int length = INVOKE_RANGE_LIST.length;
return INVOKE_RANGE_LIST[(index + 1 + rng.nextInt(length - 1)) % length];
}
- return opcode;
+ return opcode;
}
private boolean isSimpleInvokeInst(Opcode opcode){