Map<String,String> namespaces = new HashMap<String,String>();
for (SootClass c : Scene.v().getApplicationClasses()) {
for (SootMethod m : c.getMethods()) {
if (!m.isConcrete())
continue;
DirectedGraph<Unit> mbug = new ExceptionalUnitGraph(m.retrieveActiveBody());
for (Unit u : mbug) {
Stmt s1 = (Stmt) u;
List<Unit> succs = mbug.getSuccsOf(s1);
if (succs.size() == 1) {
Stmt s2 = (Stmt) succs.get(0);
if (s1 instanceof JAssignStmt && s2 instanceof JInvokeStmt && mbug.getPredsOf(s2).size() == 1) {
JAssignStmt js1 = (JAssignStmt) s1;
JInvokeStmt js2 = (JInvokeStmt) s2;
if (js1.containsInvokeExpr()
&& (js1.getInvokeExpr().getMethod().getSignature().equals("<dk.brics.xact.XML: java.util.Map getNamespaceMap()>")
|| js1.getInvokeExpr().getMethod().getSignature().equals("<dk.brics.xact.XML: java.util.Map getThreadNamespaceMap()>"))