Program: 54946
Project: 54946
Buggy source:
private void init(AbstractHttpClient http,String username,String password){
  this.client=http;
  this.client.setRedirectStrategy(new DefaultRedirectStrategy(){
    @Override public boolean isRedirected(    HttpRequest request,    HttpResponse response,    HttpContext context) throws ProtocolException {
      int statusCode=response.getStatusLine().getStatusCode();
      String method=request.getRequestLine().getMethod();
      Header locationHeader=response.getFirstHeader("String_Node_Str");
switch (statusCode) {
case HttpStatus.SC_MOVED_TEMPORARILY:
        return (method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) && (locationHeader != null);
case HttpStatus.SC_MOVED_PERMANENTLY:
case HttpStatus.SC_TEMPORARY_REDIRECT:
      return method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpPropFind.METHOD_NAME);
case HttpStatus.SC_SEE_OTHER:
    return true;
default :
  return false;
}
}
@Override public HttpUriRequest getRedirect(HttpRequest request,HttpResponse response,HttpContext context) throws ProtocolException {
URI uri=this.getLocationURI(request,response,context);
String method=request.getRequestLine().getMethod();
if (method.equalsIgnoreCase(HttpHead.METHOD_NAME)) {
return new HttpHead(uri);
}
if (method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) {
return new HttpPropFind(uri);
}
if (method.equalsIgnoreCase(HttpLock.METHOD_NAME)) {
return new HttpLock(uri);
}
return new HttpGet(uri);
}
}
);
this.setCredentials(username,password);
}

Fixed version (ground truth):
private void init(AbstractHttpClient http,String username,String password){
  this.client=http;
  this.client.setRedirectStrategy(new DefaultRedirectStrategy(){
    @Override public boolean isRedirected(    HttpRequest request,    HttpResponse response,    HttpContext context) throws ProtocolException {
      int statusCode=response.getStatusLine().getStatusCode();
      String method=request.getRequestLine().getMethod();
      Header locationHeader=response.getFirstHeader("String_Node_Str");
switch (statusCode) {
case HttpStatus.SC_MOVED_TEMPORARILY:
        return (method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpLock.METHOD_NAME)|| method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) && (locationHeader != null);
case HttpStatus.SC_MOVED_PERMANENTLY:
case HttpStatus.SC_TEMPORARY_REDIRECT:
      return method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpLock.METHOD_NAME)|| method.equalsIgnoreCase(HttpPropFind.METHOD_NAME);
case HttpStatus.SC_SEE_OTHER:
    return true;
default :
  return false;
}
}
@Override public HttpUriRequest getRedirect(HttpRequest request,HttpResponse response,HttpContext context) throws ProtocolException {
String method=request.getRequestLine().getMethod();
if (method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) {
return new HttpPropFind(this.getLocationURI(request,response,context));
}
if (method.equalsIgnoreCase(HttpLock.METHOD_NAME)) {
return new HttpLock(this.getLocationURI(request,response,context));
}
return super.getRedirect(request,response,context);
}
}
);
this.setCredentials(username,password);
}