private final String SET_LOCATION_METHOD = "setLocationMode";
private final String LOCATION_VAR = "locationMode";
private final String SET_LOCATION_METHOD = "setLocationMode";
private final String LOCATION_VAR = "locationMode";
- throw new RuntimeException(createErrorMessage(u, u2));
+ //throw new RuntimeException(createErrorMessage(u, u2));
+ conflictFound = true;
+ errorMessage = createErrorMessage(u, u2);
+u2.getApp()+" is writing the value: "
+u2.getValue()+" to the same variable!";
System.out.println(message);
+u2.getApp()+" is writing the value: "
+u2.getValue()+" to the same variable!";
System.out.println(message);
-
- if (conflictSet.contains(LOCATION_VAR)) {
+
+ 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) &&
MethodInfo mi = executedInsn.getMethodInfo();
// Find the last load before return and get the value here
if (mi.getName().equals(SET_LOCATION_METHOD) &&
} else {
if (executedInsn instanceof WriteInstruction) {
String varId = ((WriteInstruction) executedInsn).getFieldInfo().getFullName();
} else {
if (executedInsn instanceof WriteInstruction) {
String varId = ((WriteInstruction) executedInsn).getFieldInfo().getFullName();
for (String var : conflictSet) {
if (varId.contains(var)) {
// Get variable info
byte type = getType(ti, executedInsn);
String value = getValue(ti, executedInsn, type);
String writer = getWriter(ti.getStack(), appSet);
for (String var : conflictSet) {
if (varId.contains(var)) {
// Get variable info
byte type = getType(ti, executedInsn);
String value = getValue(ti, executedInsn, type);
String writer = getWriter(ti.getStack(), appSet);
// Update the current updates
writeWriterAndValue(writer, var, value);
// Update the current updates
writeWriterAndValue(writer, var, value);