From: jjenista Date: Thu, 13 Oct 2011 02:34:32 +0000 (+0000) Subject: Bug fix, sometimes an edge matches except it has a different type of source node... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3325a4b573d65f7b8e2e7b5e610abd312e399b19;p=IRC.git Bug fix, sometimes an edge matches except it has a different type of source node, so check for that instead of blindly casting and causing an exception --- diff --git a/Robust/src/Analysis/Disjoint/RefEdge.java b/Robust/src/Analysis/Disjoint/RefEdge.java index 1d0e349e..157d7d53 100644 --- a/Robust/src/Analysis/Disjoint/RefEdge.java +++ b/Robust/src/Analysis/Disjoint/RefEdge.java @@ -104,11 +104,21 @@ public class RefEdge { if( src instanceof VariableNode ) { VariableNode vsrc = (VariableNode) src; + + if( !(edge.src instanceof VariableNode) ) { + return false; + } + if( !vsrc.equals( (VariableNode) edge.src ) ) { return false; } } else { HeapRegionNode hsrc = (HeapRegionNode) src; + + if( !(edge.src instanceof HeapRegionNode) ) { + return false; + } + if( !hsrc.equalsIncludingAlphaAndPreds( (HeapRegionNode) edge.src ) ) { return false; }