Program: 23029
Project: 23029
Buggy source:
public static boolean populateComponent(ContentValues values,ICalendar.Component component){
  long dtstart=-1;
  if (values.containsKey(Calendar.Events.DTSTART)) {
    dtstart=values.getAsLong(Calendar.Events.DTSTART);
  }
  String duration=values.getAsString(Calendar.Events.DURATION);
  String tzid=values.getAsString(Calendar.Events.EVENT_TIMEZONE);
  String rruleStr=values.getAsString(Calendar.Events.RRULE);
  String rdateStr=values.getAsString(Calendar.Events.RDATE);
  String exruleStr=values.getAsString(Calendar.Events.EXRULE);
  String exdateStr=values.getAsString(Calendar.Events.EXDATE);
  boolean allDay=values.getAsInteger(Calendar.Events.ALL_DAY) == 1;
  if ((dtstart == -1) || (TextUtils.isEmpty(duration)) || ((TextUtils.isEmpty(rruleStr)) && (TextUtils.isEmpty(rdateStr)))) {
    return false;
  }
  ICalendar.Property dtstartProp=new ICalendar.Property("String_Node_Str");
  Time dtstartTime=null;
  if (!TextUtils.isEmpty(tzid)) {
    if (!allDay) {
      dtstartProp.addParameter(new ICalendar.Parameter("String_Node_Str",tzid));
    }
    dtstartTime=new Time(tzid);
  }
 else {
    dtstartTime=new Time(Time.TIMEZONE_UTC);
  }
  dtstartTime.set(dtstart);
  if (allDay) {
    dtstartProp.addParameter(new ICalendar.Parameter("String_Node_Str","String_Node_Str"));
    dtstartTime.allDay=true;
    dtstartTime.hour=0;
    dtstartTime.minute=0;
    dtstartTime.second=0;
  }
  dtstartProp.setValue(dtstartTime.format2445());
  component.addProperty(dtstartProp);
  ICalendar.Property durationProp=new ICalendar.Property("String_Node_Str");
  durationProp.setValue(duration);
  component.addProperty(durationProp);
  addPropertiesForRuleStr(component,"String_Node_Str",rruleStr);
  addPropertyForDateStr(component,"String_Node_Str",rdateStr);
  addPropertiesForRuleStr(component,"String_Node_Str",exruleStr);
  addPropertyForDateStr(component,"String_Node_Str",exdateStr);
  return true;
}

Fixed version (ground truth):
public static boolean populateComponent(ContentValues values,ICalendar.Component component){
  long dtstart=-1;
  if (values.containsKey(Calendar.Events.DTSTART)) {
    dtstart=values.getAsLong(Calendar.Events.DTSTART);
  }
  String duration=values.getAsString(Calendar.Events.DURATION);
  String tzid=values.getAsString(Calendar.Events.EVENT_TIMEZONE);
  String rruleStr=values.getAsString(Calendar.Events.RRULE);
  String rdateStr=values.getAsString(Calendar.Events.RDATE);
  String exruleStr=values.getAsString(Calendar.Events.EXRULE);
  String exdateStr=values.getAsString(Calendar.Events.EXDATE);
  Integer allDayInteger=values.getAsInteger(Calendar.Events.ALL_DAY);
  boolean allDay=(null != allDayInteger) ? (allDayInteger == 1) : false;
  if ((dtstart == -1) || (TextUtils.isEmpty(duration)) || ((TextUtils.isEmpty(rruleStr)) && (TextUtils.isEmpty(rdateStr)))) {
    return false;
  }
  ICalendar.Property dtstartProp=new ICalendar.Property("String_Node_Str");
  Time dtstartTime=null;
  if (!TextUtils.isEmpty(tzid)) {
    if (!allDay) {
      dtstartProp.addParameter(new ICalendar.Parameter("String_Node_Str",tzid));
    }
    dtstartTime=new Time(tzid);
  }
 else {
    dtstartTime=new Time(Time.TIMEZONE_UTC);
  }
  dtstartTime.set(dtstart);
  if (allDay) {
    dtstartProp.addParameter(new ICalendar.Parameter("String_Node_Str","String_Node_Str"));
    dtstartTime.allDay=true;
    dtstartTime.hour=0;
    dtstartTime.minute=0;
    dtstartTime.second=0;
  }
  dtstartProp.setValue(dtstartTime.format2445());
  component.addProperty(dtstartProp);
  ICalendar.Property durationProp=new ICalendar.Property("String_Node_Str");
  durationProp.setValue(duration);
  component.addProperty(durationProp);
  addPropertiesForRuleStr(component,"String_Node_Str",rruleStr);
  addPropertyForDateStr(component,"String_Node_Str",rdateStr);
  addPropertiesForRuleStr(component,"String_Node_Str",exruleStr);
  addPropertyForDateStr(component,"String_Node_Str",exdateStr);
  return true;
}