Program: 80340
Project: 80340
Buggy source:
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws Throwable {
  if (resp.getContentType() == null) {
    if (obj != null && obj instanceof BufferedImage && "String_Node_Str".equals(contentType)) {
      contentType=contentTypeMap.get("String_Node_Str");
    }
    resp.setContentType(contentType);
  }
  if (obj == null)   return;
  OutputStream out=resp.getOutputStream();
  if (obj instanceof BufferedImage) {
    if (contentType.contains("String_Node_Str"))     ImageIO.write((BufferedImage)obj,"String_Node_Str",out);
 else     if (contentType.contains("String_Node_Str"))     ImageIO.write((BufferedImage)obj,"String_Node_Str",out);
 else     if (contentType.contains("String_Node_Str"))     Images.writeJpeg((BufferedImage)obj,out,0.8f);
  }
 else   if (obj instanceof File) {
    File file=(File)obj;
    long fileSz=file.length();
    if (log.isDebugEnabled())     log.debug("String_Node_Str" + file.getAbsolutePath());
    if (!file.exists() || file.isDirectory()) {
      log.debug("String_Node_Str" + file.getAbsolutePath());
      resp.sendError(404);
      return;
    }
    if (!resp.containsHeader("String_Node_Str")) {
      String filename=URLEncoder.encode(file.getName(),Encoding.UTF8);
      resp.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
    }
    String rangeStr=req.getHeader("String_Node_Str");
    if (DISABLE_RANGE_DOWNLOAD || fileSz == 0 || (rangeStr == null || !rangeStr.startsWith("String_Node_Str") || rangeStr.length() < "String_Node_Str".length())) {
      resp.setHeader("String_Node_Str","String_Node_Str" + fileSz);
      Streams.writeAndClose(out,Streams.fileIn(file));
    }
 else {
      List<RangeRange> rs=new ArrayList<RawView.RangeRange>();
      if (!parseRange(rangeStr,rs,fileSz)) {
        resp.setStatus(416);
        return;
      }
      if (rs.size() != 1) {
        log.info("String_Node_Str");
        resp.setStatus(416);
        return;
      }
      long totolSize=0;
      for (      RangeRange rangeRange : rs) {
        totolSize+=(rangeRange.end - rangeRange.start);
      }
      resp.setStatus(206);
      resp.setHeader("String_Node_Str","String_Node_Str" + totolSize);
      resp.setHeader("String_Node_Str","String_Node_Str");
      RangeRange rangeRange=rs.get(0);
      resp.setHeader("String_Node_Str",String.format("String_Node_Str",rangeRange.start,rangeRange.end - 1,fileSz));
      writeFileRange(file,out,rangeRange);
    }
  }
 else   if (obj instanceof byte[]) {
    resp.setHeader("String_Node_Str","String_Node_Str" + ((byte[])obj).length);
    Streams.writeAndClose(out,(byte[])obj);
  }
 else   if (obj instanceof char[]) {
    Writer writer=resp.getWriter();
    writer.write((char[])obj);
    writer.flush();
  }
 else   if (obj instanceof Reader) {
    Streams.writeAndClose(resp.getWriter(),(Reader)obj);
  }
 else   if (obj instanceof InputStream) {
    Streams.writeAndClose(out,(InputStream)obj);
  }
 else {
    byte[] data=String.valueOf(obj).getBytes(Encoding.UTF8);
    resp.setHeader("String_Node_Str","String_Node_Str" + data.length);
    Streams.writeAndClose(out,data);
  }
}

Fixed version (ground truth):
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws Throwable {
  if (resp.getContentType() == null) {
    if (obj != null && obj instanceof BufferedImage && "String_Node_Str".equals(contentType)) {
      contentType=contentTypeMap.get("String_Node_Str");
    }
    resp.setContentType(contentType);
  }
  if (obj == null)   return;
  if (obj instanceof BufferedImage) {
    OutputStream out=resp.getOutputStream();
    if (contentType.contains("String_Node_Str"))     ImageIO.write((BufferedImage)obj,"String_Node_Str",out);
 else     if (contentType.contains("String_Node_Str"))     ImageIO.write((BufferedImage)obj,"String_Node_Str",out);
 else     if (contentType.contains("String_Node_Str"))     Images.writeJpeg((BufferedImage)obj,out,0.8f);
  }
 else   if (obj instanceof File) {
    File file=(File)obj;
    long fileSz=file.length();
    if (log.isDebugEnabled())     log.debug("String_Node_Str" + file.getAbsolutePath());
    if (!file.exists() || file.isDirectory()) {
      log.debug("String_Node_Str" + file.getAbsolutePath());
      resp.sendError(404);
      return;
    }
    if (!resp.containsHeader("String_Node_Str")) {
      String filename=URLEncoder.encode(file.getName(),Encoding.UTF8);
      resp.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
    }
    String rangeStr=req.getHeader("String_Node_Str");
    OutputStream out=resp.getOutputStream();
    if (DISABLE_RANGE_DOWNLOAD || fileSz == 0 || (rangeStr == null || !rangeStr.startsWith("String_Node_Str") || rangeStr.length() < "String_Node_Str".length())) {
      resp.setHeader("String_Node_Str","String_Node_Str" + fileSz);
      Streams.writeAndClose(out,Streams.fileIn(file));
    }
 else {
      List<RangeRange> rs=new ArrayList<RawView.RangeRange>();
      if (!parseRange(rangeStr,rs,fileSz)) {
        resp.setStatus(416);
        return;
      }
      if (rs.size() != 1) {
        log.info("String_Node_Str");
        resp.setStatus(416);
        return;
      }
      long totolSize=0;
      for (      RangeRange rangeRange : rs) {
        totolSize+=(rangeRange.end - rangeRange.start);
      }
      resp.setStatus(206);
      resp.setHeader("String_Node_Str","String_Node_Str" + totolSize);
      resp.setHeader("String_Node_Str","String_Node_Str");
      RangeRange rangeRange=rs.get(0);
      resp.setHeader("String_Node_Str",String.format("String_Node_Str",rangeRange.start,rangeRange.end - 1,fileSz));
      writeFileRange(file,out,rangeRange);
    }
  }
 else   if (obj instanceof byte[]) {
    resp.setHeader("String_Node_Str","String_Node_Str" + ((byte[])obj).length);
    OutputStream out=resp.getOutputStream();
    Streams.writeAndClose(out,(byte[])obj);
  }
 else   if (obj instanceof char[]) {
    Writer writer=resp.getWriter();
    writer.write((char[])obj);
    writer.flush();
  }
 else   if (obj instanceof Reader) {
    Streams.writeAndClose(resp.getWriter(),(Reader)obj);
  }
 else   if (obj instanceof InputStream) {
    OutputStream out=resp.getOutputStream();
    Streams.writeAndClose(out,(InputStream)obj);
  }
 else {
    byte[] data=String.valueOf(obj).getBytes(Encoding.UTF8);
    resp.setHeader("String_Node_Str","String_Node_Str" + data.length);
    OutputStream out=resp.getOutputStream();
    Streams.writeAndClose(out,data);
  }
}