Program: 184621
Project: 184621
Buggy source:
private void setViewFinder(int w,int h,boolean startPreview){
  if (mPausing)   return;
  if (mPreviewing && w == mViewFinderWidth && h == mViewFinderHeight) {
    return;
  }
  if (!ensureCameraDevice())   return;
  if (mSurfaceHolder == null)   return;
  if (isFinishing())   return;
  if (mPausing)   return;
  mViewFinderWidth=w;
  mViewFinderHeight=h;
  if (mOriginalViewFinderHeight == 0) {
    mOriginalViewFinderWidth=w;
    mOriginalViewFinderHeight=h;
  }
  if (startPreview == false)   return;
  if (mPreviewing)   stopPreview();
  try {
    mCameraDevice.setPreviewDisplay(mSurfaceHolder);
  }
 catch (  IOException exception) {
    mCameraDevice.release();
    mCameraDevice=null;
    return;
  }
  setCameraParameter();
  final long wallTimeStart=SystemClock.elapsedRealtime();
  final long threadTimeStart=Debug.threadCpuTimeNanos();
  final Object watchDogSync=new Object();
  Thread watchDog=new Thread(new Runnable(){
    public void run(){
      int nextWarning=1;
      while (true) {
        try {
synchronized (watchDogSync) {
            watchDogSync.wait(1000);
          }
        }
 catch (        InterruptedException ex) {
        }
        if (mPreviewing)         break;
        int delay=(int)(SystemClock.elapsedRealtime() - wallTimeStart) / 1000;
        if (delay >= nextWarning) {
          Log.e(TAG,"String_Node_Str" + delay + "String_Node_Str");
          if (nextWarning < 60) {
            nextWarning<<=1;
            if (nextWarning == 16) {
              nextWarning=15;
            }
          }
 else {
            nextWarning+=60;
          }
        }
      }
    }
  }
);
  watchDog.start();
  mCameraDevice.setOneShotPreviewCallback(mOneShotPreviewCallback);
  try {
    mCameraDevice.startPreview();
  }
 catch (  Throwable e) {
  }
  mPreviewing=true;
synchronized (watchDogSync) {
    watchDogSync.notify();
  }
  long threadTimeEnd=Debug.threadCpuTimeNanos();
  long wallTimeEnd=SystemClock.elapsedRealtime();
  if ((wallTimeEnd - wallTimeStart) > 3000) {
    Log.w(TAG,"String_Node_Str" + (wallTimeEnd - wallTimeStart) + "String_Node_Str"+ (threadTimeEnd - threadTimeStart) / 1000000 + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void setViewFinder(int w,int h,boolean startPreview){
  if (mPausing)   return;
  if (mPreviewing && w == mViewFinderWidth && h == mViewFinderHeight) {
    return;
  }
  if (!ensureCameraDevice())   return;
  if (mSurfaceHolder == null)   return;
  if (isFinishing())   return;
  if (mPausing)   return;
  mViewFinderWidth=w;
  mViewFinderHeight=h;
  if (mOriginalViewFinderHeight == 0) {
    mOriginalViewFinderWidth=w;
    mOriginalViewFinderHeight=h;
  }
  if (startPreview == false)   return;
  if (mPreviewing)   stopPreview();
  try {
    mCameraDevice.setPreviewDisplay(mSurfaceHolder);
  }
 catch (  IOException exception) {
    mCameraDevice.release();
    mCameraDevice=null;
    return;
  }
  setCameraParameter();
  final long wallTimeStart=SystemClock.elapsedRealtime();
  final long threadTimeStart=Debug.threadCpuTimeNanos();
  mCameraDevice.setOneShotPreviewCallback(mOneShotPreviewCallback);
  try {
    mCameraDevice.startPreview();
  }
 catch (  Throwable e) {
  }
  mPreviewing=true;
  long threadTimeEnd=Debug.threadCpuTimeNanos();
  long wallTimeEnd=SystemClock.elapsedRealtime();
  if ((wallTimeEnd - wallTimeStart) > 3000) {
    Log.w(TAG,"String_Node_Str" + (wallTimeEnd - wallTimeStart) + "String_Node_Str"+ (threadTimeEnd - threadTimeStart) / 1000000 + "String_Node_Str");
  }
}