Fixing bugs in Conflict Tracker
authorSeyed Amir Hossein Aqajari <saqajari@circinus-48.ics.uci.edu>
Thu, 5 Dec 2019 23:40:05 +0000 (15:40 -0800)
committerSeyed Amir Hossein Aqajari <saqajari@circinus-48.ics.uci.edu>
Thu, 5 Dec 2019 23:40:05 +0000 (15:40 -0800)
src/main/gov/nasa/jpf/listener/ConflictTracker.java

index 1f2fa7d1b95eadb04adac11957017c8bc5c6ecbb..af9147b3eabd80c87b7c2b0f8f7432a8bcb04f41 100644 (file)
@@ -88,329 +88,324 @@ public class ConflictTracker extends ListenerAdapter {
   }
 
   boolean propagateTheChange(Node currentNode) {
   }
 
   boolean propagateTheChange(Node currentNode) {
-       HashSet<Node> changed = new HashSet<Node>(currentNode.getSuccessors());
-       HashMap<Node, HashSet<Node>> parentQueueMap = new HashMap<Node, HashSet<Node>>();
-       HashSet<Node> parents = new HashSet<Node>();
-       parents.add(currentNode);
+    HashSet<Node> changed = new HashSet<Node>(currentNode.getSuccessors());
+    HashMap<Node, HashSet<Node>> parentQueueMap = new HashMap<Node, HashSet<Node>>();
+    HashSet<Node> parents = new HashSet<Node>();
+    parents.add(currentNode);
 
 
-       for (Node node : currentNode.getSuccessors()) {
-               parentQueueMap.put(node, parents);
-       }
+    for (Node node : currentNode.getSuccessors()) {
+      parentQueueMap.put(node, parents);
+    }
+
+    while(!changed.isEmpty()) {
+      // Get the first element of the changed set and remove it
+      Node nodeToProcess = changed.iterator().next();
+      changed.remove(nodeToProcess);
 
 
-       while(!changed.isEmpty()) {
-               // Get the first element of the changed set and remove it
-               Node nodeToProcess = changed.iterator().next();
-               changed.remove(nodeToProcess);
-
-               // Update the changed parents
-               parents.clear();
-               parents = parentQueueMap.get(nodeToProcess);
-               boolean isChanged = false;
-
-               for (Node node : parents) {
-                       // Update the edge
-                       isChanged |= updateTheOutSet(node, nodeToProcess);
-               }
-
-               // Check for a conflict if the outSet of nodeToProcess is changed
-               if (isChanged) {
-                       for (Node node : nodeToProcess.getSuccessors()) {
-                               HashMap<Transition, ArrayList<NameValuePair>> setSets = nodeToProcess.getOutgoingEdges().get(node).getSetSetMap();
-                               for (Map.Entry mapElement : setSets.entrySet()) {
-                                       Transition transition = (Transition)mapElement.getKey();
-                                       if (checkForConflict(nodeToProcess, node, transition))
-                                               return true;
-                               }
-                       }
-               }
-
-               // Update the parents list for the successors of the current node
-               parents.clear();
-               parents.add(nodeToProcess);
-
-               // Checking if the out set has changed or not(Add its successors to the change list!)
-               if (isChanged) {
-                       for (Node i : nodeToProcess.getSuccessors()) {
-                               if (!changed.contains(i))
-                                       changed.add(i);
-
-                               // Update the list of updated parents for the current node
-                               if (parentQueueMap.containsKey(i))
-                                       parentQueueMap.get(i).add(nodeToProcess);
-                               else
-                                       parentQueueMap.put(i, parents);
-                       }
-               }
+      // Update the changed parents
+      parents.clear();
+      parents = parentQueueMap.get(nodeToProcess);
+      boolean isChanged = false;
+
+      for (Node node : parents) {
+        // Update the edge
+       isChanged |= updateTheOutSet(node, nodeToProcess);
       }
 
       }
 
-      return false;
+      // Check for a conflict if the outSet of nodeToProcess is changed
+      if (isChanged) {
+        for (Node node : nodeToProcess.getSuccessors()) {
+         HashMap<Transition, ArrayList<NameValuePair>> setSets = nodeToProcess.getOutgoingEdges().get(node).getSetSetMap();
+         for (Map.Entry mapElement : setSets.entrySet()) {
+           Transition transition = (Transition)mapElement.getKey();
+           if (checkForConflict(nodeToProcess, node, transition))
+             return true;
+         }
+        }
+      }
+
+      // Update the parents list for the successors of the current node
+      parents.clear();
+      parents.add(nodeToProcess);
+
+      // Checking if the out set has changed or not(Add its successors to the change list!)
+      if (isChanged) {
+        for (Node i : nodeToProcess.getSuccessors()) {
+          if (!changed.contains(i))
+            changed.add(i);
+
+         // Update the list of updated parents for the current node
+         if (parentQueueMap.containsKey(i))
+            parentQueueMap.get(i).add(nodeToProcess);
+         else
+           parentQueueMap.put(i, parents);
+        }
+      }
+    }
+    return false;
   }
 
   String createErrorMessage(NameValuePair pair, HashMap<String, String> valueMap, HashMap<String, Integer> writerMap) {
   }
 
   String createErrorMessage(NameValuePair pair, HashMap<String, String> valueMap, HashMap<String, Integer> writerMap) {
-       String message = "Conflict found between the two apps. App"+pair.getAppNum()+
-                        " has written the value: "+pair.getValue()+
-                        " to the variable: "+pair.getVarName()+" while App"
-                        +writerMap.get(pair.getVarName())+" is overwriting the value: "
-                        +valueMap.get(pair.getVarName())+" to the same variable!";
-       System.out.println(message);    
-       return message;
+    String message = "Conflict found between the two apps. App"+pair.getAppNum()+
+                    " has written the value: "+pair.getValue()+
+                    " to the variable: "+pair.getVarName()+" while App"
+                    +writerMap.get(pair.getVarName())+" is overwriting the value: "
+                    +valueMap.get(pair.getVarName())+" to the same variable!";
+    System.out.println(message);       
+    return message;
   }
 
   boolean checkForConflict(Node parentNode, Node currentNode, Transition currentTransition) {
   }
 
   boolean checkForConflict(Node parentNode, Node currentNode, Transition currentTransition) {
-       ArrayList<NameValuePair> setSet = parentNode.getOutgoingEdges().get(currentNode).getSetSetMap().get(currentTransition);
-       HashMap<String, String> valueMap = new HashMap<String, String>(); // HashMap from varName to value
-       HashMap<String, Integer> writerMap = new HashMap<String, Integer>(); //  HashMap from varName to appNum
-       HashMap<String, String> firstValueMap = new HashMap<String, String>(); // HashMap from varName to value - first instruction in transition
-       HashMap<String, Integer> firstWriterMap = new HashMap<String, Integer>(); // HashMap from varName to appNum - first instruction in transition
+    ArrayList<NameValuePair> setSet = parentNode.getOutgoingEdges().get(currentNode).getSetSetMap().get(currentTransition);
+    HashMap<String, String> valueMap = new HashMap<String, String>(); // HashMap from varName to value
+    HashMap<String, Integer> writerMap = new HashMap<String, Integer>(); //  HashMap from varName to appNum
+    HashMap<String, String> firstValueMap = new HashMap<String, String>(); // HashMap from varName to value - first instruction in transition
+    HashMap<String, Integer> firstWriterMap = new HashMap<String, Integer>(); // HashMap from varName to appNum - first instruction in transition
        
        
-
-       // Update the valueMap and writerMap + check for conflict between the elements of setSet
-       for (int i = 0;i < setSet.size();i++) {
-            NameValuePair nameValuePair = setSet.get(i);
-           String varName = nameValuePair.getVarName();
-           String value = nameValuePair.getValue();
-           Integer appNum = nameValuePair.getAppNum();
-           Boolean isManual = nameValuePair.getIsManual();
-
-           if (valueMap.containsKey(varName)) {
-               // Check if we have a same writer
-               if (!writerMap.get(varName).equals(appNum)) {
-                       // Check if we have a conflict or not
-                       if (!valueMap.get(varName).equals(value)) {
-                               errorMessage = createErrorMessage(nameValuePair, valueMap, writerMap);
-                               return true;
-                       }
-               }
-               valueMap.put(varName, value);
-               writerMap.put(varName, appNum);
-            } else {
-               valueMap.put(varName, value);
-               writerMap.put(varName, appNum);
-               if (!isManual) {
-                       firstValueMap.put(varName, value);
-                       firstWriterMap.put(varName, appNum);
-               }
-            }
+    // Update the valueMap and writerMap + check for conflict between the elements of setSet
+    for (int i = 0;i < setSet.size();i++) {
+      NameValuePair nameValuePair = setSet.get(i);
+      String varName = nameValuePair.getVarName();
+      String value = nameValuePair.getValue();
+      Integer appNum = nameValuePair.getAppNum();
+      Boolean isManual = nameValuePair.getIsManual();
+
+      if (valueMap.containsKey(varName)) {
+        // Check if we have a same writer
+       if (!writerMap.get(varName).equals(appNum)) {
+         // Check if we have a conflict or not
+         if (!valueMap.get(varName).equals(value)) {
+           errorMessage = createErrorMessage(nameValuePair, valueMap, writerMap);
+           return true;
+         }
+       }
+       valueMap.put(varName, value);
+       writerMap.put(varName, appNum);
+      } else {
+        valueMap.put(varName, value);
+       writerMap.put(varName, appNum);
+       if (!isManual) {
+         firstValueMap.put(varName, value);
+         firstWriterMap.put(varName, appNum);
        }
        }
+      }
+    }
 
 
-       // Check for conflict between outSet and this transition setSet
-       for (NameValuePair i : parentNode.getOutSet()) {
-            if (valueMap.containsKey(i.getVarName())) {
-                String value = firstValueMap.get(i.getVarName());
-                Integer writer = firstWriterMap.get(i.getVarName());
-                    if ((value != null)&&(writer != null)) {
-                        if (!value.equals(i.getValue())&&!writer.equals(i.getAppNum())) { 
-                            // We have different values and different writers
-                            errorMessage = createErrorMessage(i, firstValueMap, firstWriterMap);
-                            return true;
-                        }
-                    }
-            }
-       }
-
-       return false;
+    // Check for conflict between outSet and this transition setSet
+    for (NameValuePair i : parentNode.getOutSet()) {
+      if (valueMap.containsKey(i.getVarName())) {
+        String value = firstValueMap.get(i.getVarName());
+        Integer writer = firstWriterMap.get(i.getVarName());
+        if ((value != null)&&(writer != null)) {
+          if (!value.equals(i.getValue())&&!writer.equals(i.getAppNum())) { 
+           // We have different values and different writers
+           errorMessage = createErrorMessage(i, firstValueMap, firstWriterMap);
+           return true;
+         }
+        }
+      }
+    }
+    return false;
   }
 
   boolean updateTheOutSet(Node parentNode, Node currentNode) {
   }
 
   boolean updateTheOutSet(Node parentNode, Node currentNode) {
-       HashMap<Transition, ArrayList<NameValuePair>> setSets = parentNode.getOutgoingEdges().get(currentNode).getSetSetMap();
-       HashSet<String> updatedVarNames = new HashSet<String>();
-       Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
-       HashMap<String, Integer> lastWriter = currentEdge.getLastWriter();
-       HashMap<String, String> lastValue = currentEdge.getLastValue();
-       HashMap<String, Integer> outSetVarMap = new HashMap<String, Integer>();
-       boolean isChanged = false;
-
-        for (Map.Entry mapElement : setSets.entrySet()) {
-            ArrayList<NameValuePair> setSet = (ArrayList<NameValuePair>)mapElement.getValue();
+    HashMap<Transition, ArrayList<NameValuePair>> setSets = parentNode.getOutgoingEdges().get(currentNode).getSetSetMap();
+    HashSet<String> updatedVarNames = new HashSet<String>();
+    Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
+    HashMap<String, Integer> lastWriter = currentEdge.getLastWriter();
+    HashMap<String, String> lastValue = currentEdge.getLastValue();
+    HashMap<String, Integer> outSetVarMap = new HashMap<String, Integer>();
+    boolean isChanged = false;
+
+    for (Map.Entry mapElement : setSets.entrySet()) {
+      ArrayList<NameValuePair> setSet = (ArrayList<NameValuePair>)mapElement.getValue();
   
   
-            for (int i = 0;i < setSet.size();i++) {
-                       updatedVarNames.add(setSet.get(i).getVarName());
-           }
-        }
-
+      for (int i = 0;i < setSet.size();i++) {
+        updatedVarNames.add(setSet.get(i).getVarName());
+      }
+    }
 
 
-       for (NameValuePair i : parentNode.getOutSet()) {
-               outSetVarMap.put(i.getVarName(), i.getAppNum());
-               if (!updatedVarNames.contains(i.getVarName()))
-                       isChanged |= currentNode.getOutSet().add(i);
-       }
+    for (NameValuePair i : parentNode.getOutSet()) {
+      outSetVarMap.put(i.getVarName(), i.getAppNum());
+      if (!updatedVarNames.contains(i.getVarName()))
+        isChanged |= currentNode.getOutSet().add(i);
+    }
 
 
 
 
-       for (Map.Entry mapElement : setSets.entrySet()) {
-            ArrayList<NameValuePair> setSet = (ArrayList<NameValuePair>)mapElement.getValue();
+    for (Map.Entry mapElement : setSets.entrySet()) {
+      ArrayList<NameValuePair> setSet = (ArrayList<NameValuePair>)mapElement.getValue();
   
   
-            for (int i = 0;i < setSet.size();i++) {
-                       String varName = setSet.get(i).getVarName();
-                       Integer writer = lastWriter.get(varName);
-                       String value = lastValue.get(varName);
-
-                       if (setSet.get(i).getAppNum().equals(writer) 
-                           && setSet.get(i).getValue().equals(value)) {
-                               if (outSetVarMap.containsKey(varName)) {
-                                       Integer hashCode = outSetVarMap.get(varName).hashCode() * 31 +
-                                                          varName.hashCode();
-                                       currentNode.getOutSet().remove(hashCode);
-                               }
-                               isChanged |= currentNode.getOutSet().add(setSet.get(i));
-                       }
-           }
-        }
-
-       return isChanged;
+      for (int i = 0;i < setSet.size();i++) {
+        String varName = setSet.get(i).getVarName();
+       Integer writer = lastWriter.get(varName);
+       String value = lastValue.get(varName);
+
+       if (setSet.get(i).getAppNum().equals(writer) 
+         && setSet.get(i).getValue().equals(value)) {
+         if (outSetVarMap.containsKey(varName)) {
+           Integer hashCode = outSetVarMap.get(varName).hashCode() * 31 +
+                              varName.hashCode();
+           currentNode.getOutSet().remove(hashCode);
+         }
+          isChanged |= currentNode.getOutSet().add(setSet.get(i));
+       }
+      }
+    }
+    return isChanged;
   }
 
   void updateTheEdge(Node currentNode, Transition transition) {
   }
 
   void updateTheEdge(Node currentNode, Transition transition) {
-       if (parentNode.getOutgoingEdges().containsKey(currentNode)) {
-               Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
-               if (currentEdge.getSetSetMap().containsKey(transition)) { // Update the transition
-                       if (manual)
-                               currentEdge.getSetSetMap().put(transition, tempSetSet);
-                       else
-                               currentEdge.getSetSetMap().get(transition).addAll(tempSetSet);
-               } else { // Add a new transition
-                       currentEdge.getSetSetMap().put(transition, tempSetSet);
-               }
-        } else {
-               parentNode.getOutgoingEdges().put(currentNode, new Edge(parentNode, currentNode));
-               Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
-               currentEdge.getSetSetMap().put(transition, tempSetSet);
+    if (parentNode.getOutgoingEdges().containsKey(currentNode)) {
+      Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
+        if (currentEdge.getSetSetMap().containsKey(transition)) { // Update the transition
+         if (manual)
+           currentEdge.getSetSetMap().put(transition, tempSetSet);
+         else
+           currentEdge.getSetSetMap().get(transition).addAll(tempSetSet);
+       } else { // Add a new transition
+           currentEdge.getSetSetMap().put(transition, tempSetSet);
         }
         }
+    } else {
+      parentNode.getOutgoingEdges().put(currentNode, new Edge(parentNode, currentNode));
+      Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
+      currentEdge.getSetSetMap().put(transition, tempSetSet);
+    }
 
 
-       // Update the last writer and last value for this edge for each varName
-       Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
-       ArrayList<NameValuePair> setSet = currentEdge.getSetSetMap().get(transition);
-       for (int i = 0;i < setSet.size();i++) {
-               NameValuePair nameValuePair = setSet.get(i);
-               currentEdge.getLastWriter().put(nameValuePair.getVarName(), nameValuePair.getAppNum());
-               currentEdge.getLastValue().put(nameValuePair.getVarName(), nameValuePair.getValue());
-       }
+    // Update the last writer and last value for this edge for each varName
+    Edge currentEdge = parentNode.getOutgoingEdges().get(currentNode);
+    ArrayList<NameValuePair> setSet = currentEdge.getSetSetMap().get(transition);
+    for (int i = 0;i < setSet.size();i++) {
+      NameValuePair nameValuePair = setSet.get(i);
+      currentEdge.getLastWriter().put(nameValuePair.getVarName(), nameValuePair.getAppNum());
+      currentEdge.getLastValue().put(nameValuePair.getVarName(), nameValuePair.getValue());
+    }
   }
 
   
 
   static class Node {
   }
 
   
 
   static class Node {
-        Integer id;
-       HashSet<Node> predecessors = new HashSet<Node>();
-       HashSet<Node> successors = new HashSet<Node>();
-       HashSet<NameValuePair> outSet = new HashSet<NameValuePair>();
-       HashMap<Node, Edge> outgoingEdges = new HashMap<Node, Edge>();
-
-       Node(Integer id) {
-         this.id = id;
-       }
+    Integer id;
+    HashSet<Node> predecessors = new HashSet<Node>();
+    HashSet<Node> successors = new HashSet<Node>();
+    HashSet<NameValuePair> outSet = new HashSet<NameValuePair>();
+    HashMap<Node, Edge> outgoingEdges = new HashMap<Node, Edge>();
+
+    Node(Integer id) {
+      this.id = id;
+    }
 
 
-       Integer getId() {
-               return id;
-       }
+    Integer getId() {
+      return id;
+    }
 
 
-       HashSet<Node> getPredecessors() {
-               return predecessors;
-       }
+    HashSet<Node> getPredecessors() {
+      return predecessors;
+    }
 
 
-       HashSet<Node> getSuccessors() {
-               return successors;
-       }
+    HashSet<Node> getSuccessors() {
+      return successors;
+    }
 
 
-       HashSet<NameValuePair> getOutSet() {
-               return outSet;
-       }
+    HashSet<NameValuePair> getOutSet() {
+      return outSet;
+    }
 
 
-       HashMap<Node, Edge> getOutgoingEdges() {
-               return outgoingEdges;
-       }
+    HashMap<Node, Edge> getOutgoingEdges() {
+      return outgoingEdges;
+    }
   }
 
   static class Edge {
   }
 
   static class Edge {
-       Node source, destination;
-       HashMap<String, Integer> lastWriter = new HashMap<String, Integer>();
-       HashMap<String, String> lastValue = new HashMap<String, String>();
-       HashMap<Transition, ArrayList<NameValuePair>> setSetMap = new HashMap<Transition, ArrayList<NameValuePair>>();
-
-       Edge(Node source, Node destination) {
-               this.source = source;
-               this.destination = destination;
-       }
+    Node source, destination;
+    HashMap<String, Integer> lastWriter = new HashMap<String, Integer>();
+    HashMap<String, String> lastValue = new HashMap<String, String>();
+    HashMap<Transition, ArrayList<NameValuePair>> setSetMap = new HashMap<Transition, ArrayList<NameValuePair>>();
+
+    Edge(Node source, Node destination) {
+      this.source = source;
+      this.destination = destination;
+    }
 
 
-       Node getSource() {
-               return source;
-       }
+    Node getSource() {
+      return source;
+    }
 
 
-       Node getDestination() {
-               return destination;
-       }
+    Node getDestination() {
+      return destination;
+    }
 
 
-       HashMap<Transition, ArrayList<NameValuePair>> getSetSetMap() {
-               return setSetMap;
-       }
+    HashMap<Transition, ArrayList<NameValuePair>> getSetSetMap() {
+      return setSetMap;
+    }
 
 
-       HashMap<String, Integer> getLastWriter() {
-               return lastWriter;
-       }
+    HashMap<String, Integer> getLastWriter() {
+      return lastWriter;
+    }
 
 
-       HashMap<String, String> getLastValue() {
-               return lastValue;
-       }
+    HashMap<String, String> getLastValue() {
+      return lastValue;
+    }
   }
 
   static class NameValuePair {
   }
 
   static class NameValuePair {
-       Integer appNum;
-       String value;
-       String varName;
-       boolean isManual;
-
-       NameValuePair(Integer appNum, String value, String varName, boolean isManual) {
-               this.appNum = appNum;
-               this.value = value;
-               this.varName = varName;
-               this.isManual = isManual;
-       }
+    Integer appNum;
+    String value;
+    String varName;
+    boolean isManual;
+
+    NameValuePair(Integer appNum, String value, String varName, boolean isManual) {
+      this.appNum = appNum;
+      this.value = value;
+      this.varName = varName;
+      this.isManual = isManual;
+    }
 
 
-       void setAppNum(Integer appNum) {
-               this.appNum = appNum;
-       }
+    void setAppNum(Integer appNum) {
+      this.appNum = appNum;
+    }
 
 
-       void setValue(String value) {
-               this.value = value;
-       }
+    void setValue(String value) {
+      this.value = value;
+    }
 
 
-       void setVarName(String varName) {
-               this.varName = varName;
-       }
+    void setVarName(String varName) {
+      this.varName = varName;
+    }
 
 
-        void setIsManual(String varName) {
-               this.isManual = isManual;
-       }
+    void setIsManual(String varName) {
+      this.isManual = isManual;
+    }
 
 
-       Integer getAppNum() {
-               return appNum;
-       }
+    Integer getAppNum() {
+      return appNum;
+    }
 
 
-       String getValue() {
-               return value;
-       }
+    String getValue() {
+      return value;
+    }
 
 
-       String getVarName() {
-               return varName;
-       }
+    String getVarName() {
+      return varName;
+    }
 
 
-       boolean getIsManual() {
-               return isManual;
-       }
+    boolean getIsManual() {
+      return isManual;
+    }
 
 
-       @Override
-       public boolean equals(Object o) {
+    @Override
+    public boolean equals(Object o) {
       if (o instanceof NameValuePair) {
         NameValuePair other = (NameValuePair) o;
         if (varName.equals(other.getVarName()))
           return appNum.equals(other.getAppNum());
       }
       return false;
       if (o instanceof NameValuePair) {
         NameValuePair other = (NameValuePair) o;
         if (varName.equals(other.getVarName()))
           return appNum.equals(other.getAppNum());
       }
       return false;
-       }
+    }
 
 
-       @Override
-       public int hashCode() {
-               return appNum.hashCode() * 31 + varName.hashCode();
-       }
+    @Override
+    public int hashCode() {
+      return appNum.hashCode() * 31 + varName.hashCode();
+    }
   }
 
   @Override
   }
 
   @Override
