Program: 194309
Project: 194309
Buggy source:
public void reportAssistContextExtras(IBinder token,Bundle extras,AssistStructure structure,AssistContent content,Uri referrer){
  PendingAssistExtras pae=(PendingAssistExtras)token;
synchronized (pae) {
    pae.result=extras;
    pae.structure=structure;
    pae.content=content;
    if (referrer != null) {
      pae.extras.putParcelable(Intent.EXTRA_REFERRER,referrer);
    }
    pae.haveResult=true;
    pae.notifyAll();
    if (pae.intent == null && pae.receiver == null) {
      return;
    }
  }
synchronized (this) {
    buildAssistBundleLocked(pae,extras);
    boolean exists=mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
    if (!exists) {
      return;
    }
    if (pae.receiver != null) {
      Bundle topBundle=new Bundle();
      topBundle.putBundle("String_Node_Str",pae.extras);
      topBundle.putParcelable("String_Node_Str",pae.structure);
      topBundle.putParcelable("String_Node_Str",pae.content);
      try {
        pae.receiver.send(0,topBundle);
      }
 catch (      RemoteException e) {
      }
      return;
    }
  }
  long ident=Binder.clearCallingIdentity();
  try {
    pae.intent.replaceExtras(pae.extras);
    pae.intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
    closeSystemDialogs("String_Node_Str");
    try {
      mContext.startActivityAsUser(pae.intent,new UserHandle(pae.userHandle));
    }
 catch (    ActivityNotFoundException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}

Fixed version (ground truth):
public void reportAssistContextExtras(IBinder token,Bundle extras,AssistStructure structure,AssistContent content,Uri referrer){
  PendingAssistExtras pae=(PendingAssistExtras)token;
synchronized (pae) {
    pae.result=extras;
    pae.structure=structure;
    pae.content=content;
    if (referrer != null) {
      pae.extras.putParcelable(Intent.EXTRA_REFERRER,referrer);
    }
    pae.haveResult=true;
    pae.notifyAll();
    if (pae.intent == null && pae.receiver == null) {
      return;
    }
  }
  IResultReceiver sendReceiver=null;
  Bundle sendBundle=null;
synchronized (this) {
    buildAssistBundleLocked(pae,extras);
    boolean exists=mPendingAssistExtras.remove(pae);
    mHandler.removeCallbacks(pae);
    if (!exists) {
      return;
    }
    if ((sendReceiver=pae.receiver) != null) {
      sendBundle=new Bundle();
      sendBundle.putBundle("String_Node_Str",pae.extras);
      sendBundle.putParcelable("String_Node_Str",pae.structure);
      sendBundle.putParcelable("String_Node_Str",pae.content);
    }
  }
  if (sendReceiver != null) {
    try {
      sendReceiver.send(0,sendBundle);
    }
 catch (    RemoteException e) {
    }
    return;
  }
  long ident=Binder.clearCallingIdentity();
  try {
    pae.intent.replaceExtras(pae.extras);
    pae.intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
    closeSystemDialogs("String_Node_Str");
    try {
      mContext.startActivityAsUser(pae.intent,new UserHandle(pae.userHandle));
    }
 catch (    ActivityNotFoundException e) {
      Slog.w(TAG,"String_Node_Str",e);
    }
  }
  finally {
    Binder.restoreCallingIdentity(ident);
  }
}