Program: 184829
Project: 184829
Buggy source:
/** 
 * Enumerates existing VM providers and puts their data into the list and populates the preference list objects with their names. In case we are called with ACTION_ADD_VOICEMAIL intent the intent may have an extra string called "providerToIgnore" with "package.activityName" of the provider which should be hidden when we bring up the list of possible VM providers to choose. This allows a provider which is being disabled (e.g. GV user logging out) to force the user to pick some other provider.
 */
private void initVoiceMailProviders(){
  String providerToIgnore=null;
  if (getIntent().getAction().equals(ACTION_ADD_VOICEMAIL)) {
    providerToIgnore=getIntent().getStringExtra("String_Node_Str");
  }
  mVMProvidersData.clear();
  final String myCarrier=getString(R.string.voicemail_default);
  mVMProvidersData.put("String_Node_Str",new VoiceMailProvider(myCarrier,null));
  PackageManager pm=getPackageManager();
  Intent intent=new Intent();
  intent.setAction(ACTION_CONFIGURE_VOICEMAIL);
  List<ResolveInfo> resolveInfos=pm.queryIntentActivities(intent,0);
  int len=resolveInfos.size() + 1;
  for (int i=0; i < resolveInfos.size(); i++) {
    final ResolveInfo ri=resolveInfos.get(i);
    final ActivityInfo currentActivityInfo=ri.activityInfo;
    final String key=makeKeyForActivity(currentActivityInfo);
    if (key.equals(providerToIgnore)) {
      len--;
      continue;
    }
    final String nameForDisplay=ri.loadLabel(pm).toString();
    Intent providerIntent=new Intent();
    providerIntent.setAction(ACTION_CONFIGURE_VOICEMAIL);
    providerIntent.setClassName(currentActivityInfo.packageName,currentActivityInfo.name);
    mVMProvidersData.put(key,new VoiceMailProvider(nameForDisplay,providerIntent));
  }
  String[] entries=new String[len];
  String[] values=new String[len];
  entries[0]=myCarrier;
  values[0]="String_Node_Str";
  int entryIdx=1;
  for (int i=0; i < resolveInfos.size(); i++) {
    final String key=makeKeyForActivity(resolveInfos.get(i).activityInfo);
    if (!mVMProvidersData.containsKey(key)) {
      continue;
    }
    entries[entryIdx]=mVMProvidersData.get(key).name;
    values[entryIdx]=key;
    entryIdx++;
  }
  mVoicemailProviders.setEntries(entries);
  mVoicemailProviders.setEntryValues(values);
  updateVMPreferenceWidgets(mVoicemailProviders.getValue());
}

Fixed version (ground truth):
/** 
 * Enumerates existing VM providers and puts their data into the list and populates the preference list objects with their names. In case we are called with ACTION_ADD_VOICEMAIL intent the intent may have an extra string called IGNORE_PROVIDER_EXTRA with "package.activityName" of the provider which should be hidden when we bring up the list of possible VM providers to choose. This allows a provider which is being disabled (e.g. GV user logging out) to force the user to pick some other provider.
 */
private void initVoiceMailProviders(){
  String providerToIgnore=null;
  if (getIntent().getAction().equals(ACTION_ADD_VOICEMAIL)) {
    providerToIgnore=getIntent().getStringExtra(IGNORE_PROVIDER_EXTRA);
  }
  mVMProvidersData.clear();
  final String myCarrier=getString(R.string.voicemail_default);
  mVMProvidersData.put("String_Node_Str",new VoiceMailProvider(myCarrier,null));
  PackageManager pm=getPackageManager();
  Intent intent=new Intent();
  intent.setAction(ACTION_CONFIGURE_VOICEMAIL);
  List<ResolveInfo> resolveInfos=pm.queryIntentActivities(intent,0);
  int len=resolveInfos.size() + 1;
  for (int i=0; i < resolveInfos.size(); i++) {
    final ResolveInfo ri=resolveInfos.get(i);
    final ActivityInfo currentActivityInfo=ri.activityInfo;
    final String key=makeKeyForActivity(currentActivityInfo);
    if (key.equals(providerToIgnore)) {
      len--;
      continue;
    }
    final String nameForDisplay=ri.loadLabel(pm).toString();
    Intent providerIntent=new Intent();
    providerIntent.setAction(ACTION_CONFIGURE_VOICEMAIL);
    providerIntent.setClassName(currentActivityInfo.packageName,currentActivityInfo.name);
    mVMProvidersData.put(key,new VoiceMailProvider(nameForDisplay,providerIntent));
  }
  String[] entries=new String[len];
  String[] values=new String[len];
  entries[0]=myCarrier;
  values[0]="String_Node_Str";
  int entryIdx=1;
  for (int i=0; i < resolveInfos.size(); i++) {
    final String key=makeKeyForActivity(resolveInfos.get(i).activityInfo);
    if (!mVMProvidersData.containsKey(key)) {
      continue;
    }
    entries[entryIdx]=mVMProvidersData.get(key).name;
    values[entryIdx]=key;
    entryIdx++;
  }
  mVoicemailProviders.setEntries(entries);
  mVoicemailProviders.setEntryValues(values);
  updateVMPreferenceWidgets(mVoicemailProviders.getValue());
  mPerProviderSavedVMNumbers=this.getApplicationContext().getSharedPreferences(VM_NUMBERS_SHARED_PREFERENCES_NAME,MODE_PRIVATE);
}