Program: 88525
Project: 88525
Buggy source:
public boolean update(){
  boolean contextHeap=PaddleScene.v().options().context_heap();
  boolean change=false;
  for (Iterator tIt=simple.iterator(); tIt.hasNext(); ) {
    final Rsrc_dst.Tuple t=(Rsrc_dst.Tuple)tIt.next();
    if (ni.global(t.src())) {
      if (ni.global(t.dst())) {
        addSimple(null,t.src(),null,t.dst());
        change=true;
      }
 else {
        mpag(ni.method(t.dst())).simple.add(t);
      }
    }
 else {
      if (ni.global(t.dst())) {
        mpag(ni.method(t.src())).simple.add(t);
      }
 else {
        SootMethod m=ni.method(t.src());
        if (m != ni.method(t.dst()))         throw new RuntimeException(t.toString());
        mpag(m).simple.add(t);
      }
    }
  }
  for (Iterator tIt=store.iterator(); tIt.hasNext(); ) {
    final Rsrc_dst_fld.Tuple t=(Rsrc_dst_fld.Tuple)tIt.next();
    if (ni.global(t.src())) {
      if (ni.global(t.dst())) {
        addStore(null,t.src(),t.fld(),null,t.dst());
        change=true;
      }
 else {
        mpag(ni.method(t.dst())).store.add(t);
      }
    }
 else {
      if (ni.global(t.dst())) {
        mpag(ni.method(t.src())).store.add(t);
      }
 else {
        SootMethod m=ni.method(t.src());
        if (m != ni.method(t.dst()))         throw new RuntimeException(t.toString());
        mpag(m).store.add(t);
      }
    }
  }
  for (Iterator tIt=load.iterator(); tIt.hasNext(); ) {
    final Rsrc_fld_dst.Tuple t=(Rsrc_fld_dst.Tuple)tIt.next();
    if (ni.global(t.src())) {
      if (ni.global(t.dst())) {
        addLoad(null,t.src(),t.fld(),null,t.dst());
        change=true;
      }
 else {
        mpag(ni.method(t.dst())).load.add(t);
      }
    }
 else {
      if (ni.global(t.dst())) {
        mpag(ni.method(t.src())).load.add(t);
      }
 else {
        SootMethod m=ni.method(t.src());
        if (m != ni.method(t.dst()))         throw new RuntimeException(t.toString());
        mpag(m).load.add(t);
      }
    }
  }
  for (Iterator tIt=alloc.iterator(); tIt.hasNext(); ) {
    final Robj_var.Tuple t=(Robj_var.Tuple)tIt.next();
    if (!contextHeap || ni.global(t.obj())) {
      if (ni.global(t.var())) {
        addAlloc(null,t.obj(),null,t.var());
        change=true;
      }
 else {
        mpag(ni.method(t.var())).alloc.add(t);
      }
    }
 else {
      if (ni.global(t.var())) {
        mpag(ni.method(t.obj())).alloc.add(t);
      }
 else {
        SootMethod m=ni.method(t.obj());
        if (m != ni.method(t.var()))         throw new RuntimeException(t.toString());
        mpag(m).alloc.add(t);
      }
    }
  }
  for (Iterator tIt=rcout.iterator(); tIt.hasNext(); ) {
    final Rctxt_method.Tuple t=(Rctxt_method.Tuple)tIt.next();
    MethodPAG mpag=mpag(t.method());
    for (Iterator eIt=mpag.rsimple.copy().iterator(); eIt.hasNext(); ) {
      final Rsrc_dst.Tuple e=(Rsrc_dst.Tuple)eIt.next();
      addSimple(t.ctxt(),e.src(),t.ctxt(),e.dst());
      change=true;
    }
    for (Iterator eIt=mpag.rstore.copy().iterator(); eIt.hasNext(); ) {
      final Rsrc_dst_fld.Tuple e=(Rsrc_dst_fld.Tuple)eIt.next();
      addStore(t.ctxt(),e.src(),e.fld(),t.ctxt(),e.dst());
      change=true;
    }
    for (Iterator eIt=mpag.rload.copy().iterator(); eIt.hasNext(); ) {
      final Rsrc_fld_dst.Tuple e=(Rsrc_fld_dst.Tuple)eIt.next();
      addLoad(t.ctxt(),e.src(),e.fld(),t.ctxt(),e.dst());
      change=true;
    }
    for (Iterator eIt=mpag.ralloc.copy().iterator(); eIt.hasNext(); ) {
      final Robj_var.Tuple e=(Robj_var.Tuple)eIt.next();
      addAlloc(t.ctxt(),e.obj(),t.ctxt(),e.var());
      change=true;
    }
  }
  return change;
}

