Program: 5578
Project: 5578
Buggy source:
public void receivedByte(byte data){
  log("String_Node_Str" + Utils.hex8(data) + "String_Node_Str"+ stateMachine+ "String_Node_Str"+ zeroSymbols+ ((stateMachine == RadioState.RX_SFD_SEARCH || stateMachine == RadioState.RX_FRAME) ? "String_Node_Str" : "String_Node_Str"));
  if (stateMachine == RadioState.RX_SFD_SEARCH) {
    if (data == 0) {
      zeroSymbols++;
    }
 else     if (zeroSymbols >= 4 && data == 0x7A) {
      setSFD(true);
      if (DEBUG)       log("String_Node_Str");
      rxread=0;
      setState(RadioState.RX_FRAME);
    }
 else {
      zeroSymbols=0;
    }
  }
 else   if (stateMachine == RadioState.RX_FRAME) {
    if (rxfifoLen == 128) {
      setRxOverflow();
    }
 else {
      memory[RAM_RXFIFO + rxfifoWritePos]=data & 0xFF;
      rxfifoWritePos=(rxfifoWritePos + 1) & 127;
      rxfifoLen++;
      if (rxread == 0) {
        rxCrc.setCRC(0);
        rxlen=data & 0xff;
        rxPacketStart=rxfifoWritePos;
        System.out.println("String_Node_Str" + rxfifoWritePos + "String_Node_Str"+ rxlen);
        decodeAddress=false;
        if (DEBUG)         log("String_Node_Str" + rxlen);
        setFIFO(true);
      }
 else       if (rxread < rxlen - 1) {
        rxCrc.addBitrev(data & 0xff);
        if (rxread == 2) {
          if (TYPE_DATA_FRAME == (memory[RAM_RXFIFO + rxPacketStart] & FRAME_TYPE)) {
            decodeAddress=addressDecode;
            ackRequest=(memory[RAM_RXFIFO + rxPacketStart] & ACK_REQUEST) > 0;
            destinationAddressMode=(memory[RAM_RXFIFO + ((rxPacketStart + 1) & 127)] >> 2) & 3;
          }
 else {
            decodeAddress=false;
            ackRequest=false;
          }
          dsn=data & 0xff;
        }
 else         if (rxread == 3) {
          dsn=data & 0xff;
        }
        if (decodeAddress) {
          boolean flushPacket=false;
          if (destinationAddressMode == LONG_ADDRESS && rxread == 8 + 5) {
            int addrPos=rxPacketStart + 5;
            for (int i=0; i < 8; i++) {
              if (memory[RAM_IEEEADDR + i] != memory[RAM_RXFIFO + ((addrPos + i) & 127)]) {
                flushPacket=true;
              }
            }
            decodeAddress=false;
          }
 else           if (destinationAddressMode == SHORT_ADDRESS && rxread == 2 + 5) {
            int addrPos=rxPacketStart + 5;
            boolean bc=true;
            for (int i=0; i < 2; i++) {
              int addrData=memory[RAM_RXFIFO + ((addrPos + i) & 127)];
              if (bc && addrData != 0xff) {
                bc=false;
              }
              if (memory[RAM_SHORTADDR + i] != addrData) {
                flushPacket=true;
              }
            }
            if (bc)             flushPacket=false;
            decodeAddress=false;
          }
          if (flushPacket) {
            rxfifoLen=rxfifoLen - rxread;
            rxfifoWritePos=(rxPacketStart - 1 + 128) & 127;
            System.out.println("String_Node_Str" + rxfifoWritePos);
            setSFD(false);
            setFIFO(rxfifoLen > 0);
            setState(RadioState.RX_SFD_SEARCH);
          }
        }
      }
      if (rxread++ == rxlen) {
        int crc=memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 2) & 127)] << 8;
        crc+=memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 1) & 127)];
        if (true && crc != rxCrc.getCRCBitrev()) {
          System.out.println("String_Node_Str" + Utils.hex16(crc) + "String_Node_Str"+ Utils.hex16(rxCrc.getCRCBitrev()));
        }
        memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 2) & 127)]=(registers[REG_RSSI]) & 0xff;
        memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 1) & 127)]=37 | (crc == rxCrc.getCRCBitrev() ? 0x80 : 0);
        if (rxfifoLen <= rxlen + 1) {
          setFIFOP(true);
        }
 else {
          System.out.println("String_Node_Str" + rxfifoLen + "String_Node_Str"+ rxlen);
        }
        setSFD(false);
        if (DEBUG)         log("String_Node_Str" + lastPacketStart + "String_Node_Str"+ rxPacketStart);
        if ((autoAck && ackRequest) || shouldAck) {
          System.out.println("String_Node_Str" + lastPacketStart + "String_Node_Str"+ rxlen+ "String_Node_Str"+ dsn+ "String_Node_Str"+ memory[(RAM_RXFIFO + lastPacketStart + 2) & 127]);
          setState(RadioState.TX_ACK_CALIBRATE);
        }
 else {
          setState(RadioState.RX_WAIT);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void receivedByte(byte data){
  log("String_Node_Str" + Utils.hex8(data) + "String_Node_Str"+ stateMachine+ "String_Node_Str"+ zeroSymbols+ ((stateMachine == RadioState.RX_SFD_SEARCH || stateMachine == RadioState.RX_FRAME) ? "String_Node_Str" : "String_Node_Str"));
  if (stateMachine == RadioState.RX_SFD_SEARCH) {
    if (data == 0) {
      zeroSymbols++;
    }
 else     if (zeroSymbols >= 4 && data == 0x7A) {
      setSFD(true);
      if (DEBUG)       log("String_Node_Str");
      rxread=0;
      setState(RadioState.RX_FRAME);
    }
 else {
      zeroSymbols=0;
    }
  }
 else   if (stateMachine == RadioState.RX_FRAME) {
    if (rxfifoLen == 128) {
      setRxOverflow();
    }
 else {
      memory[RAM_RXFIFO + rxfifoWritePos]=data & 0xFF;
      rxfifoWritePos=(rxfifoWritePos + 1) & 127;
      rxfifoLen++;
      if (rxread == 0) {
        rxCrc.setCRC(0);
        rxlen=data & 0xff;
        rxPacketStart=rxfifoWritePos;
        System.out.println("String_Node_Str" + rxfifoWritePos + "String_Node_Str"+ rxlen);
        decodeAddress=false;
        if (DEBUG)         log("String_Node_Str" + rxlen);
        setFIFO(true);
      }
 else       if (rxread < rxlen - 1) {
        rxCrc.addBitrev(data & 0xff);
        if (rxread == 2) {
          if (TYPE_DATA_FRAME == (memory[RAM_RXFIFO + rxPacketStart] & FRAME_TYPE)) {
            decodeAddress=addressDecode;
            ackRequest=(memory[RAM_RXFIFO + rxPacketStart] & ACK_REQUEST) > 0;
            destinationAddressMode=(memory[RAM_RXFIFO + ((rxPacketStart + 1) & 127)] >> 2) & 3;
          }
 else {
            decodeAddress=false;
            ackRequest=false;
          }
          dsn=data & 0xff;
        }
 else         if (rxread == 3) {
          dsn=data & 0xff;
        }
        if (decodeAddress) {
          boolean flushPacket=false;
          if (destinationAddressMode == LONG_ADDRESS && rxread == 8 + 5) {
            int addrPos=rxPacketStart + 5;
            for (int i=0; i < 8; i++) {
              if (memory[RAM_IEEEADDR + i] != memory[RAM_RXFIFO + ((addrPos + i) & 127)]) {
                flushPacket=true;
              }
            }
            decodeAddress=false;
          }
 else           if (destinationAddressMode == SHORT_ADDRESS && rxread == 2 + 5) {
            int addrPos=rxPacketStart + 5;
            boolean bc=true;
            for (int i=0; i < 2; i++) {
              int addrData=memory[RAM_RXFIFO + ((addrPos + i) & 127)];
              if (bc && addrData != 0xff) {
                bc=false;
              }
              if (memory[RAM_SHORTADDR + i] != addrData) {
                flushPacket=true;
              }
            }
            if (bc)             flushPacket=false;
            decodeAddress=false;
          }
          if (flushPacket) {
            rxfifoLen=rxfifoLen - rxread;
            rxfifoWritePos=(rxPacketStart - 1 + 128) & 127;
            System.out.println("String_Node_Str" + rxfifoWritePos);
            setSFD(false);
            setFIFO(rxfifoLen > 0);
            setState(RadioState.RX_SFD_SEARCH);
          }
        }
      }
      if (rxread++ == rxlen) {
        int crc=memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 2) & 127)] << 8;
        crc+=memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 1) & 127)];
        if (true && crc != rxCrc.getCRCBitrev()) {
          System.out.println("String_Node_Str" + Utils.hex16(crc) + "String_Node_Str"+ Utils.hex16(rxCrc.getCRCBitrev()));
        }
        memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 2) & 127)]=(registers[REG_RSSI]) & 0xff;
        memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 1) & 127)]=37 | (crc == rxCrc.getCRCBitrev() ? 0x80 : 0);
        if (rxfifoLen <= rxlen + 1) {
          setFIFOP(true);
        }
 else {
          System.out.println("String_Node_Str" + rxfifoLen + "String_Node_Str"+ rxlen);
        }
        setSFD(false);
        if (DEBUG)         log("String_Node_Str" + lastPacketStart + "String_Node_Str"+ rxPacketStart);
        if ((autoAck && ackRequest) || shouldAck) {
          System.out.println("String_Node_Str" + lastPacketStart + "String_Node_Str"+ rxlen+ "String_Node_Str"+ dsn+ "String_Node_Str"+ memory[RAM_RXFIFO + ((lastPacketStart + 2) & 127)]);
          setState(RadioState.TX_ACK_CALIBRATE);
        }
 else {
          setState(RadioState.RX_WAIT);
        }
      }
    }
  }
}