From 7587ac0e0045a6cdd886be53d12139e49d7b068f Mon Sep 17 00:00:00 2001
From: stephey <stephey>
Date: Wed, 6 Apr 2011 07:33:22 +0000
Subject: [PATCH] bug fix for refCount in SMFEStates. I'm not sure if this fix
 covers all cases (it seems like it should to me)...

---
 Robust/src/Analysis/Disjoint/ProcessStateMachines.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Robust/src/Analysis/Disjoint/ProcessStateMachines.java b/Robust/src/Analysis/Disjoint/ProcessStateMachines.java
index 816c6e02..cc87d828 100644
--- a/Robust/src/Analysis/Disjoint/ProcessStateMachines.java
+++ b/Robust/src/Analysis/Disjoint/ProcessStateMachines.java
@@ -133,7 +133,9 @@ public class ProcessStateMachines {
 	Set<SMFEState> states=fromEntry.getValue();
 	if (states.contains(state2)) {
 	  states.remove(state2);
-	  states.add(state1);
+    if(states.add(state1) && !fromState.equals(state2)) {
+      state1.refCount++; 
+    }
 	}
       }
     }
-- 
2.34.1