Fixed version (ground truth):
public boolean update(){
  boolean contextHeap=PaddleScene.v().options().context_heap();
  boolean change=false;
  for (Iterator tIt=simple.iterator(); tIt.hasNext(); ) {
    final Rsrc_dst.Tuple t=(Rsrc_dst.Tuple)tIt.next();
    if (ni.global(t.src())) {
      if (ni.global(t.dst())) {
        addSimple(null,t.src(),null,t.dst());
        change=true;
      }
 else {
        mpag(ni.method(t.dst())).simple.add(t);
      }
    }
 else {
      if (ni.global(t.dst())) {
        mpag(ni.method(t.src())).simple.add(t);
      }
 else {
        SootMethod m=ni.method(t.src());
        if (m != ni.method(t.dst()))         throw new RuntimeException(t.toString());
        mpag(m).simple.add(t);
      }
    }
  }
  for (Iterator tIt=store.iterator(); tIt.hasNext(); ) {
    final Rsrc_dst_fld.Tuple t=(Rsrc_dst_fld.Tuple)tIt.next();
    if (ni.global(t.src())) {
      if (ni.global(t.dst())) {
        addStore(null,t.src(),t.fld(),null,t.dst());
        change=true;
      }
 else {
        mpag(ni.method(t.dst())).store.add(t);
      }
    }
 else {
      if (ni.global(t.dst())) {
        mpag(ni.method(t.src())).store.add(t);
      }
 else {
        SootMethod m=ni.method(t.src());
        if (m != ni.method(t.dst()))         throw new RuntimeException(t.toString());
        mpag(m).store.add(t);
      }
    }
  }
  for (Iterator tIt=load.iterator(); tIt.hasNext(); ) {
    final Rsrc_fld_dst.Tuple t=(Rsrc_fld_dst.Tuple)tIt.next();
    if (ni.global(t.src())) {
      if (ni.global(t.dst())) {
        addLoad(null,t.src(),t.fld(),null,t.dst());
        change=true;
      }
 else {
        mpag(ni.method(t.dst())).load.add(t);
      }
    }
 else {
      if (ni.global(t.dst())) {
        mpag(ni.method(t.src())).load.add(t);
      }
 else {
        SootMethod m=ni.method(t.src());
        if (m != ni.method(t.dst()))         throw new RuntimeException(t.toString());
        mpag(m).load.add(t);
      }
    }
  }
  for (Iterator tIt=alloc.iterator(); tIt.hasNext(); ) {
    final Robj_var.Tuple t=(Robj_var.Tuple)tIt.next();
    if (!contextHeap || ni.global(t.obj())) {
      if (ni.global(t.var())) {
        addAlloc(null,t.obj(),null,t.var());
        change=true;
      }
 else {
        mpag(ni.method(t.var())).alloc.add(t);
      }
    }
 else {
      if (ni.global(t.var())) {
        mpag(ni.method(t.obj())).alloc.add(t);
      }
 else {
        SootMethod m=ni.method(t.obj());
        if (m != ni.method(t.var()))         throw new RuntimeException(t.toString());
        mpag(m).alloc.add(t);
      }
    }
  }
  for (Iterator tIt=rcout.iterator(); tIt.hasNext(); ) {
    final Rctxt_method.Tuple t=(Rctxt_method.Tuple)tIt.next();
    MethodPAG mpag=mpag(t.method());
    for (Iterator eIt=mpag.rsimple.copy().iterator(); eIt.hasNext(); ) {
      final Rsrc_dst.Tuple e=(Rsrc_dst.Tuple)eIt.next();
      addSimple(t.ctxt(),e.src(),t.ctxt(),e.dst());
      change=true;
    }
    for (Iterator eIt=mpag.rstore.copy().iterator(); eIt.hasNext(); ) {
      final Rsrc_dst_fld.Tuple e=(Rsrc_dst_fld.Tuple)eIt.next();
      addStore(t.ctxt(),e.src(),e.fld(),t.ctxt(),e.dst());
      change=true;
    }
    for (Iterator eIt=mpag.rload.copy().iterator(); eIt.hasNext(); ) {
      final Rsrc_fld_dst.Tuple e=(Rsrc_fld_dst.Tuple)eIt.next();
      addLoad(t.ctxt(),e.src(),e.fld(),t.ctxt(),e.dst());
      change=true;
    }
    for (Iterator eIt=mpag.ralloc.copy().iterator(); eIt.hasNext(); ) {
      final Robj_var.Tuple e=(Robj_var.Tuple)eIt.next();
      if (contextHeap || ni.global(e.obj())) {
        addAlloc(t.ctxt(),e.obj(),t.ctxt(),e.var());
      }
 else {
        addAlloc(null,e.obj(),t.ctxt(),e.var());
      }
      change=true;
    }
  }
  return change;
}