Program: 52089
Project: 52089
Buggy source:
/** 
 * @param req
 * @param doi
 * @return
 * @throws DOIIdentifierException 
 */
private DataCiteResponse sendHttpRequest(HttpUriRequest req,String doi) throws DOIIdentifierException {
  DefaultHttpClient httpclient=new DefaultHttpClient();
  httpclient.getCredentialsProvider().setCredentials(new AuthScope(HOST,443),new UsernamePasswordCredentials(this.getUsername(),this.getPassword()));
  HttpEntity entity=null;
  try {
    HttpResponse response=httpclient.execute(req);
    StatusLine status=response.getStatusLine();
    int statusCode=status.getStatusCode();
    String content=null;
    entity=response.getEntity();
    if (null != entity) {
      content=EntityUtils.toString(entity,"String_Node_Str");
    }
switch (statusCode) {
case (401):
{
        log.info("String_Node_Str");
        log.info("String_Node_Str",content);
        throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str" + "String_Node_Str",DOIIdentifierException.AUTHENTICATION_ERROR);
      }
case (403):
{
      log.info("String_Node_Str" + "String_Node_Str",doi,content);
      throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.FOREIGN_DOI);
    }
case (500):
{
    log.warn("String_Node_Str" + "String_Node_Str" + content);
    throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str" + "String_Node_Str",DOIIdentifierException.INTERNAL_ERROR);
  }
}
return new DataCiteResponse(statusCode,content);
}
 catch (IOException e) {
log.warn("String_Node_Str" + e.getMessage());
throw new RuntimeException(e);
}
 finally {
try {
if (null != entity) {
  EntityUtils.consume(entity);
}
}
 catch (IOException e) {
log.warn("String_Node_Str" + e.getMessage());
}
}
}

Fixed version (ground truth):
/** 
 * @param req
 * @param doi
 * @return
 * @throws DOIIdentifierException 
 */
protected DataCiteResponse sendHttpRequest(HttpUriRequest req,String doi) throws DOIIdentifierException {
  DefaultHttpClient httpclient=new DefaultHttpClient();
  httpclient.getCredentialsProvider().setCredentials(new AuthScope(HOST,443),new UsernamePasswordCredentials(this.getUsername(),this.getPassword()));
  HttpEntity entity=null;
  try {
    HttpResponse response=httpclient.execute(req);
    StatusLine status=response.getStatusLine();
    int statusCode=status.getStatusCode();
    String content=null;
    entity=response.getEntity();
    if (null != entity) {
      content=EntityUtils.toString(entity,"String_Node_Str");
    }
switch (statusCode) {
case (401):
{
        log.info("String_Node_Str");
        log.info("String_Node_Str",content);
        throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str" + "String_Node_Str",DOIIdentifierException.AUTHENTICATION_ERROR);
      }
case (403):
{
      log.info("String_Node_Str" + "String_Node_Str",doi,content);
      throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.FOREIGN_DOI);
    }
case (500):
{
    log.warn("String_Node_Str" + "String_Node_Str" + content);
    throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str" + "String_Node_Str",DOIIdentifierException.INTERNAL_ERROR);
  }
}
return new DataCiteResponse(statusCode,content);
}
 catch (IOException e) {
log.warn("String_Node_Str" + e.getMessage());
throw new RuntimeException(e);
}
 finally {
try {
if (null != entity) {
  EntityUtils.consume(entity);
}
}
 catch (IOException e) {
log.warn("String_Node_Str" + e.getMessage());
}
}
}