public void go() {
   Iterator methods = cg.sourceMethods();
   while (methods.hasNext()) {
     SootMethod m = (SootMethod) methods.next();
     dfsVisit(m);
   }
 }
 private void dfsVisit(SootMethod m) {
   if (visited.contains(m)) return;
   visited.add(m);
   Iterator targets = new Targets(cg.edgesOutOf(m));
   while (targets.hasNext()) {
     SootMethod target = (SootMethod) targets.next();
     dfsVisit(target);
   }
   order.add(m);
 }