Program: 188830
Project: 188830
Buggy source:
private static SIPReport solrDocumentToSipState(SolrDocument doc){
  final String id=objectToString(doc.get(RodaConstants.SIPSTATE_ID));
  final String username=objectToString(doc.get(RodaConstants.SIPSTATE_USERNAME));
  final String originalFilename=objectToString(doc.get(RodaConstants.SIPSTATE_ORIGINAL_FILENAME));
  final String state=objectToString(doc.get(RodaConstants.SIPSTATE_STATE));
  final Date dateTime=objectToDate(doc.get(RodaConstants.SIPSTATE_DATETIME));
  final boolean processing=objectToBoolean(doc.get(RodaConstants.SIPSTATE_PROCESSING));
  final boolean complete=objectToBoolean(doc.get(RodaConstants.SIPSTATE_COMPLETE));
  final float completePercentage=objectToFloat(doc.get(RodaConstants.SIPSTATE_COMPLETE_PERCENTAGE));
  final String parentPID=objectToString(doc.get(RodaConstants.SIPSTATE_PARENT_PID));
  final String ingestedPID=objectToString(doc.get(RodaConstants.SIPSTATE_INGESTED_PID));
  final String fileID=objectToString(doc.get(RodaConstants.SIPSTATE_FILE_ID));
  List<SIPStateTransition> ssts=new ArrayList<SIPStateTransition>();
  SIPReport sipState=new SIPReport();
  sipState.setId(id);
  sipState.setUsername(username);
  sipState.setOriginalFilename(originalFilename);
  sipState.setState(state);
  sipState.setDatetime(dateTime);
  sipState.setProcessing(processing);
  sipState.setComplete(complete);
  sipState.setCompletePercentage(completePercentage);
  sipState.setParentID(parentPID);
  sipState.setIngestedID(ingestedPID);
  sipState.setFileID(fileID);
  sipState.setStateTransitions(ssts.toArray(new SIPStateTransition[ssts.size()]));
  return sipState;
}

Fixed version (ground truth):
private static SIPReport solrDocumentToSipState(SolrDocument doc){
  final String id=objectToString(doc.get(RodaConstants.SIP_REPORT_ID));
  final String username=objectToString(doc.get(RodaConstants.SIP_REPORT_USERNAME));
  final String originalFilename=objectToString(doc.get(RodaConstants.SIP_REPORT_ORIGINAL_FILENAME));
  final String state=objectToString(doc.get(RodaConstants.SIP_REPORT_STATE));
  final Date dateTime=objectToDate(doc.get(RodaConstants.SIP_REPORT_DATETIME));
  final boolean processing=objectToBoolean(doc.get(RodaConstants.SIP_REPORT_PROCESSING));
  final boolean complete=objectToBoolean(doc.get(RodaConstants.SIP_REPORT_COMPLETE));
  final float completePercentage=objectToFloat(doc.get(RodaConstants.SIP_REPORT_COMPLETE_PERCENTAGE));
  final String parentPID=objectToString(doc.get(RodaConstants.SIP_REPORT_PARENT_PID));
  final String ingestedPID=objectToString(doc.get(RodaConstants.SIP_REPORT_INGESTED_PID));
  final String fileID=objectToString(doc.get(RodaConstants.SIP_REPORT_FILE_ID));
  List<SIPStateTransition> ssts=new ArrayList<SIPStateTransition>();
  SIPReport sipState=new SIPReport();
  sipState.setId(id);
  sipState.setUsername(username);
  sipState.setOriginalFilename(originalFilename);
  sipState.setState(state);
  sipState.setDatetime(dateTime);
  sipState.setProcessing(processing);
  sipState.setComplete(complete);
  sipState.setCompletePercentage(completePercentage);
  sipState.setParentID(parentPID);
  sipState.setIngestedID(ingestedPID);
  sipState.setFileID(fileID);
  sipState.setStateTransitions(ssts.toArray(new SIPStateTransition[ssts.size()]));
  return sipState;
}