Program: 184138
Project: 184138
Buggy source:
@Override public void onCreateContextMenu(ContextMenu menu,View view,ContextMenuInfo menuInfo){
  if ((mMode & MODE_MASK_PICKER) == MODE_MASK_PICKER) {
    return;
  }
  AdapterView.AdapterContextMenuInfo info;
  try {
    info=(AdapterView.AdapterContextMenuInfo)menuInfo;
  }
 catch (  ClassCastException e) {
    Log.e(TAG,"String_Node_Str",e);
    return;
  }
  Cursor cursor=(Cursor)getListAdapter().getItem(info.position);
  if (cursor == null) {
    return;
  }
  long id=info.id;
  Uri dataUri=Uri.withAppendedPath(Aggregates.CONTENT_URI,id + "String_Node_Str");
  menu.setHeaderTitle(cursor.getString(NAME_COLUMN_INDEX));
  menu.add(0,MENU_ITEM_VIEW_CONTACT,0,R.string.menu_viewContact).setIntent(new Intent(Intent.ACTION_VIEW,dataUri));
  long phoneId=cursor.getLong(PRIMARY_PHONE_ID_COLUMN_INDEX);
  if (phoneId > 0) {
    CharSequence label=cursor.getString(PRIMARY_PHONE_LABEL_COLUMN_INDEX);
    int type=cursor.getInt(PRIMARY_PHONE_TYPE_COLUMN_INDEX);
    label=ContactsUtils.getDisplayLabel(this,CommonDataKinds.Phone.CONTENT_ITEM_TYPE,type,label);
    Intent intent=new Intent(Intent.ACTION_CALL_PRIVILEGED,ContentUris.withAppendedId(Data.CONTENT_URI,id));
    menu.add(0,MENU_ITEM_CALL,0,String.format(getString(R.string.menu_callNumber),label)).setIntent(intent);
    menu.add(0,MENU_ITEM_SEND_SMS,0,R.string.menu_sendSMS).setIntent(new Intent(Intent.ACTION_SENDTO,Uri.fromParts("String_Node_Str",cursor.getString(PRIMARY_PHONE_NUMBER_COLUMN_INDEX),null)));
  }
  int starState=cursor.getInt(STARRED_COLUMN_INDEX);
  if (starState == 0) {
    menu.add(0,MENU_ITEM_TOGGLE_STAR,0,R.string.menu_addStar);
  }
 else {
    menu.add(0,MENU_ITEM_TOGGLE_STAR,0,R.string.menu_removeStar);
  }
}

Fixed version (ground truth):
@Override public void onCreateContextMenu(ContextMenu menu,View view,ContextMenuInfo menuInfo){
  if ((mMode & MODE_MASK_PICKER) == MODE_MASK_PICKER) {
    return;
  }
  AdapterView.AdapterContextMenuInfo info;
  try {
    info=(AdapterView.AdapterContextMenuInfo)menuInfo;
  }
 catch (  ClassCastException e) {
    Log.e(TAG,"String_Node_Str",e);
    return;
  }
  Cursor cursor=(Cursor)getListAdapter().getItem(info.position);
  if (cursor == null) {
    return;
  }
  long id=info.id;
  Uri dataUri=ContentUris.withAppendedId(Aggregates.CONTENT_URI,id);
  menu.setHeaderTitle(cursor.getString(NAME_COLUMN_INDEX));
  menu.add(0,MENU_ITEM_VIEW_CONTACT,0,R.string.menu_viewContact).setIntent(new Intent(Intent.ACTION_VIEW,dataUri));
  long phoneId=cursor.getLong(PRIMARY_PHONE_ID_COLUMN_INDEX);
  if (phoneId > 0) {
    CharSequence label=cursor.getString(PRIMARY_PHONE_LABEL_COLUMN_INDEX);
    int type=cursor.getInt(PRIMARY_PHONE_TYPE_COLUMN_INDEX);
    label=ContactsUtils.getDisplayLabel(this,CommonDataKinds.Phone.CONTENT_ITEM_TYPE,type,label);
    Intent intent=new Intent(Intent.ACTION_CALL_PRIVILEGED,ContentUris.withAppendedId(Data.CONTENT_URI,id));
    menu.add(0,MENU_ITEM_CALL,0,String.format(getString(R.string.menu_callNumber),label)).setIntent(intent);
    menu.add(0,MENU_ITEM_SEND_SMS,0,R.string.menu_sendSMS).setIntent(new Intent(Intent.ACTION_SENDTO,Uri.fromParts("String_Node_Str",cursor.getString(PRIMARY_PHONE_NUMBER_COLUMN_INDEX),null)));
  }
  int starState=cursor.getInt(STARRED_COLUMN_INDEX);
  if (starState == 0) {
    menu.add(0,MENU_ITEM_TOGGLE_STAR,0,R.string.menu_addStar);
  }
 else {
    menu.add(0,MENU_ITEM_TOGGLE_STAR,0,R.string.menu_removeStar);
  }
}