Program: 142382
Project: 142382
Buggy source:
public Referral parse() throws InvalidStructureException, IOException, XmlPullParserException {
  this.checkNode("String_Node_Str");
  this.nextTag("String_Node_Str");
  String refId=parser.nextText().trim();
  Date followup=created;
  while (this.nextTagInBlock("String_Node_Str")) {
    String action=parser.getName().toLowerCase();
    if (action.equals("String_Node_Str")) {
      String followupDate=parser.nextText().trim();
      followup=DateUtils.parseDate(followupDate);
    }
    if (action.equals("String_Node_Str")) {
      this.getNextTagInBlock("String_Node_Str");
      checkNode("String_Node_Str");
      String referralTypes=parser.nextText().trim();
      for (      Object s : DateUtils.split(referralTypes,"String_Node_Str",true)) {
        Referral pr=new Referral((String)s,created,refId,caseId,followup);
        commit(pr);
      }
      if (this.nextTagInBlock("String_Node_Str")) {
        throw new InvalidStructureException("String_Node_Str" + parser.getName(),parser);
      }
    }
 else     if (action.equals("String_Node_Str")) {
      this.getNextTagInBlock("String_Node_Str");
      checkNode("String_Node_Str");
      String refType=parser.nextText().trim();
      Referral r=retrieve(refId,refType);
      r.setDateDue(followup);
      if (this.nextTagInBlock("String_Node_Str")) {
        String dateClosed=parser.nextText().trim();
        r.close();
        commit(r);
        if (this.nextTagInBlock("String_Node_Str")) {
          throw new InvalidStructureException("String_Node_Str" + parser.getName(),parser);
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public Referral parse() throws InvalidStructureException, IOException, XmlPullParserException {
  this.checkNode("String_Node_Str");
  this.nextTag("String_Node_Str");
  String refId=parser.nextText().trim();
  Date followup=created;
  while (this.nextTagInBlock("String_Node_Str")) {
    String action=parser.getName().toLowerCase();
    if (action.equals("String_Node_Str")) {
      String followupDate=parser.nextText().trim();
      followup=DateUtils.parseDate(followupDate);
    }
    if (action.equals("String_Node_Str")) {
      this.getNextTagInBlock("String_Node_Str");
      checkNode("String_Node_Str");
      String referralTypes=parser.nextText().trim();
      for (      Object s : DateUtils.split(referralTypes,"String_Node_Str",true)) {
        Referral pr=new Referral((String)s,created,refId,caseId,followup);
        Referral r=retrieve(refId,(String)s);
        if (r != null) {
          pr.setID(r.getID());
        }
        commit(pr);
      }
      if (this.nextTagInBlock("String_Node_Str")) {
        throw new InvalidStructureException("String_Node_Str" + parser.getName(),parser);
      }
    }
 else     if (action.equals("String_Node_Str")) {
      this.getNextTagInBlock("String_Node_Str");
      checkNode("String_Node_Str");
      String refType=parser.nextText().trim();
      Referral r=retrieve(refId,refType);
      r.setDateDue(followup);
      if (this.nextTagInBlock("String_Node_Str")) {
        String dateClosed=parser.nextText().trim();
        r.close();
        commit(r);
        if (this.nextTagInBlock("String_Node_Str")) {
          throw new InvalidStructureException("String_Node_Str" + parser.getName(),parser);
        }
      }
    }
  }
  return null;
}