@@ -424,9 +419,9 @@ public class ConflictTracker extends ListenerAdapter {
   
     // Update the parent node
     if (nodes.containsKey(id)) {
   
     // Update the parent node
     if (nodes.containsKey(id)) {
-         parentNode = nodes.get(id);
+      parentNode = nodes.get(id);
     } else {
     } else {
-         parentNode = new Node(id);
+      parentNode = new Node(id);
     }
   }
 
     }
   }
 
@@ -446,7 +441,7 @@ public class ConflictTracker extends ListenerAdapter {
 
     // Add the node to the list of nodes
     if (nodes.get(id) == null)
 
     // Add the node to the list of nodes
     if (nodes.get(id) == null)
-       nodes.put(id, new Node(id));
+      nodes.put(id, new Node(id));
 
     Node currentNode = nodes.get(id);
 
 
     Node currentNode = nodes.get(id);
 
@@ -476,32 +471,32 @@ public class ConflictTracker extends ListenerAdapter {
     // Updating the predecessors for this node
     // Check if parent node is already in successors of the current node or not
     if (!(currentNode.getPredecessors().contains(parentNode)))
     // Updating the predecessors for this node
     // Check if parent node is already in successors of the current node or not
     if (!(currentNode.getPredecessors().contains(parentNode)))
-       currentNode.getPredecessors().add(parentNode);
+      currentNode.getPredecessors().add(parentNode);
 
     // Update the successors for this node
     // Check if current node is already in successors of the parent node or not
     if (!(parentNode.getSuccessors().contains(currentNode)))
 
     // Update the successors for this node
     // Check if current node is already in successors of the parent node or not
     if (!(parentNode.getSuccessors().contains(currentNode)))
-        parentNode.getSuccessors().add(currentNode);
+      parentNode.getSuccessors().add(currentNode);
 
     // Update the outset of the current node and check if it is changed or not to propagate the change
     boolean isChanged = updateTheOutSet(parentNode, currentNode);
 
     // Check if the outSet of this state has changed, update all of its successors' sets if any
     if (isChanged) {
 
     // Update the outset of the current node and check if it is changed or not to propagate the change
     boolean isChanged = updateTheOutSet(parentNode, currentNode);
 
     // Check if the outSet of this state has changed, update all of its successors' sets if any
     if (isChanged) {
-       for (Node node : currentNode.getSuccessors()) {
-               HashMap<Transition, ArrayList<NameValuePair>> setSets = currentNode.getOutgoingEdges().get(node).getSetSetMap();
-               for (Map.Entry mapElement : setSets.entrySet()) {
-                       Transition currentTransition = (Transition)mapElement.getKey();
-                       conflictFound = conflictFound || checkForConflict(currentNode, node, currentTransition);
-               }
+      for (Node node : currentNode.getSuccessors()) {
+        HashMap<Transition, ArrayList<NameValuePair>> setSets = currentNode.getOutgoingEdges().get(node).getSetSetMap();
+       for (Map.Entry mapElement : setSets.entrySet()) {
+         Transition currentTransition = (Transition)mapElement.getKey();
+         conflictFound = conflictFound || checkForConflict(currentNode, node, currentTransition);
        }
        }
-       conflictFound = conflictFound || propagateTheChange(currentNode);
+      }
+      conflictFound = conflictFound || propagateTheChange(currentNode);
     }
     // Update the parent node
     if (nodes.containsKey(id)) {
     }
     // Update the parent node
     if (nodes.containsKey(id)) {
-         parentNode = nodes.get(id);
+      parentNode = nodes.get(id);
     } else {
     } else {
-         parentNode = new Node(id);
+      parentNode = new Node(id);
     }
   }
 
     }
   }
 
