Program: 152134
Project: 152134
Buggy source:
/** 
 * Perform GET request.
 * @param url URL where to connect
 * @return true if connection succeeded; false otherwise
 * @throws java.io.IOException When there is some problem with connection
 */
private boolean doGet(String url) throws IOException {
  logger.fine("String_Node_Str" + url);
  GetMethod method=new GetMethod(url);
  if (referer != null) {
    method.setRequestHeader("String_Node_Str",referer);
  }
  int statusCode=client.executeMethod(method);
  if (statusCode != HttpStatus.SC_OK) {
    logger.warning("String_Node_Str" + url + "String_Node_Str"+ method.getStatusLine());
    return false;
  }
  Header contentType=method.getResponseHeader("String_Node_Str");
  boolean text=(contentType != null && contentType.getValue().startsWith("String_Node_Str"));
  byte[] response=new byte[0];
  InputStream responseStream=method.getResponseBodyAsStream();
  if (responseStream != null) {
    response=IOUtils.toByteArray(responseStream);
    responseStream.close();
  }
  method.releaseConnection();
  if (text) {
    setTextContent(new String(response,method.getResponseCharSet()));
    logger.finest("String_Node_Str" + contentType + "String_Node_Str"+ "String_Node_Str"+ getTextContent()+ "String_Node_Str");
  }
 else {
    setBinaryContent(response);
    logger.finest("String_Node_Str" + contentType);
  }
  if (text) {
    String redirect=checkMetaRedirect(textContent);
    if (redirect != null) {
      logger.fine("String_Node_Str" + redirect);
      return followMetaRedirect(redirect,method.getURI());
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Perform GET request.
 * @param url URL where to connect
 * @return true if connection succeeded; false otherwise
 * @throws java.io.IOException When there is some problem with connection
 */
private boolean doGet(String url) throws IOException {
  logger.fine("String_Node_Str" + url);
  GetMethod method=new GetMethod(url);
  if (referer != null) {
    method.setRequestHeader("String_Node_Str",referer);
  }
  int statusCode=client.executeMethod(method);
  if (statusCode != HttpStatus.SC_OK) {
    logger.warning("String_Node_Str" + url + "String_Node_Str"+ method.getStatusLine());
    return false;
  }
  Header contentType=method.getResponseHeader("String_Node_Str");
  boolean text=(contentType != null && contentType.getValue().startsWith("String_Node_Str"));
  byte[] response=new byte[0];
  InputStream responseStream=method.getResponseBodyAsStream();
  if (responseStream != null) {
    response=IOUtils.toByteArray(responseStream);
    responseStream.close();
  }
  method.releaseConnection();
  if (text) {
    String charset=findContentCharset(response);
    setTextContent(new String(response,StringUtils.defaultIfEmpty(charset,method.getResponseCharSet())));
    logger.finest("String_Node_Str" + contentType + "String_Node_Str"+ "String_Node_Str"+ getTextContent()+ "String_Node_Str");
  }
 else {
    setBinaryContent(response);
    logger.finest("String_Node_Str" + contentType);
  }
  if (text) {
    String redirect=checkMetaRedirect(textContent);
    if (redirect != null) {
      logger.fine("String_Node_Str" + redirect);
      return followMetaRedirect(redirect,method.getURI());
    }
  }
  return true;
}