Program: 24439
Project: 24439
Buggy source:
/** 
 * Initialize video recorder to record video
 */
private void initRecorder(){
  try {
    File dir=new File(folderPath);
    if (!dir.exists()) {
      dir.mkdirs();
    }
    mCamera.stopPreview();
    mCamera.unlock();
    videofile=new File(dir,fileName + "String_Node_Str");
    recorder.setCamera(mCamera);
    recorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
    recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    recorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));
    recorder.setOutputFile(videofile.getAbsolutePath());
    recorder.setPreviewDisplay(mPreview.getHolder().getSurface());
    recorder.setMaxDuration(video_duration * 1000);
    recorder.setOnInfoListener(new OnInfoListener(){
      @Override public void onInfo(      MediaRecorder mr,      int what,      int extra){
        if (what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
          mExecutorService.shutdown();
          mSoundEffects.camcorderStop();
          mCamera.stopPreview();
          mOverlay.setMode(Mode.PLAIN);
          Intent intent=new Intent();
          intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
          intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
          setResult(RESULT_OK,intent);
          MediaScannerConnection.scanFile(CuxtomCamActivity.this,new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
        }
      }
    }
);
    recorder.prepare();
    recorder.start();
  }
 catch (  Exception e) {
    Log.e("String_Node_Str",e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Initialize video recorder to record video
 */
private void initRecorder(){
  try {
    File dir=new File(folderPath);
    if (!dir.exists()) {
      dir.mkdirs();
    }
    mCamera.stopPreview();
    mCamera.unlock();
    videofile=new File(dir,fileName + "String_Node_Str");
    recorder.setCamera(mCamera);
    recorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
    recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    recorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));
    recorder.setOutputFile(videofile.getAbsolutePath());
    recorder.setPreviewDisplay(mPreview.getHolder().getSurface());
    recorder.setMaxDuration(video_duration * 1000);
    recorder.setOnInfoListener(new OnInfoListener(){
      @Override public void onInfo(      MediaRecorder mr,      int what,      int extra){
        if (what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
          mExecutorService.shutdown();
          mCamera.stopPreview();
          mSoundEffects.camcorderStop();
          mOverlay.setMode(Mode.PLAIN);
          Intent intent=new Intent();
          intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
          intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
          setResult(RESULT_OK,intent);
          MediaScannerConnection.scanFile(CuxtomCamActivity.this,new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
        }
      }
    }
);
    recorder.prepare();
    recorder.start();
  }
 catch (  Exception e) {
    Log.e("String_Node_Str",e.getMessage());
  }
}