Program: 86746
Project: 86746
Buggy source:
@Override public void fromMap(Map map) throws ParseException {
  SimpleDateFormat sdf=new SimpleDateFormat(OpsGenieClientConstants.Common.API_DATE_FORMAT);
  if (scheduleTimeZone != null) {
    sdf.setTimeZone(scheduleTimeZone);
  }
  Object startDateObj=map.get(OpsGenieClientConstants.API.START_TIME);
  if (startDateObj != null) {
    if (startDateObj instanceof Date) {
      startDate=(Date)startDateObj;
    }
 else {
      String startDateStr=(String)map.get(OpsGenieClientConstants.API.START_TIME);
      startDate=sdf.parse(startDateStr);
    }
  }
  rotationType=RotationType.valueOf(((String)map.get(OpsGenieClientConstants.API.ROTATION_TYPE)).toLowerCase());
  if (map.containsKey(OpsGenieClientConstants.API.ROTATION_LENGTH)) {
    rotationLength=((Number)map.get(OpsGenieClientConstants.API.ROTATION_LENGTH)).intValue();
  }
  if (map.containsKey(OpsGenieClientConstants.API.PARTICIPANTS)) {
    List<Map> participantMaps=(List<Map>)map.get(OpsGenieClientConstants.API.PARTICIPANTS);
    participants=new ArrayList<ScheduleParticipant>();
    for (    Map participantMap : participantMaps) {
      ScheduleParticipant participant=new ScheduleParticipant();
      participant.fromMap(participantMap);
      participants.add(participant);
    }
  }
  if (map.containsKey(OpsGenieClientConstants.API.RESTRICTIONS)) {
    List<Map> restrictionMaps=(List<Map>)map.get(OpsGenieClientConstants.API.RESTRICTIONS);
    restrictions=new ArrayList<ScheduleRuleRestriction>();
    for (    Map restrictionMap : restrictionMaps) {
      ScheduleRuleRestriction scheduleRuleRestriction=new ScheduleRuleRestriction();
      scheduleRuleRestriction.fromMap(restrictionMap);
      restrictions.add(scheduleRuleRestriction);
    }
  }
}

Fixed version (ground truth):
@Override public void fromMap(Map map) throws ParseException {
  SimpleDateFormat sdf=new SimpleDateFormat(OpsGenieClientConstants.Common.API_DATE_FORMAT);
  if (scheduleTimeZone != null) {
    sdf.setTimeZone(scheduleTimeZone);
  }
  Object startDateObj=null;
  if (map.containsKey(OpsGenieClientConstants.API.START_DATE)) {
    startDateObj=map.get(OpsGenieClientConstants.API.START_DATE);
  }
 else {
    startDateObj=map.get(OpsGenieClientConstants.API.START_TIME);
  }
  if (startDateObj != null) {
    if (startDateObj instanceof Date) {
      startDate=(Date)startDateObj;
    }
 else {
      String startDateStr=(String)startDateObj;
      startDate=sdf.parse(startDateStr);
    }
  }
  rotationType=RotationType.valueOf(((String)map.get(OpsGenieClientConstants.API.ROTATION_TYPE)).toLowerCase());
  if (map.containsKey(OpsGenieClientConstants.API.ROTATION_LENGTH)) {
    rotationLength=((Number)map.get(OpsGenieClientConstants.API.ROTATION_LENGTH)).intValue();
  }
  if (map.containsKey(OpsGenieClientConstants.API.PARTICIPANTS)) {
    List<Map> participantMaps=(List<Map>)map.get(OpsGenieClientConstants.API.PARTICIPANTS);
    participants=new ArrayList<ScheduleParticipant>();
    for (    Map participantMap : participantMaps) {
      ScheduleParticipant participant=new ScheduleParticipant();
      participant.fromMap(participantMap);
      participants.add(participant);
    }
  }
  if (map.containsKey(OpsGenieClientConstants.API.RESTRICTIONS)) {
    List<Map> restrictionMaps=(List<Map>)map.get(OpsGenieClientConstants.API.RESTRICTIONS);
    restrictions=new ArrayList<ScheduleRuleRestriction>();
    for (    Map restrictionMap : restrictionMaps) {
      ScheduleRuleRestriction scheduleRuleRestriction=new ScheduleRuleRestriction();
      scheduleRuleRestriction.fromMap(restrictionMap);
      restrictions.add(scheduleRuleRestriction);
    }
  }
}