}
if (conflictFound) {
+
StringBuilder sb = new StringBuilder();
sb.append(errorMessage);
Instruction nextIns = ti.createAndThrowException("java.lang.RuntimeException", sb.toString());
ti.setNextPC(nextIns);
- } else if (conflictSet.contains(LOCATION_VAR)) {
- MethodInfo mi = executedInsn.getMethodInfo();
- // Find the last load before return and get the value here
- if (mi.getName().equals(SET_LOCATION_METHOD) &&
- executedInsn instanceof ALOAD && nextInsn instanceof ARETURN) {
- byte type = getType(ti, executedInsn);
- String value = getValue(ti, executedInsn, type);
-
- // Extract the writer app name
- ClassInfo ci = mi.getClassInfo();
- String writer = ci.getName();
-
- // Update the temporary Set set.
- writeWriterAndValue(writer, LOCATION_VAR, value);
- }
} else {
+
if (executedInsn instanceof WriteInstruction) {
String varId = ((WriteInstruction) executedInsn).getFieldInfo().getFullName();
-
- // Check if we have an update to isManualTransaction to update manual field
- if (varId.contains("isManualTransaction")) {
- byte type = getType(ti, executedInsn);
- String value = getValue(ti, executedInsn, type);
-
- manual = (value.equals("true"))?true:false;
- }
-
+ // Check if we have an update to isManualTransaction to update manual field
+ if (varId.contains("isManualTransaction")) {
+ byte type = getType(ti, executedInsn);
+ String value = getValue(ti, executedInsn, type);
+ System.out.println();
+ manual = (value.equals("true"))?true:false;
+ }
for (String var : conflictSet) {
if (varId.contains(var)) {
// Get variable info