Program: 179442
Project: 179442
Buggy source:
/** 
 * Read HTML, parse it and find symbol data inside.
 * @param symbol - symbol to find
 * @param html - input HTML
 * @return Return new quote
 * @throws ProviderException
 */
private Quote getQuoteFromHTML(Symbol symbol,String html) throws ProviderException {
  Document dom=parseHTML(html);
  String xpath="String_Node_Str";
  XPathExpression expression=getExpression(xpath);
  NodeList nodes=getNodeList(dom,expression);
  Node node=null;
  if (nodes.getLength() > 0) {
    node=nodes.item(0);
    expression=getExpression("String_Node_Str" + symbol.getName() + "String_Node_Str");
    nodes=getNodeList(node,expression);
    if (nodes.getLength() > 0) {
      node=nodes.item(0).getParentNode().getParentNode();
    }
 else {
      throw new ProviderException("String_Node_Str" + symbol.getName());
    }
    String time=getNodeValue(node,getExpression("String_Node_Str"));
    String price=getNodeValue(node,getExpression("String_Node_Str"));
    String open=getNodeValue(node,getExpression("String_Node_Str"));
    String high=getNodeValue(node,getExpression("String_Node_Str"));
    String low=getNodeValue(node,getExpression("String_Node_Str"));
    String volume=getNodeValue(node,getExpression("String_Node_Str"));
    Date now=new Date();
    Date date=null;
    try {
      date=TIME_FORMAT.parse(time);
    }
 catch (    ParseException e) {
      throw new ProviderException(e);
    }
    Calendar tmp=new GregorianCalendar();
    tmp.setTime(date);
    Calendar calendar=new GregorianCalendar();
    Calendarium c=Calendarium.getInstance();
    while (c.isFreeDay(now)) {
      now=c.getPreviousWorkingDay(now);
    }
    calendar.setTime(now);
    calendar.set(Calendar.HOUR_OF_DAY,tmp.get(Calendar.HOUR_OF_DAY));
    calendar.set(Calendar.MINUTE,tmp.get(Calendar.MINUTE));
    calendar.set(Calendar.SECOND,tmp.get(Calendar.SECOND));
    calendar.set(Calendar.MILLISECOND,0);
    now=calendar.getTime();
    double dopen=Double.parseDouble(open.replaceAll("String_Node_Str","String_Node_Str"));
    double dhigh=Double.parseDouble(high.replaceAll("String_Node_Str","String_Node_Str"));
    double dlow=Double.parseDouble(low.replaceAll("String_Node_Str","String_Node_Str"));
    double close=Double.parseDouble(price.replaceAll("String_Node_Str","String_Node_Str"));
    long dvolume=Long.parseLong(volume.replaceAll("String_Node_Str","String_Node_Str"));
    return new Quote(now,dopen,dhigh,dlow,close,dvolume);
  }
 else {
    throw new ProviderException("String_Node_Str" + xpath);
  }
}

Fixed version (ground truth):
/** 
 * Read HTML, parse it and find symbol data inside.
 * @param symbol - symbol to find
 * @param html - input HTML
 * @return Return new quote
 * @throws ProviderException
 */
private Quote getQuoteFromHTML(Symbol symbol,String html) throws ProviderException {
  Document dom=parseHTML(html);
  String xpath="String_Node_Str";
  XPathExpression expression=getExpression(xpath);
  NodeList nodes=getNodeList(dom,expression);
  Node node=null;
  if (nodes.getLength() > 0) {
    node=nodes.item(0);
    expression=getExpression("String_Node_Str" + symbol.getName() + "String_Node_Str");
    nodes=getNodeList(node,expression);
    if (nodes.getLength() > 0) {
      node=nodes.item(0).getParentNode().getParentNode();
    }
 else {
      throw new ProviderException("String_Node_Str" + symbol.getName());
    }
    String time=getNodeValue(node,getExpression("String_Node_Str"));
    String price=getNodeValue(node,getExpression("String_Node_Str"));
    String open=getNodeValue(node,getExpression("String_Node_Str"));
    String high=getNodeValue(node,getExpression("String_Node_Str"));
    String low=getNodeValue(node,getExpression("String_Node_Str"));
    String volume=getNodeValue(node,getExpression("String_Node_Str"));
    Date now=new Date();
    Date date=null;
    try {
      date=TIME_FORMAT.parse(time);
    }
 catch (    ParseException e) {
      throw new ProviderException(e);
    }
    Calendar tmp=new GregorianCalendar();
    tmp.setTime(date);
    Calendar calendar=new GregorianCalendar();
    Calendarium c=Calendarium.getInstance();
    while (c.isFreeDay(now)) {
      now=c.getPreviousWorkingDay(now);
    }
    calendar.setTime(now);
    calendar.set(Calendar.HOUR_OF_DAY,tmp.get(Calendar.HOUR_OF_DAY));
    calendar.set(Calendar.MINUTE,tmp.get(Calendar.MINUTE));
    calendar.set(Calendar.SECOND,tmp.get(Calendar.SECOND));
    calendar.set(Calendar.MILLISECOND,0);
    now=calendar.getTime();
    String[] check=new String[]{open,high,low,price,volume};
    for (int j=0; j < check.length; j++) {
      if ("String_Node_Str".equals(check[j])) {
        throw new QuoteLackException("String_Node_Str" + symbol);
      }
    }
    double dopen=Double.parseDouble(open.replaceAll("String_Node_Str","String_Node_Str"));
    double dhigh=Double.parseDouble(high.replaceAll("String_Node_Str","String_Node_Str"));
    double dlow=Double.parseDouble(low.replaceAll("String_Node_Str","String_Node_Str"));
    double close=Double.parseDouble(price.replaceAll("String_Node_Str","String_Node_Str"));
    long dvolume=Long.parseLong(volume.replaceAll("String_Node_Str","String_Node_Str"));
    return new Quote(now,dopen,dhigh,dlow,close,dvolume);
  }
 else {
    throw new ProviderException("String_Node_Str" + xpath);
  }
}