@@ -516,9 +511,9 @@ public class ConflictTracker extends ListenerAdapter {
 
     // Update the parent node
     if (nodes.containsKey(id)) {
 
     // Update the parent node
     if (nodes.containsKey(id)) {
-         parentNode = nodes.get(id);
+      parentNode = nodes.get(id);
     } else {
     } else {
-         parentNode = new Node(id);
+      parentNode = new Node(id);
     }
   }
 
     }
   }
 
@@ -665,7 +660,7 @@ public class ConflictTracker extends ListenerAdapter {
     // Update the temporary Set set.
     NameValuePair temp = new NameValuePair(1, value, var, manual);
     if (writer.equals("App2"))
     // Update the temporary Set set.
     NameValuePair temp = new NameValuePair(1, value, var, manual);
     if (writer.equals("App2"))
-       temp = new NameValuePair(2, value, var, manual);
+      temp = new NameValuePair(2, value, var, manual);
     
     tempSetSet.add(temp);
   }
     
     tempSetSet.add(temp);
   }
@@ -691,7 +686,7 @@ public class ConflictTracker extends ListenerAdapter {
         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) &&
-                executedInsn instanceof ALOAD && nextInsn instanceof ARETURN) {
+            executedInsn instanceof ALOAD && nextInsn instanceof ARETURN) {
           byte type  = getType(ti, executedInsn);
           String value = getValue(ti, executedInsn, type);
 
           byte type  = getType(ti, executedInsn);
           String value = getValue(ti, executedInsn, type);