Program: 86160
Project: 86160
Buggy source:
@Override public DetailledItem getResultById(String id,String homebranch) throws IOException, OpacErrorException {
  if (!initialised) {
    start();
  }
  final String html=httpGet(getApiUrl() + "String_Node_Str" + id,getDefaultEncoding());
  final Document doc=Jsoup.parse(html);
  final Element detailData=doc.select("String_Node_Str").first();
  final Element detailTable=detailData.select("String_Node_Str").first();
  final Element availabilityTable=doc.select("String_Node_Str").first();
  final DetailledItem result=new DetailledItem();
  final Copy copy=new Copy();
  result.addCopy(copy);
  result.setId(id);
  result.setCover(getCover(doc));
  result.setTitle(detailData.select("String_Node_Str").first().text());
  result.setMediaType(MEDIA_TYPES.get(getCellContent(detailTable,"String_Node_Str")));
  copy.setStatus(getCellContent(availabilityTable,"String_Node_Str"));
  copy.setReturnDate(parseCopyReturn(getCellContent(availabilityTable,"String_Node_Str")));
  copy.setReservations(getCellContent(availabilityTable,"String_Node_Str"));
  for (  final Element tr : detailTable.select("String_Node_Str")) {
    final String desc=tr.child(0).text();
    final String content=tr.child(1).text();
    if (desc != null && !desc.trim().equals("String_Node_Str")) {
      result.addDetail(new Detail(desc,content));
    }
 else     if (!result.getDetails().isEmpty()) {
      final Detail lastDetail=result.getDetails().get(result.getDetails().size() - 1);
      lastDetail.setHtml(true);
      lastDetail.setContent(lastDetail.getContent() + "String_Node_Str" + content);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public DetailedItem getResultById(String id,String homebranch) throws IOException, OpacErrorException {
  if (!initialised) {
    start();
  }
  final String html=httpGet(getApiUrl() + "String_Node_Str" + id,getDefaultEncoding());
  final Document doc=Jsoup.parse(html);
  final Element detailData=doc.select("String_Node_Str").first();
  final Element detailTable=detailData.select("String_Node_Str").first();
  final Element availabilityTable=doc.select("String_Node_Str").first();
  final DetailedItem result=new DetailedItem();
  final Copy copy=new Copy();
  result.addCopy(copy);
  result.setId(id);
  result.setCover(getCover(doc));
  result.setTitle(detailData.select("String_Node_Str").first().text());
  result.setMediaType(MEDIA_TYPES.get(getCellContent(detailTable,"String_Node_Str")));
  copy.setStatus(getCellContent(availabilityTable,"String_Node_Str"));
  copy.setReturnDate(parseCopyReturn(getCellContent(availabilityTable,"String_Node_Str")));
  copy.setReservations(getCellContent(availabilityTable,"String_Node_Str"));
  for (  final Element tr : detailTable.select("String_Node_Str")) {
    final String desc=tr.child(0).text();
    final String content=tr.child(1).text();
    if (desc != null && !desc.trim().equals("String_Node_Str")) {
      result.addDetail(new Detail(desc,content));
    }
 else     if (!result.getDetails().isEmpty()) {
      final Detail lastDetail=result.getDetails().get(result.getDetails().size() - 1);
      lastDetail.setHtml(true);
      lastDetail.setContent(lastDetail.getContent() + "String_Node_Str" + content);
    }
  }
  return result;
}