if (expr instanceof InvokeExpr) {
SootMethod invokedMethod = ((InvokeExpr) expr).getMethod();
// It appears that soot does not automatically
// release the hierarchy.
Hierarchy hierarchy = Scene.v().getActiveHierarchy();
if (expr instanceof SpecialInvokeExpr) {
SootMethod target = hierarchy.resolveSpecialDispatch(
(SpecialInvokeExpr) expr, invokedMethod);
Scene.v().releaseActiveHierarchy();
_mergeFlow(out, target);
} else if (expr instanceof InstanceInvokeExpr) {
Type baseType = ((InstanceInvokeExpr) expr).getBase()
.getType();
if (!(baseType instanceof RefType)) {
// We can invoke methods on arrays...
// Ignore them here.
continue;
}
List list = hierarchy.resolveAbstractDispatch(
((RefType) baseType).getSootClass(),
invokedMethod);
Scene.v().releaseActiveHierarchy();
for (Iterator targets = list.iterator(); targets
.hasNext();) {