Program: 38270
Project: 38270
Buggy source:
private boolean stopVideoRecording(){
  Log.v(TAG,"String_Node_Str");
  mStopRecPending=true;
  mUI.setSwipingEnabled(true);
  if (!isVideoCaptureIntent()) {
    mUI.showSwitcher();
  }
  boolean fail=false;
  if (mMediaRecorderRecording) {
    boolean shouldAddToMediaStoreNow=false;
    try {
      mMediaRecorder.setOnErrorListener(null);
      mMediaRecorder.setOnInfoListener(null);
      mMediaRecorder.stop();
      shouldAddToMediaStoreNow=true;
      mCurrentVideoFilename=mVideoFilename;
      Log.v(TAG,"String_Node_Str" + mCurrentVideoFilename);
      AccessibilityUtils.makeAnnouncement(mUI.getShutterButton(),mActivity.getString(R.string.video_recording_stopped));
    }
 catch (    RuntimeException e) {
      Log.e(TAG,"String_Node_Str",e);
      if (mVideoFilename != null)       deleteVideoFile(mVideoFilename);
      fail=true;
    }
    mMediaRecorderRecording=false;
    mSnapshotInProgress=false;
    mOrientationManager.unlockOrientation();
    if (mPaused) {
      closeCamera();
    }
    mUI.showRecordingUI(false);
    if (!mIsVideoCaptureIntent) {
      mUI.enableCameraControls(true);
    }
    mUI.setOrientationIndicator(0,true);
    keepScreenOnAwhile();
    if (shouldAddToMediaStoreNow && !fail) {
      if (mVideoFileDescriptor == null) {
        saveVideo();
      }
 else       if (mIsVideoCaptureIntent) {
        showCaptureResult();
      }
    }
  }
  releaseMediaRecorder();
  if (!mPaused) {
    mCameraDevice.lock();
    if (!ApiHelper.HAS_SURFACE_TEXTURE_RECORDING) {
      stopPreview();
      mUI.hideSurfaceView();
      startPreview();
    }
  }
  if (!mPaused)   mParameters=mCameraDevice.getParameters();
  UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA,fail ? UsageStatistics.ACTION_CAPTURE_FAIL : UsageStatistics.ACTION_CAPTURE_DONE,"String_Node_Str",SystemClock.uptimeMillis() - mRecordingStartTime + mRecordingTotalTime);
  mStopRecPending=false;
  return fail;
}

Fixed version (ground truth):
private boolean stopVideoRecording(){
  Log.v(TAG,"String_Node_Str");
  mStopRecPending=true;
  mUI.setSwipingEnabled(true);
  if (!isVideoCaptureIntent()) {
    mUI.showSwitcher();
  }
  boolean fail=false;
  if (mMediaRecorderRecording) {
    boolean shouldAddToMediaStoreNow=false;
    try {
      mMediaRecorder.setOnErrorListener(null);
      mMediaRecorder.setOnInfoListener(null);
      mMediaRecorder.stop();
      shouldAddToMediaStoreNow=true;
      mCurrentVideoFilename=mVideoFilename;
      Log.v(TAG,"String_Node_Str" + mCurrentVideoFilename);
      AccessibilityUtils.makeAnnouncement(mUI.getShutterButton(),mActivity.getString(R.string.video_recording_stopped));
    }
 catch (    RuntimeException e) {
      Log.e(TAG,"String_Node_Str",e);
      if (mVideoFilename != null)       deleteVideoFile(mVideoFilename);
      fail=true;
    }
    mMediaRecorderRecording=false;
    mSnapshotInProgress=false;
    mOrientationManager.unlockOrientation();
    if (mPaused) {
      closeCamera();
    }
    mUI.showRecordingUI(false);
    if (!mIsVideoCaptureIntent) {
      mUI.enableCameraControls(true);
    }
    mUI.setOrientationIndicator(0,true);
    keepScreenOnAwhile();
    if (shouldAddToMediaStoreNow && !fail) {
      if (mVideoFileDescriptor == null) {
        saveVideo();
      }
 else       if (mIsVideoCaptureIntent) {
        showCaptureResult();
      }
    }
  }
  releaseMediaRecorder();
  if (!mPaused) {
    mCameraDevice.lock();
    if (!ApiHelper.HAS_SURFACE_TEXTURE_RECORDING) {
      stopPreview();
      mUI.hideSurfaceView();
      startPreview();
    }
  }
  if (!mPaused)   mParameters=mCameraDevice.getParameters();
  UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA,fail ? UsageStatistics.ACTION_CAPTURE_FAIL : UsageStatistics.ACTION_CAPTURE_DONE,"String_Node_Str",mMediaRecorderPausing ? mRecordingTotalTime : SystemClock.uptimeMillis() - mRecordingStartTime + mRecordingTotalTime);
  mStopRecPending=false;
  return fail;
}