Program: 46999
Project: 46999
Buggy source:
public Result serve(Context context){
  Object renderable=new Renderable(){
    @Override public void render(    Context context,    Result result){
      String finalName=context.getRequestPath().replaceFirst(PUBLIC_PREFIX,"String_Node_Str");
      URL url=null;
      if (ninjaProperties.isDev()) {
        File possibleFileInSrc=new File(srcDir + File.separator + ASSETS_PREFIX+ finalName);
        if (possibleFileInSrc.exists()) {
          try {
            url=possibleFileInSrc.toURI().toURL();
          }
 catch (          MalformedURLException malformedURLException) {
            logger.error("String_Node_Str",malformedURLException);
          }
        }
      }
      if (url == null) {
        url=this.getClass().getClassLoader().getResource(ASSETS_PREFIX + finalName);
      }
      if (url == null) {
        context.finalizeHeaders(Results.notFound());
      }
 else {
        try {
          URLConnection urlConnection=url.openConnection();
          Long lastModified=urlConnection.getLastModified();
          httpCacheToolkit.addEtag(context,result,lastModified);
          if (result.getStatusCode() == Result.SC_304_NOT_MODIFIED) {
            context.finalizeHeaders(result);
          }
 else {
            result.status(200);
            String mimeType=mimeTypes.getContentType(context,finalName);
            if (!mimeType.isEmpty()) {
              result.contentType(mimeType);
            }
            ResponseStreams responseStreams=context.finalizeHeaders(result);
            InputStream inputStream=urlConnection.getInputStream();
            OutputStream outputStream=responseStreams.getOutputStream();
            ByteStreams.copy(inputStream,outputStream);
            IOUtils.closeQuietly(inputStream);
            IOUtils.closeQuietly(outputStream);
          }
        }
 catch (        FileNotFoundException e) {
          logger.error("String_Node_Str",e);
        }
catch (        IOException e) {
          logger.error("String_Node_Str",e);
        }
      }
    }
  }
;
  return Results.status(200).render(renderable);
}

Fixed version (ground truth):
public Result serve(Context context){
  Object renderable=new Renderable(){
    @Override public void render(    Context context,    Result result){
      String finalName=context.getRequestPath().replaceFirst(PUBLIC_PREFIX,"String_Node_Str");
      URL url=null;
      if (ninjaProperties.isDev()) {
        File possibleFileInSrc=new File(srcDir + File.separator + ASSETS_PREFIX+ finalName);
        if (possibleFileInSrc.exists()) {
          try {
            url=possibleFileInSrc.toURI().toURL();
          }
 catch (          MalformedURLException malformedURLException) {
            logger.error("String_Node_Str",malformedURLException);
          }
        }
      }
      if (url == null) {
        url=this.getClass().getClassLoader().getResource(ASSETS_PREFIX + finalName);
      }
      if (url == null) {
        context.finalizeHeadersWithoutFlashAndSessionCookie(Results.notFound());
      }
 else {
        try {
          URLConnection urlConnection=url.openConnection();
          Long lastModified=urlConnection.getLastModified();
          httpCacheToolkit.addEtag(context,result,lastModified);
          if (result.getStatusCode() == Result.SC_304_NOT_MODIFIED) {
            context.finalizeHeadersWithoutFlashAndSessionCookie(result);
          }
 else {
            result.status(200);
            String mimeType=mimeTypes.getContentType(context,finalName);
            if (!mimeType.isEmpty()) {
              result.contentType(mimeType);
            }
            ResponseStreams responseStreams=context.finalizeHeadersWithoutFlashAndSessionCookie(result);
            InputStream inputStream=urlConnection.getInputStream();
            OutputStream outputStream=responseStreams.getOutputStream();
            ByteStreams.copy(inputStream,outputStream);
            IOUtils.closeQuietly(inputStream);
            IOUtils.closeQuietly(outputStream);
          }
        }
 catch (        FileNotFoundException e) {
          logger.error("String_Node_Str",e);
        }
catch (        IOException e) {
          logger.error("String_Node_Str",e);
        }
      }
    }
  }
;
  return Results.status(200).render(renderable);
}