Program: 88824
Project: 88824
Buggy source:
public BafBody(Body body,Map options){
  super(body.getMethod());
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + getMethod().getName() + "String_Node_Str");
  JimpleBody jimpleBody;
  if (body instanceof JimpleBody)   jimpleBody=(JimpleBody)body;
 else   throw new RuntimeException("String_Node_Str" + "String_Node_Str");
  jimpleBody.validate();
  JimpleToBafContext context=new JimpleToBafContext(jimpleBody.getLocalCount());
{
    Iterator localIt=jimpleBody.getLocals().iterator();
    while (localIt.hasNext()) {
      Local l=(Local)localIt.next();
      Type t=l.getType();
      Local newLocal;
      newLocal=Baf.v().newLocal(l.getName(),UnknownType.v());
      if (t.equals(DoubleType.v()) || t.equals(LongType.v()))       newLocal.setType(DoubleWordType.v());
 else       newLocal.setType(WordType.v());
      context.setBafLocalOfJimpleLocal(l,newLocal);
      getLocals().add(newLocal);
    }
  }
  Map stmtToFirstInstruction=new HashMap();
{
    Iterator stmtIt=jimpleBody.getUnits().iterator();
    while (stmtIt.hasNext()) {
      Stmt s=(Stmt)stmtIt.next();
      List conversionList=new ArrayList();
      context.setCurrentUnit(s);
      ((ConvertToBaf)s).convertToBaf(context,conversionList);
      stmtToFirstInstruction.put(s,conversionList.get(0));
      getUnits().addAll(conversionList);
    }
  }
{
    Iterator boxIt=getUnitBoxes().iterator();
    while (boxIt.hasNext()) {
      UnitBox box=(UnitBox)boxIt.next();
      if (box.getUnit() instanceof PlaceholderInst) {
        Unit source=((PlaceholderInst)box.getUnit()).getSource();
        box.setUnit((Unit)stmtToFirstInstruction.get(source));
      }
    }
  }
{
    Iterator trapIt=jimpleBody.getTraps().iterator();
    while (trapIt.hasNext()) {
      Trap trap=(Trap)trapIt.next();
      getTraps().add(Baf.v().newTrap(trap.getException(),(Unit)stmtToFirstInstruction.get(trap.getBeginUnit()),(Unit)stmtToFirstInstruction.get(trap.getEndUnit()),(Unit)stmtToFirstInstruction.get(trap.getHandlerUnit())));
    }
  }
  PackManager.v().getPack("String_Node_Str").apply(this);
  PackManager.v().getPack("String_Node_Str").apply(this);
}

Fixed version (ground truth):
public BafBody(Body body,Map options){
  super(body.getMethod());
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + getMethod().getName() + "String_Node_Str");
  JimpleBody jimpleBody;
  if (body instanceof JimpleBody)   jimpleBody=(JimpleBody)body;
 else   throw new RuntimeException("String_Node_Str" + "String_Node_Str");
  jimpleBody.validate();
  JimpleToBafContext context=new JimpleToBafContext(jimpleBody.getLocalCount());
{
    Iterator localIt=jimpleBody.getLocals().iterator();
    while (localIt.hasNext()) {
      Local l=(Local)localIt.next();
      Type t=l.getType();
      Local newLocal;
      newLocal=Baf.v().newLocal(l.getName(),UnknownType.v());
      if (t.equals(DoubleType.v()) || t.equals(LongType.v()))       newLocal.setType(DoubleWordType.v());
 else       newLocal.setType(WordType.v());
      context.setBafLocalOfJimpleLocal(l,newLocal);
      getLocals().add(newLocal);
    }
  }
  Map stmtToFirstInstruction=new HashMap();
{
    Iterator stmtIt=jimpleBody.getUnits().iterator();
    while (stmtIt.hasNext()) {
      Stmt s=(Stmt)stmtIt.next();
      List conversionList=new ArrayList();
      context.setCurrentUnit(s);
      ((ConvertToBaf)s).convertToBaf(context,conversionList);
      stmtToFirstInstruction.put(s,conversionList.get(0));
      getUnits().addAll(conversionList);
    }
  }
{
    Iterator boxIt=getUnitBoxes().iterator();
    while (boxIt.hasNext()) {
      UnitBox box=(UnitBox)boxIt.next();
      if (box.getUnit() instanceof PlaceholderInst) {
        Unit source=((PlaceholderInst)box.getUnit()).getSource();
        box.setUnit((Unit)stmtToFirstInstruction.get(source));
      }
    }
  }
{
    Iterator trapIt=jimpleBody.getTraps().iterator();
    while (trapIt.hasNext()) {
      Trap trap=(Trap)trapIt.next();
      getTraps().add(Baf.v().newTrap(trap.getException(),(Unit)stmtToFirstInstruction.get(trap.getBeginUnit()),(Unit)stmtToFirstInstruction.get(trap.getEndUnit()),(Unit)stmtToFirstInstruction.get(trap.getHandlerUnit())));
    }
  }
  PackManager.v().getPack("String_Node_Str").apply(this);
}