Program: 43294
Project: 43294
Buggy source:
/** 
 * This function checks if there is a plus sign (+) in the passed-in dialing number. If there is, it processes the plus sign based on the default telephone numbering plan of the system when the phone is activated and the current telephone numbering plan of the system that the phone is camped on. Currently, we only support the case that the default and current telephone numbering plans are North American Numbering Plan(NANP). The passed-in dialStr should only contain the valid format as described below, 1) the 1st character in the dialStr should be one of the really dialable characters listed below ISO-LATIN characters 0-9, *, # , + 2) the dialStr should already strip out the separator characters, every character in the dialStr should be one of the non separator characters listed below ISO-LATIN characters 0-9, *, # , +, WILD, WAIT, PAUSE Otherwise, this function returns the dial string passed in This API is for CDMA only
 * @hide TODO: pending API Council approval
 */
public static String cdmaCheckAndProcessPlusCode(String dialStr){
  if (!TextUtils.isEmpty(dialStr)) {
    if (isReallyDialable(dialStr.charAt(0)) && isNonSeparator(dialStr)) {
      return cdmaCheckAndProcessPlusCodeByNumberFormat(dialStr,getFormatTypeForLocale(Locale.getDefault()));
    }
  }
  return dialStr;
}

Fixed version (ground truth):
/** 
 * This function checks if there is a plus sign (+) in the passed-in dialing number. If there is, it processes the plus sign based on the default telephone numbering plan of the system when the phone is activated and the current telephone numbering plan of the system that the phone is camped on. Currently, we only support the case that the default and current telephone numbering plans are North American Numbering Plan(NANP). The passed-in dialStr should only contain the valid format as described below, 1) the 1st character in the dialStr should be one of the really dialable characters listed below ISO-LATIN characters 0-9, *, # , + 2) the dialStr should already strip out the separator characters, every character in the dialStr should be one of the non separator characters listed below ISO-LATIN characters 0-9, *, # , +, WILD, WAIT, PAUSE Otherwise, this function returns the dial string passed in
 * @param dialStr the original dial string
 * @return the converted dial string if the current/default countries belong to NANP,and if there is the "+" in the original dial string. Otherwise, the original dial string returns. This API is for CDMA only
 * @hide TODO: pending API Council approval
 */
public static String cdmaCheckAndProcessPlusCode(String dialStr){
  if (!TextUtils.isEmpty(dialStr)) {
    if (isReallyDialable(dialStr.charAt(0)) && isNonSeparator(dialStr)) {
      String currIso=SystemProperties.get(PROPERTY_OPERATOR_ISO_COUNTRY,"String_Node_Str");
      String defaultIso=SystemProperties.get(PROPERTY_ICC_OPERATOR_ISO_COUNTRY,"String_Node_Str");
      if (!TextUtils.isEmpty(currIso) && !TextUtils.isEmpty(defaultIso)) {
        return cdmaCheckAndProcessPlusCodeByNumberFormat(dialStr,getFormatTypeFromCountryCode(currIso),getFormatTypeFromCountryCode(defaultIso));
      }
    }
  }
  return dialStr;
}