Program: 184863
Project: 184863
Buggy source:
@Override public void handleMessage(Message msg){
switch (msg.what) {
case PHONE_NEW_RINGING_CONNECTION:
    if (DBG)     log("String_Node_Str");
  onNewRingingConnection((AsyncResult)msg.obj);
mSilentRingerRequested=false;
break;
case PHONE_INCOMING_RING:
if (msg.obj != null && ((AsyncResult)msg.obj).result != null && ((GSMPhone)((AsyncResult)msg.obj).result).getState() == Phone.State.RINGING && mSilentRingerRequested == false) {
if (DBG) log("String_Node_Str");
mRinger.ring();
}
 else {
if (DBG) log("String_Node_Str");
}
break;
case PHONE_STATE_CHANGED:
onPhoneStateChanged((AsyncResult)msg.obj);
break;
case PHONE_DISCONNECT:
if (DBG) log("String_Node_Str");
onDisconnect((AsyncResult)msg.obj);
break;
case PHONE_UNKNOWN_CONNECTION_APPEARED:
onUnknownConnectionAppeared((AsyncResult)msg.obj);
break;
case RINGER_CUSTOM_RINGTONE_QUERY_TIMEOUT:
Log.w(LOG_TAG,"String_Node_Str");
onCustomRingQueryComplete();
break;
case PHONE_MWI_CHANGED:
onMwiChanged(mPhone.getMessageWaitingIndicator());
break;
case PHONE_BATTERY_LOW:
onBatteryLow();
break;
case PHONE_CDMA_CALL_WAITING:
if (DBG) log("String_Node_Str");
onCdmaCallWaiting((AsyncResult)msg.obj);
break;
case CALLWAITING_CALLERINFO_DISPLAY_DONE:
if (DBG) log("String_Node_Str");
mCallWaitingTimeOut=true;
onCdmaCallWaitingReject();
break;
case CALLWAITING_ADDCALL_DISABLE_TIMEOUT:
if (DBG) log("String_Node_Str");
mApplication.cdmaPhoneCallState.setAddCallMenuStateAfterCallWaiting(true);
break;
case PHONE_STATE_DISPLAYINFO:
if (DBG) log("String_Node_Str");
onDisplayInfo((AsyncResult)msg.obj);
break;
case PHONE_STATE_SIGNALINFO:
if (DBG) log("String_Node_Str");
onSignalInfo((AsyncResult)msg.obj);
break;
case DISPLAYINFO_NOTIFICATION_DONE:
if (DBG) log("String_Node_Str");
CdmaDisplayInfo.dismissDisplayInfoRecord();
break;
case EVENT_OTA_PROVISION_CHANGE:
mApplication.handleOtaEvents(msg);
break;
case PHONE_ENHANCED_VP_ON:
if (DBG) log("String_Node_Str");
if (!mCdmaVoicePrivacyState) {
int toneToPlay=InCallTonePlayer.TONE_VOICE_PRIVACY;
new InCallTonePlayer(toneToPlay).start();
mCdmaVoicePrivacyState=true;
}
break;
case PHONE_ENHANCED_VP_OFF:
if (DBG) log("String_Node_Str");
if (mCdmaVoicePrivacyState) {
int toneToPlay=InCallTonePlayer.TONE_VOICE_PRIVACY;
new InCallTonePlayer(toneToPlay).start();
mCdmaVoicePrivacyState=false;
}
break;
default :
}
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
switch (msg.what) {
case PHONE_NEW_RINGING_CONNECTION:
    if (DBG)     log("String_Node_Str");
  onNewRingingConnection((AsyncResult)msg.obj);
mSilentRingerRequested=false;
break;
case PHONE_INCOMING_RING:
if (msg.obj != null && ((AsyncResult)msg.obj).result != null && ((GSMPhone)((AsyncResult)msg.obj).result).getState() == Phone.State.RINGING && mSilentRingerRequested == false) {
if (DBG) log("String_Node_Str");
mRinger.ring();
}
 else {
if (DBG) log("String_Node_Str");
}
break;
case PHONE_STATE_CHANGED:
onPhoneStateChanged((AsyncResult)msg.obj);
break;
case PHONE_DISCONNECT:
if (DBG) log("String_Node_Str");
onDisconnect((AsyncResult)msg.obj);
break;
case PHONE_UNKNOWN_CONNECTION_APPEARED:
onUnknownConnectionAppeared((AsyncResult)msg.obj);
break;
case RINGER_CUSTOM_RINGTONE_QUERY_TIMEOUT:
Log.w(LOG_TAG,"String_Node_Str");
onCustomRingQueryComplete();
break;
case PHONE_MWI_CHANGED:
onMwiChanged(mPhone.getMessageWaitingIndicator());
break;
case PHONE_BATTERY_LOW:
onBatteryLow();
break;
case PHONE_CDMA_CALL_WAITING:
if (DBG) log("String_Node_Str");
onCdmaCallWaiting((AsyncResult)msg.obj);
break;
case CALLWAITING_CALLERINFO_DISPLAY_DONE:
if (DBG) log("String_Node_Str");
mCallWaitingTimeOut=true;
onCdmaCallWaitingReject();
break;
case CALLWAITING_ADDCALL_DISABLE_TIMEOUT:
if (DBG) log("String_Node_Str");
mApplication.cdmaPhoneCallState.setAddCallMenuStateAfterCallWaiting(true);
break;
case PHONE_STATE_DISPLAYINFO:
if (DBG) log("String_Node_Str");
onDisplayInfo((AsyncResult)msg.obj);
break;
case PHONE_STATE_SIGNALINFO:
if (DBG) log("String_Node_Str");
onSignalInfo((AsyncResult)msg.obj);
break;
case DISPLAYINFO_NOTIFICATION_DONE:
if (DBG) log("String_Node_Str");
CdmaDisplayInfo.dismissDisplayInfoRecord();
break;
case EVENT_OTA_PROVISION_CHANGE:
mApplication.handleOtaEvents(msg);
break;
case PHONE_ENHANCED_VP_ON:
if (DBG) log("String_Node_Str");
if (!mCdmaVoicePrivacyState) {
int toneToPlay=InCallTonePlayer.TONE_VOICE_PRIVACY;
new InCallTonePlayer(toneToPlay).start();
mCdmaVoicePrivacyState=true;
NotificationMgr.getDefault().updateInCallNotification();
}
break;
case PHONE_ENHANCED_VP_OFF:
if (DBG) log("String_Node_Str");
if (mCdmaVoicePrivacyState) {
int toneToPlay=InCallTonePlayer.TONE_VOICE_PRIVACY;
new InCallTonePlayer(toneToPlay).start();
mCdmaVoicePrivacyState=false;
NotificationMgr.getDefault().updateInCallNotification();
}
break;
default :
}
}