Program: 3211
Project: 3211
Buggy source:
private int dmaTransferPPUOnce(int fromBank,int fromAddress,int toBank,int toAddress){
  int size=0;
  int tmp=0;
  if (transferMode == 0x0) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    size=1;
  }
 else   if (transferMode == 0x01) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    size=2;
  }
 else   if (transferMode == 0x02 || transferMode == 0x06) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    size=2;
  }
 else   if (transferMode == 0x03 || transferMode == 0x07) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 2);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 3);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    size=4;
  }
 else   if (transferMode == 0x04) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 2);
    Core.mem.set(Size.BYTE,toBank,toAddress + 2,tmp);
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 3);
    Core.mem.set(Size.BYTE,toBank,toAddress + 3,tmp);
    size=4;
  }
 else {
    System.out.println("String_Node_Str");
    return 0;
  }
  return size;
}

Fixed version (ground truth):
private int dmaTransferPPUOnce(int fromBank,int fromAddress,int toBank,int toAddress){
  int size=0;
  int tmp=0;
  if (transferMode == 0x0) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    size=1;
  }
 else   if (transferMode == 0x01) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    size=2;
  }
 else   if (transferMode == 0x02 || transferMode == 0x06) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    size=2;
  }
 else   if (transferMode == 0x03 || transferMode == 0x07) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 2);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 3);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    size=4;
  }
 else   if (transferMode == 0x04) {
    tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 0);
    Core.mem.set(Size.BYTE,toBank,toAddress,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 1);
    Core.mem.set(Size.BYTE,toBank,toAddress + 1,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 2);
    Core.mem.set(Size.BYTE,toBank,toAddress + 2,tmp);
    if (!fixedTransfer)     tmp=Core.mem.get(Size.BYTE,fromBank,fromAddress + 3);
    Core.mem.set(Size.BYTE,toBank,toAddress + 3,tmp);
    size=4;
  }
 else {
    System.out.println("String_Node_Str");
    return 0;
  }
  return size;
}