/** * Call it BEFORE executing an instruction virtually. * * @param instr * @param stack * @param localVar */ private void addRecord( FunctionStateKey stateKey, GCInstruction instr, GCOperandStack stack, GCLocalVariables localVar) { MethodInfo method = instr.getMethod(); String methodStr = oracle.getMethodOrFieldString(method); if (methodStr.contains("jvmTestCases.Main.fooGetOnly")) {} debugPrint("\n\n", "***** adding record *****"); debugPrint("method Str=", methodStr); debugPrint("instr =", instr); HashSet<Integer> unqiueForField = new HashSet<Integer>(); if (instr.getOpCode() != JavaInstructionsOpcodes.AALOAD) { int cpIndex = instr.getOperandsData().intValueUnsigned(); unqiueForField.add(cpIndex); } else { unqiueForField = getAALOADNewIds(stack); } Iterator<Integer> it = unqiueForField.iterator(); while (it.hasNext()) { contrForField.addRecord(stateKey, instr, it.next()); } }