Program: 199366
Project: 199366
Buggy source:
@Override public void onResultReceived(CameraMetadataNative result,CaptureResultExtras resultExtras) throws RemoteException {
  int requestId=resultExtras.getRequestId();
  if (DEBUG) {
    Log.d(TAG,"String_Node_Str" + requestId);
  }
  final CaptureListenerHolder holder;
synchronized (mLock) {
    holder=CameraDevice.this.mCaptureListenerMap.get(requestId);
  }
  Boolean quirkPartial=result.get(CaptureResult.QUIRKS_PARTIAL_RESULT);
  boolean quirkIsPartialResult=(quirkPartial != null && quirkPartial);
  if (holder == null) {
    if (DEBUG) {
      Log.v(TAG,"String_Node_Str");
    }
    return;
  }
  if (isClosed()) {
    if (DEBUG) {
      Log.v(TAG,"String_Node_Str");
    }
    return;
  }
  final CaptureRequest request=holder.getRequest(resultExtras.getSubsequenceId());
  final CaptureResult resultAsCapture=new CaptureResult(result,request,requestId);
  Runnable resultDispatch=null;
  if (quirkIsPartialResult) {
    resultDispatch=new Runnable(){
      @Override public void run(){
        if (!CameraDevice.this.isClosed()) {
          holder.getListener().onCapturePartial(CameraDevice.this,request,resultAsCapture);
        }
      }
    }
;
  }
 else {
    resultDispatch=new Runnable(){
      @Override public void run(){
        if (!CameraDevice.this.isClosed()) {
          holder.getListener().onCaptureCompleted(CameraDevice.this,request,resultAsCapture);
        }
      }
    }
;
  }
  holder.getHandler().post(resultDispatch);
  if (!quirkIsPartialResult) {
    mFrameNumberTracker.updateTracker(resultExtras.getFrameNumber(),false);
    checkAndFireSequenceComplete();
  }
}

Fixed version (ground truth):
@Override public void onResultReceived(CameraMetadataNative result,CaptureResultExtras resultExtras) throws RemoteException {
  int requestId=resultExtras.getRequestId();
  if (DEBUG) {
    Log.v(TAG,"String_Node_Str" + resultExtras.getFrameNumber() + "String_Node_Str"+ requestId);
  }
  final CaptureListenerHolder holder;
synchronized (mLock) {
    holder=CameraDevice.this.mCaptureListenerMap.get(requestId);
  }
  Boolean quirkPartial=result.get(CaptureResult.QUIRKS_PARTIAL_RESULT);
  boolean quirkIsPartialResult=(quirkPartial != null && quirkPartial);
  if (!quirkIsPartialResult) {
    mFrameNumberTracker.updateTracker(resultExtras.getFrameNumber(),false);
  }
  if (holder == null) {
    if (DEBUG) {
      Log.d(TAG,"String_Node_Str" + resultExtras.getFrameNumber());
    }
    return;
  }
  if (isClosed()) {
    if (DEBUG) {
      Log.d(TAG,"String_Node_Str" + resultExtras.getFrameNumber());
    }
    return;
  }
  final CaptureRequest request=holder.getRequest(resultExtras.getSubsequenceId());
  final CaptureResult resultAsCapture=new CaptureResult(result,request,requestId);
  Runnable resultDispatch=null;
  if (quirkIsPartialResult) {
    resultDispatch=new Runnable(){
      @Override public void run(){
        if (!CameraDevice.this.isClosed()) {
          holder.getListener().onCapturePartial(CameraDevice.this,request,resultAsCapture);
        }
      }
    }
;
  }
 else {
    resultDispatch=new Runnable(){
      @Override public void run(){
        if (!CameraDevice.this.isClosed()) {
          holder.getListener().onCaptureCompleted(CameraDevice.this,request,resultAsCapture);
        }
      }
    }
;
  }
  holder.getHandler().post(resultDispatch);
  if (!quirkIsPartialResult) {
    checkAndFireSequenceComplete();
  }
}