Program: 50566
Project: 50566
Buggy source:
/** 
 * At the end of each element, we should check if we're looking at a list. If we are, set the list to null. This way, we can tell if we're looking at an element that has (stupidly) the same unit as a list... eg <MASH>is in the recipe (indicating whether it's mashed or not), and the unit of the mash list!
 */
public void endElement(String namespaceURI,String sName,String qName) throws SAXException {
  if (importType == "String_Node_Str") {
    if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      r.addMalt(m);
      m=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      r.addHop(h);
      h=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      r.addMisc(misc);
      misc=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      r.mash.addStep(type,startTemp,endTemp,"String_Node_Str",method,minutes,rampMin);
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") || qName.equalsIgnoreCase("String_Node_Str") || qName.equalsIgnoreCase("String_Node_Str")|| qName.equalsIgnoreCase("String_Node_Str")) {
      currentList="String_Node_Str";
    }
  }
 else   if (importType == "String_Node_Str") {
    if (qName.equalsIgnoreCase("String_Node_Str")) {
      r.addMalt(m);
      m=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str")) {
      r.addHop(h);
      h=null;
    }
  }
}

Fixed version (ground truth):
/** 
 * At the end of each element, we should check if we're looking at a list. If we are, set the list to null. This way, we can tell if we're looking at an element that has (stupidly) the same unit as a list... eg <MASH>is in the recipe (indicating whether it's mashed or not), and the unit of the mash list!
 */
public void endElement(String namespaceURI,String sName,String qName) throws SAXException {
  if (importType == "String_Node_Str") {
    if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      r.addMalt(m);
      m=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      h.setDescription(descrBuf);
      descrBuf="String_Node_Str";
      r.addHop(h);
      h=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      r.addMisc(misc);
      misc=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") && currentList.equalsIgnoreCase("String_Node_Str")) {
      r.mash.addStep(type,startTemp,endTemp,"String_Node_Str",method,minutes,rampMin);
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str") || qName.equalsIgnoreCase("String_Node_Str") || qName.equalsIgnoreCase("String_Node_Str")|| qName.equalsIgnoreCase("String_Node_Str")) {
      currentList="String_Node_Str";
    }
  }
 else   if (importType == "String_Node_Str") {
    if (qName.equalsIgnoreCase("String_Node_Str")) {
      r.addMalt(m);
      m=null;
    }
 else     if (qName.equalsIgnoreCase("String_Node_Str")) {
      r.addHop(h);
      h=null;
    }
  }
}