Program: 188679
Project: 188679
Buggy source:
private static <T>T solrDocumentTo(Class<T> resultClass,SolrDocument doc) throws GenericException {
  T ret;
  if (resultClass.equals(IndexedAIP.class)) {
    ret=resultClass.cast(solrDocumentToIndexAIP(doc));
  }
 else   if (resultClass.equals(IndexedRepresentation.class) || resultClass.equals(Representation.class)) {
    ret=resultClass.cast(solrDocumentToRepresentation(doc));
  }
 else   if (resultClass.equals(LogEntry.class)) {
    ret=resultClass.cast(solrDocumentToLogEntry(doc));
  }
 else   if (resultClass.equals(Report.class)) {
    ret=resultClass.cast(solrDocumentToJobReport(doc));
  }
 else   if (resultClass.equals(RODAMember.class) || resultClass.equals(User.class) || resultClass.equals(Group.class)) {
    ret=resultClass.cast(solrDocumentToRodaMember(doc));
  }
 else   if (resultClass.equals(TransferredResource.class)) {
    ret=resultClass.cast(solrDocumentToTransferredResource(doc));
  }
 else   if (resultClass.equals(Job.class)) {
    ret=resultClass.cast(solrDocumentToJob(doc));
  }
 else   if (resultClass.equals(Risk.class)) {
    ret=resultClass.cast(solrDocumentToRisk(doc));
  }
 else   if (resultClass.equals(Agent.class)) {
    ret=resultClass.cast(solrDocumentToAgent(doc));
  }
 else   if (resultClass.equals(Format.class)) {
    ret=resultClass.cast(solrDocumentToFormat(doc));
  }
 else   if (resultClass.equals(Notification.class)) {
    ret=resultClass.cast(solrDocumentToNotification(doc));
  }
 else   if (resultClass.equals(RiskIncidence.class)) {
    ret=resultClass.cast(solrDocumentToRiskIncidence(doc));
  }
 else   if (resultClass.equals(IndexedFile.class)) {
    ret=resultClass.cast(solrDocumentToIndexedFile(doc));
  }
 else   if (resultClass.equals(IndexedPreservationEvent.class)) {
    ret=resultClass.cast(solrDocumentToIndexedPreservationEvent(doc));
  }
 else   if (resultClass.equals(IndexedPreservationAgent.class)) {
    ret=resultClass.cast(solrDocumentToIndexedPreservationAgent(doc));
  }
 else {
    throw new GenericException("String_Node_Str" + resultClass.getName());
  }
  return ret;
}

Fixed version (ground truth):
private static <T>T solrDocumentTo(Class<T> resultClass,SolrDocument doc) throws GenericException {
  T ret;
  if (resultClass.equals(IndexedAIP.class)) {
    ret=resultClass.cast(solrDocumentToIndexedAIP(doc));
  }
 else   if (resultClass.equals(IndexedRepresentation.class) || resultClass.equals(Representation.class)) {
    ret=resultClass.cast(solrDocumentToRepresentation(doc));
  }
 else   if (resultClass.equals(LogEntry.class)) {
    ret=resultClass.cast(solrDocumentToLogEntry(doc));
  }
 else   if (resultClass.equals(Report.class)) {
    ret=resultClass.cast(solrDocumentToJobReport(doc));
  }
 else   if (resultClass.equals(RODAMember.class) || resultClass.equals(User.class) || resultClass.equals(Group.class)) {
    ret=resultClass.cast(solrDocumentToRodaMember(doc));
  }
 else   if (resultClass.equals(TransferredResource.class)) {
    ret=resultClass.cast(solrDocumentToTransferredResource(doc));
  }
 else   if (resultClass.equals(Job.class)) {
    ret=resultClass.cast(solrDocumentToJob(doc));
  }
 else   if (resultClass.equals(Risk.class)) {
    ret=resultClass.cast(solrDocumentToRisk(doc));
  }
 else   if (resultClass.equals(Agent.class)) {
    ret=resultClass.cast(solrDocumentToAgent(doc));
  }
 else   if (resultClass.equals(Format.class)) {
    ret=resultClass.cast(solrDocumentToFormat(doc));
  }
 else   if (resultClass.equals(Notification.class)) {
    ret=resultClass.cast(solrDocumentToNotification(doc));
  }
 else   if (resultClass.equals(RiskIncidence.class)) {
    ret=resultClass.cast(solrDocumentToRiskIncidence(doc));
  }
 else   if (resultClass.equals(IndexedFile.class)) {
    ret=resultClass.cast(solrDocumentToIndexedFile(doc));
  }
 else   if (resultClass.equals(IndexedPreservationEvent.class)) {
    ret=resultClass.cast(solrDocumentToIndexedPreservationEvent(doc));
  }
 else   if (resultClass.equals(IndexedPreservationAgent.class)) {
    ret=resultClass.cast(solrDocumentToIndexedPreservationAgent(doc));
  }
 else {
    throw new GenericException("String_Node_Str" + resultClass.getName());
  }
  return ret;
}