Fixing a bug: merging the analysis part for locationMode w.r.t manual interaction...
[jpf-core.git] / src / main / gov / nasa / jpf / listener / ConflictTracker.java
index 9d2cd19f6e791d298d29dbc1276a2f6dd1bc2c11..384056ee12abc750d28c340af0749361d9d1237b 100644 (file)
@@ -593,37 +593,22 @@ public class ConflictTracker extends ListenerAdapter {
     }
     
     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