Program: 163831
Project: 163831
Buggy source:
protected static List<ContentValues> getValuesForEvents(VCard vCard){
  List<ContentValues> valuesList=new LinkedList<ContentValues>();
  if (vCard.getBirthday() != null && vCard.getBirthday().getDate() != null) {
    SimpleDateFormat formatter=new SimpleDateFormat("String_Node_Str",Locale.US);
    ContentValues values=new ContentValues();
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY);
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,formatter.format(vCard.getBirthday().getDate()));
    valuesList.add(values);
  }
  if (vCard.getExtendedProperty(PROPERTY_EVENT_ANNIVERSARY) != null) {
    ContentValues values=new ContentValues();
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_ANNIVERSARY);
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,vCard.getExtendedProperty(PROPERTY_EVENT_ANNIVERSARY).getValue());
    valuesList.add(values);
  }
  if (vCard.getExtendedProperty(PROPERTY_EVENT_OTHER) != null) {
    ContentValues values=new ContentValues();
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_OTHER);
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,vCard.getExtendedProperty(PROPERTY_EVENT_OTHER).getValue());
    valuesList.add(values);
  }
  if (vCard.getExtendedProperty(PROPERTY_EVENT_CUSTOM) != null) {
    ContentValues values=new ContentValues();
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_CUSTOM);
    values.put(ContactsContract.CommonDataKinds.Event.LABEL,vCard.getExtendedProperty(PROPERTY_EVENT_CUSTOM).getParameter(PARAMETER_EVENT_CUSTOM_LABEL));
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,vCard.getExtendedProperty(PROPERTY_EVENT_CUSTOM).getValue());
    valuesList.add(values);
  }
  return valuesList;
}

Fixed version (ground truth):
protected static List<ContentValues> getValuesForEvents(VCard vCard){
  List<ContentValues> valuesList=new LinkedList<ContentValues>();
  if (vCard.getBirthday() != null && vCard.getBirthday().getDate() != null) {
    SimpleDateFormat formatter=new SimpleDateFormat("String_Node_Str",Locale.US);
    String formatted=formatter.format(vCard.getBirthday().getDate());
    ContentValues values=new ContentValues();
    if (formatted.startsWith("String_Node_Str"))     formatted="String_Node_Str" + formatted.substring(4);
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY);
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,formatted);
    valuesList.add(values);
  }
  if (vCard.getExtendedProperty(PROPERTY_EVENT_ANNIVERSARY) != null) {
    ContentValues values=new ContentValues();
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_ANNIVERSARY);
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,vCard.getExtendedProperty(PROPERTY_EVENT_ANNIVERSARY).getValue());
    valuesList.add(values);
  }
  if (vCard.getExtendedProperty(PROPERTY_EVENT_OTHER) != null) {
    ContentValues values=new ContentValues();
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_OTHER);
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,vCard.getExtendedProperty(PROPERTY_EVENT_OTHER).getValue());
    valuesList.add(values);
  }
  if (vCard.getExtendedProperty(PROPERTY_EVENT_CUSTOM) != null) {
    ContentValues values=new ContentValues();
    values.put(ContactsContract.Data.MIMETYPE,ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE);
    values.put(ContactsContract.CommonDataKinds.Event.TYPE,ContactsContract.CommonDataKinds.Event.TYPE_CUSTOM);
    values.put(ContactsContract.CommonDataKinds.Event.LABEL,vCard.getExtendedProperty(PROPERTY_EVENT_CUSTOM).getParameter(PARAMETER_EVENT_CUSTOM_LABEL));
    values.put(ContactsContract.CommonDataKinds.Event.START_DATE,vCard.getExtendedProperty(PROPERTY_EVENT_CUSTOM).getValue());
    valuesList.add(values);
  }
  return valuesList;
}