From 799575b441362e153c9ca7f15e520c3d9b3f3b80 Mon Sep 17 00:00:00 2001
From: rtrimana <rtrimana@uci.edu>
Date: Mon, 2 Mar 2020 14:12:31 -0800
Subject: [PATCH] Fixing a bug: merging the analysis part for locationMode
 w.r.t manual interaction flag.

---
 .../nasa/jpf/listener/ConflictTracker.java    | 33 +++++--------------
 1 file changed, 9 insertions(+), 24 deletions(-)

diff --git a/src/main/gov/nasa/jpf/listener/ConflictTracker.java b/src/main/gov/nasa/jpf/listener/ConflictTracker.java
index 9d2cd19..384056e 100644
--- a/src/main/gov/nasa/jpf/listener/ConflictTracker.java
+++ b/src/main/gov/nasa/jpf/listener/ConflictTracker.java
@@ -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
-- 
2.34.1