Program: 24515
Project: 24515
Buggy source:
/** 
 * @param httpQuery
 * @return
 * @throws Exception
 */
private InputStream execHttpQuery(HttpGet httpQuery) throws Exception {
  if (httpQuery == null)   throw new Exception("String_Node_Str");
  httpQuery.setHeader("String_Node_Str",QUERY_RESULT_MIME_TYPE);
  HttpClient httpClient=new DefaultHttpClient();
  HttpParams params=httpClient.getParams();
  HttpConnectionParams.setConnectionTimeout(params,10000);
  HttpConnectionParams.setSoTimeout(params,10000);
  HttpConnectionParams.setTcpNoDelay(params,true);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setContentCharset(params,"String_Node_Str");
  HttpResponse response=null;
  try {
    boolean retry=true;
    int retryCount=0;
    while (retry) {
      retry=false;
      response=httpClient.execute(httpQuery);
      HttpEntity entity=response.getEntity();
      if (entity == null || response.getStatusLine().getStatusCode() != 200) {
        if (retryCount < RETRY_DELAY.length) {
          try {
            Thread.sleep(RETRY_DELAY[retryCount] * 1000);
          }
 catch (          InterruptedException e) {
            throw new Exception("String_Node_Str");
          }
          retry=true;
          retryCount++;
        }
 else {
          throw new Exception("String_Node_Str");
        }
      }
    }
    Header ceheader=response.getEntity().getContentEncoding();
    if (ceheader != null) {
      HeaderElement[] codecs=ceheader.getElements();
      for (int i=0; i < codecs.length; i++) {
        if (codecs[i].getName().equalsIgnoreCase("String_Node_Str")) {
          response.setEntity(new GzipDecompressingEntity(response.getEntity()));
        }
      }
    }
    return response.getEntity().getContent();
  }
 catch (  Exception e) {
    if (httpQuery != null)     httpQuery.abort();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param httpQuery
 * @return
 * @throws Exception
 */
private InputStream execHttpQuery(HttpGet httpQuery) throws Exception {
  if (httpQuery == null)   throw new Exception("String_Node_Str");
  httpQuery.setHeader("String_Node_Str",QUERY_RESULT_MIME_TYPE);
  HttpClient httpClient=new DefaultHttpClient();
  HttpParams params=httpClient.getParams();
  HttpConnectionParams.setConnectionTimeout(params,10000);
  HttpConnectionParams.setSoTimeout(params,10000);
  HttpConnectionParams.setTcpNoDelay(params,true);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setContentCharset(params,"String_Node_Str");
  HttpResponse response=null;
  try {
    boolean retry=true;
    int retryCount=0;
    while (retry) {
      retry=false;
      response=httpClient.execute(httpQuery);
      if (response.getEntity() == null || response.getStatusLine().getStatusCode() != 200) {
        if (retryCount < RETRY_DELAY.length) {
          try {
            Thread.sleep(RETRY_DELAY[retryCount] * 1000);
          }
 catch (          InterruptedException e) {
            throw new Exception("String_Node_Str");
          }
          retry=true;
          retryCount++;
        }
 else {
          throw new Exception("String_Node_Str");
        }
      }
    }
    Header ceheader=response.getEntity().getContentEncoding();
    if (ceheader != null) {
      HeaderElement[] codecs=ceheader.getElements();
      for (int i=0; i < codecs.length; i++) {
        if (codecs[i].getName().equalsIgnoreCase("String_Node_Str")) {
          response.setEntity(new GzipDecompressingEntity(response.getEntity()));
        }
      }
    }
    return response.getEntity().getContent();
  }
 catch (  Exception e) {
    if (httpQuery != null)     httpQuery.abort();
  }
  return null;
}