Program: 54997
Project: 54997
Buggy source:
public List<DavResource> getResources(String url) throws SardineException {
  HttpPropFind propFind=new HttpPropFind(url);
  propFind.setEntity(SardineUtil.getResourcesEntity());
  HttpResponse response=this.executeWrapper(propFind);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException("String_Node_Str",url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  Multistatus multistatus=SardineUtil.getMulitstatus(this.factory.getUnmarshaller(),response,url);
  List<Response> responses=multistatus.getResponse();
  List<DavResource> resources=new ArrayList<DavResource>(responses.size());
  String path=responses.get(0).getHref().get(0);
  for (  Response resp : responses) {
    String href=resp.getHref().get(0);
    if (href.equals(path))     continue;
    String name=href.substring(path.length(),href.length());
    if (name.equals("String_Node_Str"))     continue;
    if (name.endsWith("String_Node_Str"))     name=name.substring(0,name.length() - 1);
    Prop prop=resp.getPropstat().get(0).getProp();
    String creationdate=prop.getCreationdate().getContent().get(0);
    String modifieddate;
    Getlastmodified glm=prop.getGetlastmodified();
    if (glm != null)     modifieddate=glm.getContent().get(0);
 else     modifieddate=creationdate;
    String contentType="String_Node_Str";
    Getcontenttype gtt=prop.getGetcontenttype();
    if (gtt != null)     contentType=gtt.getContent().get(0);
    String contentLength="String_Node_Str";
    Getcontentlength gcl=prop.getGetcontentlength();
    if (gcl != null)     contentLength=gcl.getContent().get(0);
    DavResource dr=new DavResource(url,name,SardineUtil.parseDate(creationdate),SardineUtil.parseDate(modifieddate),contentType,Long.valueOf(contentLength));
    resources.add(dr);
  }
  return resources;
}

Fixed version (ground truth):
public List<DavResource> getResources(String url) throws SardineException {
  HttpPropFind propFind=new HttpPropFind(url);
  propFind.setEntity(SardineUtil.getResourcesEntity());
  HttpResponse response=this.executeWrapper(propFind);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException("String_Node_Str",url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  Multistatus multistatus=SardineUtil.getMulitstatus(this.factory.getUnmarshaller(),response,url);
  List<Response> responses=multistatus.getResponse();
  List<DavResource> resources=new ArrayList<DavResource>(responses.size());
  String path=responses.get(0).getHref().get(0);
  for (  Response resp : responses) {
    String href=resp.getHref().get(0);
    if (href.equals(path))     continue;
    String name=href.substring(path.length(),href.length());
    if (name.equals("String_Node_Str"))     continue;
    if (name.endsWith("String_Node_Str"))     name=name.substring(0,name.length() - 1);
    Prop prop=resp.getPropstat().get(0).getProp();
    String creationdate=null;
    Creationdate gcd=prop.getCreationdate();
    if (gcd != null && gcd.getContent().size() == 1)     creationdate=gcd.getContent().get(0);
    String modifieddate=null;
    Getlastmodified glm=prop.getGetlastmodified();
    if (glm != null && glm.getContent().size() == 1)     modifieddate=glm.getContent().get(0);
 else     modifieddate=creationdate;
    String contentType="String_Node_Str";
    Getcontenttype gtt=prop.getGetcontenttype();
    if (gtt != null && gtt.getContent().size() == 1)     contentType=gtt.getContent().get(0);
    String contentLength="String_Node_Str";
    Getcontentlength gcl=prop.getGetcontentlength();
    if (gcl != null && gcl.getContent().size() == 1)     contentLength=gcl.getContent().get(0);
    DavResource dr=new DavResource(url,name,SardineUtil.parseDate(creationdate),SardineUtil.parseDate(modifieddate),contentType,Long.valueOf(contentLength));
    resources.add(dr);
  }
  return resources;
}