Program: 5542
Project: 5542
Buggy source:
private void strobe(int data){
  if (DEBUG) {
    log("String_Node_Str" + Utils.hex8(data) + "String_Node_Str"+ Reg.values()[data]);
  }
  if ((stateMachine == RadioState.POWER_DOWN) && (data != REG_SXOSCON)) {
    if (DEBUG)     log("String_Node_Str" + data + "String_Node_Str");
    return;
  }
switch (data) {
case REG_SNOP:
    if (DEBUG)     log("String_Node_Str" + Utils.hex8(status) + "String_Node_Str"+ cpu.cycles);
  break;
case REG_SRXON:
if (stateMachine == RadioState.IDLE) {
  setState(RadioState.RX_CALIBRATE);
  if (DEBUG) {
    log("String_Node_Str");
  }
}
 else {
  if (DEBUG)   log("String_Node_Str");
}
break;
case REG_SRFOFF:
if (DEBUG) {
log("String_Node_Str" + cpu.cycles);
if (stateMachine == RadioState.TX_ACK || stateMachine == RadioState.TX_FRAME || stateMachine == RadioState.RX_FRAME) {
log("String_Node_Str" + stateMachine);
}
}
setState(RadioState.IDLE);
break;
case REG_STXON:
if ((stateMachine == RadioState.IDLE) || (stateMachine == RadioState.RX_CALIBRATE) || (stateMachine == RadioState.RX_SFD_SEARCH)|| (stateMachine == RadioState.RX_FRAME)|| (stateMachine == RadioState.RX_OVERFLOW)|| (stateMachine == RadioState.RX_WAIT)) {
status|=STATUS_TX_ACTIVE;
setState(RadioState.TX_CALIBRATE);
if (sendEvents) {
sendEvent("String_Node_Str",null);
}
if (DEBUG) log("String_Node_Str" + cpu.cycles);
}
break;
case REG_STXONCCA:
if ((stateMachine == RadioState.RX_CALIBRATE) || (stateMachine == RadioState.RX_SFD_SEARCH) || (stateMachine == RadioState.RX_FRAME)|| (stateMachine == RadioState.RX_OVERFLOW)|| (stateMachine == RadioState.RX_WAIT)) {
if (sendEvents) {
sendEvent("String_Node_Str",null);
}
if (cca) {
status|=STATUS_TX_ACTIVE;
setState(RadioState.TX_CALIBRATE);
if (DEBUG) log("String_Node_Str" + cpu.cycles);
}
 else {
if (DEBUG) log("String_Node_Str");
}
}
break;
case REG_SFLUSHRX:
flushRX();
break;
case REG_SFLUSHTX:
if (DEBUG) log("String_Node_Str");
flushTX();
break;
case REG_SXOSCON:
startOscillator();
break;
case REG_SXOSCOFF:
stopOscillator();
break;
case REG_SACK:
setState(RadioState.TX_ACK_CALIBRATE);
break;
default :
if (DEBUG) {
log("String_Node_Str" + data);
}
break;
}
}

Fixed version (ground truth):
private void strobe(int data){
  if (DEBUG) {
    log("String_Node_Str" + Utils.hex8(data) + "String_Node_Str"+ Reg.values()[data]);
  }
  if ((stateMachine == RadioState.POWER_DOWN) && (data != REG_SXOSCON)) {
    if (DEBUG)     log("String_Node_Str" + data + "String_Node_Str");
    return;
  }
switch (data) {
case REG_SNOP:
    if (DEBUG)     log("String_Node_Str" + Utils.hex8(status) + "String_Node_Str"+ cpu.cycles);
  break;
case REG_SRXON:
if (stateMachine == RadioState.IDLE) {
  setState(RadioState.RX_CALIBRATE);
  if (DEBUG) {
    log("String_Node_Str");
  }
}
 else {
  if (DEBUG)   log("String_Node_Str");
}
break;
case REG_SRFOFF:
if (DEBUG) {
log("String_Node_Str" + cpu.cycles);
if (stateMachine == RadioState.TX_ACK || stateMachine == RadioState.TX_FRAME || stateMachine == RadioState.RX_FRAME) {
log("String_Node_Str" + stateMachine);
}
}
setState(RadioState.IDLE);
break;
case REG_STXON:
if ((stateMachine == RadioState.IDLE) || (stateMachine == RadioState.RX_CALIBRATE) || (stateMachine == RadioState.RX_SFD_SEARCH)|| (stateMachine == RadioState.RX_FRAME)|| (stateMachine == RadioState.RX_OVERFLOW)|| (stateMachine == RadioState.RX_WAIT)) {
status|=STATUS_TX_ACTIVE;
setState(RadioState.TX_CALIBRATE);
if (sendEvents) {
sendEvent("String_Node_Str",null);
}
if (DEBUG) log("String_Node_Str" + cpu.cycles);
}
break;
case REG_STXONCCA:
if ((stateMachine == RadioState.RX_CALIBRATE) || (stateMachine == RadioState.RX_SFD_SEARCH) || (stateMachine == RadioState.RX_FRAME)|| (stateMachine == RadioState.RX_OVERFLOW)|| (stateMachine == RadioState.RX_WAIT)) {
if (sendEvents) {
sendEvent("String_Node_Str",null);
}
if (cca) {
status|=STATUS_TX_ACTIVE;
setState(RadioState.TX_CALIBRATE);
if (DEBUG) log("String_Node_Str" + cpu.cycles);
}
 else {
if (DEBUG) log("String_Node_Str");
}
}
break;
case REG_SFLUSHRX:
flushRX();
break;
case REG_SFLUSHTX:
if (DEBUG) log("String_Node_Str");
flushTX();
break;
case REG_SXOSCON:
startOscillator();
break;
case REG_SXOSCOFF:
stopOscillator();
break;
case REG_SACK:
if (stateMachine == RadioState.RX_FRAME) {
shouldAck=true;
}
 else if (crcOk) {
setState(RadioState.TX_ACK_CALIBRATE);
}
break;
default :
if (DEBUG) {
log("String_Node_Str" + data);
}
break;
}
}