Program: 88826
Project: 88826
Buggy source:
protected void internalTransform(Body body,String phaseName,Map options){
  initializationStuff(phaseName);
  SideEffectAnalysis sea=Scene.v().getActiveSideEffectAnalysis();
  optionNaive=PackManager.getBoolean(options,"String_Node_Str");
  if (!optionNaive) {
    sea.findNTRWSets(body.getMethod());
  }
  HashMap stmtToReadSet=new HashMap();
  HashMap stmtToWriteSet=new HashMap();
  UniqueRWSets sets=new UniqueRWSets();
  boolean justDoTotallyConservativeThing=body.getMethod().getName().equals("String_Node_Str");
  for (Iterator stmtIt=body.getUnits().iterator(); stmtIt.hasNext(); ) {
    final Stmt stmt=(Stmt)stmtIt.next();
    if (justDoTotallyConservativeThing || (optionNaive && stmt.containsInvokeExpr())) {
      stmtToReadSet.put(stmt,sets.getUnique(new FullRWSet()));
      stmtToWriteSet.put(stmt,sets.getUnique(new FullRWSet()));
      continue;
    }
    Object key=keyFor(stmt);
    if (!stmtToReadSet.containsKey(key)) {
      stmtToReadSet.put(key,sets.getUnique(sea.readSet(body.getMethod(),stmt)));
      stmtToWriteSet.put(key,sets.getUnique(sea.writeSet(body.getMethod(),stmt)));
    }
  }
  DependenceGraph graph=new DependenceGraph();
  for (Iterator outerIt=sets.iterator(); outerIt.hasNext(); ) {
    final RWSet outer=(RWSet)outerIt.next();
    for (Iterator innerIt=sets.iterator(); innerIt.hasNext(); ) {
      final RWSet inner=(RWSet)innerIt.next();
      if (inner == outer)       break;
      if (outer.hasNonEmptyIntersection(inner)) {
        graph.addEdge(sets.indexOf(outer),sets.indexOf(inner));
      }
    }
  }
  for (Iterator stmtIt=body.getUnits().iterator(); stmtIt.hasNext(); ) {
    final Stmt stmt=(Stmt)stmtIt.next();
    Object key;
    if (optionNaive && stmt.containsInvokeExpr()) {
      key=stmt;
    }
 else {
      key=keyFor(stmt);
    }
    RWSet read=(RWSet)stmtToReadSet.get(key);
    RWSet write=(RWSet)stmtToWriteSet.get(key);
    if (read != null || write != null) {
      DependenceTag tag=new DependenceTag();
      if (read != null && read.getCallsNative()) {
        tag.setCallsNative();
        numNatives++;
      }
 else       if (write != null && write.getCallsNative()) {
        tag.setCallsNative();
        numNatives++;
      }
      tag.setRead(sets.indexOf(read));
      tag.setWrite(sets.indexOf(write));
      if (!justDoTotallyConservativeThing) {
        for (Iterator innerIt=body.getUnits().iterator(); innerIt.hasNext(); ) {
          final Stmt inner=(Stmt)innerIt.next();
          Object ikey;
          if (optionNaive && inner.containsInvokeExpr()) {
            ikey=inner;
          }
 else {
            ikey=keyFor(inner);
          }
          RWSet innerRead=(RWSet)stmtToReadSet.get(ikey);
          RWSet innerWrite=(RWSet)stmtToWriteSet.get(ikey);
          if (graph.areAdjacent(sets.indexOf(read),sets.indexOf(innerWrite)))           numRWs++;
          if (graph.areAdjacent(sets.indexOf(write),sets.indexOf(innerRead)))           numWRs++;
          if (inner == stmt)           continue;
          if (graph.areAdjacent(sets.indexOf(write),sets.indexOf(innerWrite)))           numWWs++;
          if (graph.areAdjacent(sets.indexOf(read),sets.indexOf(innerRead)))           numRRs++;
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void internalTransform(Body body,String phaseName,Map options){
  initializationStuff(phaseName);
  SideEffectAnalysis sea=Scene.v().getActiveSideEffectAnalysis();
  optionNaive=PackManager.getBoolean(options,"String_Node_Str");
  if (!optionNaive) {
    sea.findNTRWSets(body.getMethod());
  }
  HashMap stmtToReadSet=new HashMap();
  HashMap stmtToWriteSet=new HashMap();
  UniqueRWSets sets=new UniqueRWSets();
  boolean justDoTotallyConservativeThing=body.getMethod().getName().equals("String_Node_Str");
  for (Iterator stmtIt=body.getUnits().iterator(); stmtIt.hasNext(); ) {
    final Stmt stmt=(Stmt)stmtIt.next();
    if (justDoTotallyConservativeThing || (optionNaive && stmt.containsInvokeExpr())) {
      stmtToReadSet.put(stmt,sets.getUnique(new FullRWSet()));
      stmtToWriteSet.put(stmt,sets.getUnique(new FullRWSet()));
      continue;
    }
    Object key=keyFor(stmt);
    if (!stmtToReadSet.containsKey(key)) {
      stmtToReadSet.put(key,sets.getUnique(sea.readSet(body.getMethod(),stmt)));
      stmtToWriteSet.put(key,sets.getUnique(sea.writeSet(body.getMethod(),stmt)));
    }
  }
  DependenceGraph graph=new DependenceGraph();
  for (Iterator outerIt=sets.iterator(); outerIt.hasNext(); ) {
    final RWSet outer=(RWSet)outerIt.next();
    for (Iterator innerIt=sets.iterator(); innerIt.hasNext(); ) {
      final RWSet inner=(RWSet)innerIt.next();
      if (inner == outer)       break;
      if (outer.hasNonEmptyIntersection(inner)) {
        graph.addEdge(sets.indexOf(outer),sets.indexOf(inner));
      }
    }
  }
  body.getMethod().addTag(graph);
  for (Iterator stmtIt=body.getUnits().iterator(); stmtIt.hasNext(); ) {
    final Stmt stmt=(Stmt)stmtIt.next();
    Object key;
    if (optionNaive && stmt.containsInvokeExpr()) {
      key=stmt;
    }
 else {
      key=keyFor(stmt);
    }
    RWSet read=(RWSet)stmtToReadSet.get(key);
    RWSet write=(RWSet)stmtToWriteSet.get(key);
    if (read != null || write != null) {
      DependenceTag tag=new DependenceTag();
      if (read != null && read.getCallsNative()) {
        tag.setCallsNative();
        numNatives++;
      }
 else       if (write != null && write.getCallsNative()) {
        tag.setCallsNative();
        numNatives++;
      }
      tag.setRead(sets.indexOf(read));
      tag.setWrite(sets.indexOf(write));
      stmt.addTag(tag);
    }
  }
}