Program: 184798
Project: 184798
Buggy source:
/** 
 * Starts the OTA provisioning call.  If the MIN isn't available yet, it returns false and adds an event to return the request to the calling app when it becomes available. 
 * @param context
 * @param handler
 * @param request
 * @return true if we were able to launch Ota activity or it's not required; false otherwise
 */
public static boolean maybeDoOtaCall(Context context,Handler handler,int request){
  PhoneApp app=PhoneApp.getInstance();
  Phone phone=app.phone;
  if (!isCdmaPhone()) {
    if (DBG)     Log.v("String_Node_Str","String_Node_Str");
    return true;
  }
  if (!phone.isMinInfoReady()) {
    if (DBG)     log("String_Node_Str");
    phone.registerForSubscriptionInfoReady(handler,request,null);
    return false;
  }
  phone.unregisterForSubscriptionInfoReady(handler);
  String min=phone.getCdmaMin();
  if (DBG)   log("String_Node_Str" + min);
  boolean phoneNeedsActivation=false;
  try {
    phoneNeedsActivation=needsActivation(min);
  }
 catch (  IllegalArgumentException e) {
    if (DBG)     log("String_Node_Str");
    return true;
  }
  if (DBG)   log("String_Node_Str" + phoneNeedsActivation);
  int otaShowActivationScreen=context.getResources().getInteger(R.integer.OtaShowActivationScreen);
  if (DBG)   log("String_Node_Str" + otaShowActivationScreen);
  if (phoneNeedsActivation && (otaShowActivationScreen == OTA_SHOW_ACTIVATION_SCREEN_ON)) {
    app.cdmaOtaProvisionData.isOtaCallIntentProcessed=false;
    Intent newIntent=new Intent(InCallScreen.ACTION_SHOW_ACTIVATION);
    newIntent.setClass(context,InCallScreen.class);
    newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(newIntent);
    if (DBG)     log("String_Node_Str");
  }
 else {
    if (DBG)     log("String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Starts the OTA provisioning call.  If the MIN isn't available yet, it returns false and adds an event to return the request to the calling app when it becomes available.
 * @param context
 * @param handler
 * @param request
 * @return true if we were able to launch Ota activity or it's not required; false otherwise
 */
public static boolean maybeDoOtaCall(Context context,Handler handler,int request){
  PhoneApp app=PhoneApp.getInstance();
  Phone phone=app.phone;
  if (!isCdmaPhone()) {
    if (DBG)     Log.v("String_Node_Str","String_Node_Str");
    return true;
  }
  if (!phone.isMinInfoReady()) {
    if (DBG)     log("String_Node_Str");
    phone.registerForSubscriptionInfoReady(handler,request,null);
    return false;
  }
  phone.unregisterForSubscriptionInfoReady(handler);
  String min=phone.getCdmaMin();
  if (DBG)   log("String_Node_Str" + min);
  boolean phoneNeedsActivation=false;
  try {
    phoneNeedsActivation=needsActivation(min);
  }
 catch (  IllegalArgumentException e) {
    if (DBG)     log("String_Node_Str");
    return true;
  }
  if (DBG)   log("String_Node_Str" + phoneNeedsActivation);
  int otaShowActivationScreen=context.getResources().getInteger(R.integer.OtaShowActivationScreen);
  if (DBG)   log("String_Node_Str" + otaShowActivationScreen);
  if (phoneNeedsActivation && (otaShowActivationScreen == OTA_SHOW_ACTIVATION_SCREEN_ON)) {
    app.cdmaOtaProvisionData.isOtaCallIntentProcessed=false;
    Intent newIntent=new Intent(InCallScreen.ACTION_SHOW_ACTIVATION);
    newIntent.setClass(context,InCallScreen.class);
    newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(newIntent);
    if (DBG)     log("String_Node_Str");
  }
 else {
    if (DBG)     log("String_Node_Str");
  }
  return true;
}