class OTFMethodSCCManager {

  private DisjointSets disj;
  private Map<SootMethod, Integer> numbers = new HashMap<>();

  public OTFMethodSCCManager() {
    int num = 0;
    for (SootClass c : Scene.v().getClasses()) {
      for (SootMethod m : c.getMethods()) {
        numbers.put(m, num++);
      }
    }
    disj = new DisjointSets(num + 1);
  }

  public boolean inSameSCC(SootMethod m1, SootMethod m2) {
    return disj.find(numbers.get(m1)) == disj.find(numbers.get(m2));
  }

  public void makeSameSCC(Set<SootMethod> methods) {<FILL_FUNCTION_BODY>}
}

    SootMethod prevMethod = null;
    for (SootMethod method : methods) {
      if (prevMethod != null) {
        int prevMethodRep = disj.find(numbers.get(prevMethod));
        int methodRep = disj.find(numbers.get(method));
        if (prevMethodRep != methodRep) {
          disj.union(prevMethodRep, methodRep);
        }
      }
      prevMethod = method;
    }
  
<no_super_class>