Program: 63429
Project: 63429
Buggy source:
private void executionReport(Message message,SessionID sessionID) throws FieldNotFound {
  ExecID execID=(ExecID)message.getField(new ExecID());
  if (alreadyProcessed(execID,sessionID))   return;
  Order order=orderTableModel.getOrder(message.getField(new ClOrdID()).getValue());
  if (order == null) {
    return;
  }
  BigDecimal fillSize=BigDecimal.ZERO;
  try {
    LastShares lastShares=new LastShares();
    message.getField(lastShares);
    fillSize=new BigDecimal("String_Node_Str" + lastShares.getValue());
  }
 catch (  FieldNotFound e) {
    LeavesQty leavesQty=new LeavesQty();
    message.getField(leavesQty);
    fillSize=new BigDecimal(order.getQuantity()).subtract(new BigDecimal("String_Node_Str" + leavesQty.getValue()));
  }
  if (fillSize.compareTo(BigDecimal.ZERO) > 0) {
    order.setOpen(order.getOpen() - (int)Double.parseDouble(fillSize.toPlainString()));
    order.setExecuted(new Integer(message.getString(CumQty.FIELD)));
    order.setAvgPx(new Double(message.getString(AvgPx.FIELD)));
  }
  OrdStatus ordStatus=(OrdStatus)message.getField(new OrdStatus());
  if (ordStatus.valueEquals(OrdStatus.REJECTED)) {
    order.setRejected(true);
    order.setOpen(0);
  }
 else   if (ordStatus.valueEquals(OrdStatus.CANCELED) || ordStatus.valueEquals(OrdStatus.DONE_FOR_DAY)) {
    order.setCanceled(true);
    order.setOpen(0);
  }
 else   if (ordStatus.valueEquals(OrdStatus.NEW)) {
    if (order.isNew()) {
      order.setNew(false);
    }
  }
  try {
    order.setMessage(message.getField(new Text()).getValue());
  }
 catch (  FieldNotFound e) {
  }
  orderTableModel.updateOrder(order,message.getField(new ClOrdID()).getValue());
  observableOrder.update(order);
  if (fillSize.compareTo(BigDecimal.ZERO) > 0) {
    Execution execution=new Execution();
    execution.setExchangeID(sessionID + message.getField(new ExecID()).getValue());
    execution.setSymbol(message.getField(new Symbol()).getValue());
    execution.setQuantity(fillSize.intValue());
    if (message.isSetField(LastPx.FIELD)) {
      execution.setPrice(new Double(message.getString(LastPx.FIELD)));
    }
    Side side=(Side)message.getField(new Side());
    execution.setSide(FIXSideToSide(side));
    executionTableModel.addExecution(execution);
  }
}

Fixed version (ground truth):
private void executionReport(Message message,SessionID sessionID) throws FieldNotFound {
  ExecID execID=(ExecID)message.getField(new ExecID());
  if (alreadyProcessed(execID,sessionID))   return;
  Order order=orderTableModel.getOrder(message.getField(new ClOrdID()).getValue());
  if (order == null) {
    return;
  }
  BigDecimal fillSize=BigDecimal.ZERO;
  if (message.isSetField(LastShares.FIELD)) {
    LastShares lastShares=new LastShares();
    message.getField(lastShares);
    fillSize=new BigDecimal("String_Node_Str" + lastShares.getValue());
  }
 else {
    LeavesQty leavesQty=new LeavesQty();
    message.getField(leavesQty);
    fillSize=new BigDecimal(order.getQuantity()).subtract(new BigDecimal("String_Node_Str" + leavesQty.getValue()));
  }
  if (fillSize.compareTo(BigDecimal.ZERO) > 0) {
    order.setOpen(order.getOpen() - (int)Double.parseDouble(fillSize.toPlainString()));
    order.setExecuted(new Integer(message.getString(CumQty.FIELD)));
    order.setAvgPx(new Double(message.getString(AvgPx.FIELD)));
  }
  OrdStatus ordStatus=(OrdStatus)message.getField(new OrdStatus());
  if (ordStatus.valueEquals(OrdStatus.REJECTED)) {
    order.setRejected(true);
    order.setOpen(0);
  }
 else   if (ordStatus.valueEquals(OrdStatus.CANCELED) || ordStatus.valueEquals(OrdStatus.DONE_FOR_DAY)) {
    order.setCanceled(true);
    order.setOpen(0);
  }
 else   if (ordStatus.valueEquals(OrdStatus.NEW)) {
    if (order.isNew()) {
      order.setNew(false);
    }
  }
  try {
    order.setMessage(message.getField(new Text()).getValue());
  }
 catch (  FieldNotFound e) {
  }
  orderTableModel.updateOrder(order,message.getField(new ClOrdID()).getValue());
  observableOrder.update(order);
  if (fillSize.compareTo(BigDecimal.ZERO) > 0) {
    Execution execution=new Execution();
    execution.setExchangeID(sessionID + message.getField(new ExecID()).getValue());
    execution.setSymbol(message.getField(new Symbol()).getValue());
    execution.setQuantity(fillSize.intValue());
    if (message.isSetField(LastPx.FIELD)) {
      execution.setPrice(new Double(message.getString(LastPx.FIELD)));
    }
    Side side=(Side)message.getField(new Side());
    execution.setSide(FIXSideToSide(side));
    executionTableModel.addExecution(execution);
  }
}