Program: 44503
Project: 44503
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (LOCAL_LOGV) {
    Log.v(TAG,"String_Node_Str" + requestCode + "String_Node_Str"+ resultCode+ "String_Node_Str"+ data);
  }
  mWaitingForSubActivity=false;
  if (data == null) {
    return;
  }
switch (requestCode) {
case REQUEST_CODE_CREATE_SLIDESHOW:
    if (data != null) {
      WorkingMessage newMessage=WorkingMessage.load(this,data.getData());
      if (newMessage != null) {
        mWorkingMessage=newMessage;
        mWorkingMessage.setConversation(mConversation);
        mAttachmentEditor.update(mWorkingMessage);
        drawTopPanel();
        updateSendButtonState();
      }
    }
  break;
case REQUEST_CODE_TAKE_PICTURE:
Bitmap bitmap=(Bitmap)data.getParcelableExtra("String_Node_Str");
if (bitmap == null) {
handleAddAttachmentError(WorkingMessage.UNKNOWN_ERROR,R.string.type_picture);
return;
}
addImage(bitmap);
break;
case REQUEST_CODE_ATTACH_IMAGE:
addImage(data.getData(),false);
break;
case REQUEST_CODE_TAKE_VIDEO:
case REQUEST_CODE_ATTACH_VIDEO:
addVideo(data.getData(),false);
break;
case REQUEST_CODE_ATTACH_SOUND:
Uri uri=(Uri)data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (Settings.System.DEFAULT_RINGTONE_URI.equals(uri)) {
break;
}
addAudio(uri);
break;
case REQUEST_CODE_RECORD_SOUND:
addAudio(data.getData());
break;
case REQUEST_CODE_ECM_EXIT_DIALOG:
boolean outOfEmergencyMode=data.getBooleanExtra(EXIT_ECM_RESULT,false);
if (outOfEmergencyMode) {
sendMessage(false);
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (DEBUG) {
    log("String_Node_Str" + requestCode + "String_Node_Str"+ resultCode+ "String_Node_Str"+ data);
  }
  mWaitingForSubActivity=false;
  if (requestCode != REQUEST_CODE_TAKE_PICTURE) {
    if (data == null) {
      return;
    }
  }
 else   if (resultCode != RESULT_OK) {
    if (DEBUG)     log("String_Node_Str" + resultCode);
    return;
  }
switch (requestCode) {
case REQUEST_CODE_CREATE_SLIDESHOW:
    if (data != null) {
      WorkingMessage newMessage=WorkingMessage.load(this,data.getData());
      if (newMessage != null) {
        mWorkingMessage=newMessage;
        mWorkingMessage.setConversation(mConversation);
        mAttachmentEditor.update(mWorkingMessage);
        drawTopPanel();
        updateSendButtonState();
      }
    }
  break;
case REQUEST_CODE_TAKE_PICTURE:
{
  Bitmap bitmap=BitmapFactory.decodeFile(Mms.ScrapSpace.SCRAP_FILE_PATH);
  if (bitmap == null) {
    handleAddAttachmentError(WorkingMessage.UNKNOWN_ERROR,R.string.type_picture);
    return;
  }
  addImage(bitmap);
  break;
}
case REQUEST_CODE_ATTACH_IMAGE:
{
addImage(data.getData(),false);
break;
}
case REQUEST_CODE_TAKE_VIDEO:
case REQUEST_CODE_ATTACH_VIDEO:
addVideo(data.getData(),false);
break;
case REQUEST_CODE_ATTACH_SOUND:
{
Uri uri=(Uri)data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (Settings.System.DEFAULT_RINGTONE_URI.equals(uri)) {
break;
}
addAudio(uri);
break;
}
case REQUEST_CODE_RECORD_SOUND:
addAudio(data.getData());
break;
case REQUEST_CODE_ECM_EXIT_DIALOG:
boolean outOfEmergencyMode=data.getBooleanExtra(EXIT_ECM_RESULT,false);
if (outOfEmergencyMode) {
sendMessage(false);
}
break;
default :
break;
}
}