Program: 96673
Project: 96673
Buggy source:
/** 
 * Get a specific Source File given a file name
 * @param fileName The name of the Source File to search for
 * @return The found Source File if successful. Error Code otherwise
 * @throws FileNotFoundException
 * @response.representation.200.doc OK, Found Source File
 * @response.representation.404.doc Not Found, Could not the Source File
 */
@Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response getDispoItemsById(@PathParam("String_Node_Str") String fileName){
  String origFileName=fileName;
  if (!fileName.endsWith("String_Node_Str")) {
    fileName=fileName.replaceAll("String_Node_Str","String_Node_Str");
  }
  DispoSet set=dispoApi.getDispoSetById(branch,setId);
  String fullPath=set.getImportPath() + File.separator + "String_Node_Str"+ File.separator+ fileName;
  final File result=new File(fullPath);
  StreamingOutput streamingOutput=new StreamingOutput(){
    @Override public void write(    OutputStream outputStream) throws WebApplicationException {
      FileInputStream inputStream=null;
      Writer writer=null;
      try {
        inputStream=new FileInputStream(result);
        writer=new OutputStreamWriter(outputStream,"String_Node_Str");
        int c;
        while ((c=inputStream.read()) != -1) {
          writer.write(c);
        }
        outputStream.flush();
      }
 catch (      IOException ex) {
        throw new OseeCoreException(ex);
      }
 finally {
        Lib.close(inputStream);
        Lib.close(writer);
      }
    }
  }
;
  String contentDisposition=String.format("String_Node_Str",fileName,new Date());
  return Response.ok(streamingOutput).header("String_Node_Str",contentDisposition).type("String_Node_Str").build();
}

Fixed version (ground truth):
/** 
 * Get a specific Source File given a file name
 * @param fileName The name of the Source File to search for
 * @return The found Source File if successful. Error Code otherwise
 * @throws FileNotFoundException
 * @response.representation.200.doc OK, Found Source File
 * @response.representation.404.doc Not Found, Could not the Source File
 */
@Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response getDispoItemsById(@PathParam("String_Node_Str") String fileName){
  if (!fileName.endsWith("String_Node_Str")) {
    fileName=fileName.replaceAll(dispoApi.getConfig().getFileExtRegex(),"String_Node_Str");
  }
  DispoSet set=dispoApi.getDispoSetById(branch,setId);
  String fullPath=set.getImportPath() + File.separator + "String_Node_Str"+ File.separator+ fileName;
  final File result=new File(fullPath);
  StreamingOutput streamingOutput=new StreamingOutput(){
    @Override public void write(    OutputStream outputStream) throws WebApplicationException {
      FileInputStream inputStream=null;
      Writer writer=null;
      try {
        inputStream=new FileInputStream(result);
        writer=new OutputStreamWriter(outputStream,"String_Node_Str");
        int c;
        while ((c=inputStream.read()) != -1) {
          writer.write(c);
        }
        outputStream.flush();
      }
 catch (      IOException ex) {
        throw new OseeCoreException(ex);
      }
 finally {
        Lib.close(inputStream);
        Lib.close(writer);
      }
    }
  }
;
  String contentDisposition=String.format("String_Node_Str",fileName,new Date());
  return Response.ok(streamingOutput).header("String_Node_Str",contentDisposition).type("String_Node_Str").build();
}