Program: 85274
Project: 85274
Buggy source:
@Override protected void internalTransform(Body b,String phaseName,Map<String,String> options){
  if (!b.getTraps().isEmpty())   return;
  Unit u1=null, u2=null;
  for (Iterator<Unit> uIt=b.getUnits().snapshotIterator(); uIt.hasNext(); ) {
    Unit u=uIt.next();
    if (!(u instanceof AssignStmt) || !((Stmt)u).getBoxesPointingToThis().isEmpty()) {
      u1=null;
      u2=null;
      continue;
    }
    AssignStmt assignStmt=(AssignStmt)u;
    if (assignStmt.getLeftOp() instanceof ArrayRef) {
      if (u1 != null && u2 != null) {
        ArrayRef arrayRef=(ArrayRef)assignStmt.getLeftOp();
        Value u1val=u1.getDefBoxes().get(0).getValue();
        Value u2val=u2.getDefBoxes().get(0).getValue();
        if (arrayRef.getIndex() == u1val)         arrayRef.setIndex(((AssignStmt)u1).getRightOp());
 else         if (arrayRef.getIndex() == u2val)         arrayRef.setIndex(((AssignStmt)u2).getRightOp());
        if (assignStmt.getRightOp() == u1val)         assignStmt.setRightOp(((AssignStmt)u1).getRightOp());
 else         if (assignStmt.getRightOp() == u2val)         assignStmt.setRightOp(((AssignStmt)u2).getRightOp());
        Unit checkU=u;
        boolean foundU1=false, foundU2=false, doneU1=false, doneU2=false;
        while (!(doneU1 && doneU2) && !(foundU1 && foundU2) && checkU != null) {
          for (          ValueBox vb : checkU.getUseBoxes()) {
            if (!doneU1 && vb.getValue() == u1val)             foundU1=true;
            if (!doneU2 && vb.getValue() == u2val)             foundU2=true;
          }
          for (          ValueBox vb : checkU.getDefBoxes()) {
            if (vb.getValue() == u1val)             doneU1=true;
 else             if (vb.getValue() == u2val)             doneU2=true;
          }
          if (checkU.branches()) {
            foundU1=true;
            foundU2=true;
            break;
          }
          checkU=b.getUnits().getSuccOf(checkU);
        }
        if (!foundU1) {
          if (u1val instanceof Local) {
            b.getUnits().remove(u1);
            if (Options.v().verbose()) {
              G.v().out.println("String_Node_Str" + b.getMethod().getName() + "String_Node_Str"+ u1);
            }
          }
        }
        if (!foundU2) {
          if (u2val instanceof Local) {
            b.getUnits().remove(u2);
            if (Options.v().verbose()) {
              G.v().out.println("String_Node_Str" + b.getMethod().getName() + "String_Node_Str"+ u2);
            }
          }
        }
        u1=null;
        u2=null;
      }
 else {
        u1=null;
        u2=null;
        continue;
      }
    }
    if (!(assignStmt.getRightOp() instanceof Constant)) {
      u1=null;
      u2=null;
      continue;
    }
    if (u1 == null) {
      u1=assignStmt;
    }
 else     if (u2 == null) {
      u2=assignStmt;
    }
 else {
      u1=u2;
      u2=assignStmt;
    }
  }
  UnusedLocalEliminator.v().transform(b);
}

Fixed version (ground truth):
@Override protected void internalTransform(Body b,String phaseName,Map<String,String> options){
  if (!b.getTraps().isEmpty())   return;
  Unit u1=null, u2=null;
  for (Iterator<Unit> uIt=b.getUnits().snapshotIterator(); uIt.hasNext(); ) {
    Unit u=uIt.next();
    if (!(u instanceof AssignStmt) || !((Stmt)u).getBoxesPointingToThis().isEmpty()) {
      u1=null;
      u2=null;
      continue;
    }
    AssignStmt assignStmt=(AssignStmt)u;
    if (assignStmt.getLeftOp() instanceof ArrayRef) {
      if (u1 != null && u2 != null && u2.getBoxesPointingToThis().isEmpty() && assignStmt.getBoxesPointingToThis().isEmpty()) {
        ArrayRef arrayRef=(ArrayRef)assignStmt.getLeftOp();
        Value u1val=u1.getDefBoxes().get(0).getValue();
        Value u2val=u2.getDefBoxes().get(0).getValue();
        if (arrayRef.getIndex() == u1val)         arrayRef.setIndex(((AssignStmt)u1).getRightOp());
 else         if (arrayRef.getIndex() == u2val)         arrayRef.setIndex(((AssignStmt)u2).getRightOp());
        if (assignStmt.getRightOp() == u1val)         assignStmt.setRightOp(((AssignStmt)u1).getRightOp());
 else         if (assignStmt.getRightOp() == u2val)         assignStmt.setRightOp(((AssignStmt)u2).getRightOp());
        Unit checkU=u;
        boolean foundU1=false, foundU2=false, doneU1=false, doneU2=false;
        while (!(doneU1 && doneU2) && !(foundU1 && foundU2) && checkU != null) {
          for (          ValueBox vb : checkU.getUseBoxes()) {
            if (!doneU1 && vb.getValue() == u1val)             foundU1=true;
            if (!doneU2 && vb.getValue() == u2val)             foundU2=true;
          }
          for (          ValueBox vb : checkU.getDefBoxes()) {
            if (vb.getValue() == u1val)             doneU1=true;
 else             if (vb.getValue() == u2val)             doneU2=true;
          }
          if (checkU.branches()) {
            foundU1=true;
            foundU2=true;
            break;
          }
          checkU=b.getUnits().getSuccOf(checkU);
        }
        if (!foundU1) {
          if (u1val instanceof Local) {
            b.getUnits().remove(u1);
            if (Options.v().verbose()) {
              G.v().out.println("String_Node_Str" + b.getMethod().getName() + "String_Node_Str"+ u1);
            }
          }
        }
        if (!foundU2) {
          if (u2val instanceof Local) {
            b.getUnits().remove(u2);
            if (Options.v().verbose()) {
              G.v().out.println("String_Node_Str" + b.getMethod().getName() + "String_Node_Str"+ u2);
            }
          }
        }
        u1=null;
        u2=null;
      }
 else {
        u1=null;
        u2=null;
        continue;
      }
    }
    if (!(assignStmt.getRightOp() instanceof Constant)) {
      u1=null;
      u2=null;
      continue;
    }
    if (u1 == null) {
      u1=assignStmt;
    }
 else     if (u2 == null) {
      u2=assignStmt;
      if (u1 != null) {
        Value op1=((AssignStmt)u1).getLeftOp();
        if (op1 == ((AssignStmt)u2).getLeftOp()) {
          u1=u2;
          u2=null;
        }
      }
    }
 else {
      u1=u2;
      u2=assignStmt;
    }
  }
  UnusedLocalEliminator.v().transform(b);
}