Program: 164519
Project: 164519
Buggy source:
/** 
 * Handles the Bundle arguments if they exists
 * @param savedInstanceState
 */
private void handleBundle(Bundle savedInstanceState){
  int uploadType=UPLOAD_TYPE_LINK;
  if (savedInstanceState == null) {
    if (getIntent().getExtras() != null) {
      Intent intent=getIntent();
      if (Intent.ACTION_SEND.equals(intent.getAction())) {
        String type=intent.getType();
        LogUtil.v(TAG,"String_Node_Str" + type);
        if ("String_Node_Str".equals(type)) {
          String link=intent.getStringExtra(Intent.EXTRA_TEXT);
          init(true);
          mLink.setText(link);
        }
 else {
          Uri photoUri=intent.getParcelableExtra(Intent.EXTRA_STREAM);
          init(false);
          decodeUri(photoUri);
        }
        return;
      }
 else {
        uploadType=getIntent().getExtras().getInt(KEY_UPLOAD_TYPE,UPLOAD_TYPE_LINK);
      }
    }
    if (uploadType != UPLOAD_TYPE_LINK) {
      int requestCode=uploadType == UPLOAD_TYPE_GALLERY ? REQUEST_CODE_GALLERY : REQUEST_CODE_CAMERA;
      startActivityForResult(createPhotoIntent(uploadType),requestCode);
    }
  }
 else {
    uploadType=savedInstanceState.getInt(KEY_UPLOAD_TYPE,UPLOAD_TYPE_LINK);
    mIsUploading=savedInstanceState.getBoolean(KEY_IS_UPLOADING,false);
switch (uploadType) {
case UPLOAD_TYPE_CAMERA:
      mCameraFile=new File(savedInstanceState.getString(KEY_FILE_PATH));
    new LoadImageTask(this).execute(mCameraFile);
  mLink.setVisibility(View.GONE);
break;
case UPLOAD_TYPE_GALLERY:
mTempFile=new File(savedInstanceState.getString(KEY_FILE_PATH));
new LoadImageTask(this).execute(mTempFile);
mLink.setVisibility(View.GONE);
break;
case UPLOAD_TYPE_LINK:
break;
}
if (mIsUploading) {
showDialogFragment(LoadingDialogFragment.createInstance(R.string.uploading,false),DFRAGMENT_UPLOADING);
}
}
init(uploadType == UPLOAD_TYPE_LINK);
}

Fixed version (ground truth):
/** 
 * Handles the Bundle arguments if they exists
 * @param savedInstanceState
 */
private void handleBundle(Bundle savedInstanceState){
  int uploadType=UPLOAD_TYPE_LINK;
  if (savedInstanceState == null) {
    if (getIntent().getExtras() != null) {
      Intent intent=getIntent();
      if (Intent.ACTION_SEND.equals(intent.getAction())) {
        String type=intent.getType();
        LogUtil.v(TAG,"String_Node_Str" + type);
        if ("String_Node_Str".equals(type)) {
          String link=intent.getStringExtra(Intent.EXTRA_TEXT);
          init(true);
          mLink.setText(link);
        }
 else {
          Uri photoUri=intent.getParcelableExtra(Intent.EXTRA_STREAM);
          init(false);
          decodeUri(photoUri);
        }
        return;
      }
 else {
        uploadType=getIntent().getExtras().getInt(KEY_UPLOAD_TYPE,UPLOAD_TYPE_LINK);
      }
    }
    if (uploadType != UPLOAD_TYPE_LINK) {
      int requestCode=uploadType == UPLOAD_TYPE_GALLERY ? REQUEST_CODE_GALLERY : REQUEST_CODE_CAMERA;
      Intent intent=createPhotoIntent(uploadType);
      if (intent.resolveActivity(getPackageManager()) != null) {
        startActivityForResult(createPhotoIntent(uploadType),requestCode);
      }
 else {
        finish();
        Toast.makeText(getApplicationContext(),R.string.cant_launch_intent,Toast.LENGTH_SHORT).show();
      }
    }
  }
 else {
    uploadType=savedInstanceState.getInt(KEY_UPLOAD_TYPE,UPLOAD_TYPE_LINK);
    mIsUploading=savedInstanceState.getBoolean(KEY_IS_UPLOADING,false);
switch (uploadType) {
case UPLOAD_TYPE_CAMERA:
      mCameraFile=new File(savedInstanceState.getString(KEY_FILE_PATH));
    new LoadImageTask(this).execute(mCameraFile);
  mLink.setVisibility(View.GONE);
break;
case UPLOAD_TYPE_GALLERY:
mTempFile=new File(savedInstanceState.getString(KEY_FILE_PATH));
new LoadImageTask(this).execute(mTempFile);
mLink.setVisibility(View.GONE);
break;
case UPLOAD_TYPE_LINK:
break;
}
if (mIsUploading) {
showDialogFragment(LoadingDialogFragment.createInstance(R.string.uploading,false),DFRAGMENT_UPLOADING);
}
}
init(uploadType == UPLOAD_TYPE_LINK);
}