output: #fixed code
                                @Override
    public void copyToLocalRoot(String remoteSourceRelativePath, String localDestinationRoot) throws IOException {
      Path source = new Path(getAbsoluteRemotePath(remoteSourceRelativePath));
      File destination = new File(localDestinationRoot + "/" + new Path(remoteSourceRelativePath).getName());
      LOG.info("Copying remote file " + source + " to local file " + destination);
      InputStream inputStream = getInputStream(remoteSourceRelativePath);
      FileOutputStream fileOutputStream = new FileOutputStream(destination);
      BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);
      // Use copyLarge (over 2GB)
      try {
        IOUtils.copyLarge(inputStream, bufferedOutputStream);
        bufferedOutputStream.flush();
        fileOutputStream.flush();
      } finally {
        inputStream.close();
        bufferedOutputStream.close();
        fileOutputStream.close();
      }
    }
input: #vulnerable code 
                                @Override
    public void copyToLocalRoot(String remoteSourceRelativePath, String localDestinationRoot) throws IOException {
      Path source = new Path(getAbsoluteRemotePath(remoteSourceRelativePath));
      File destination = new File(localDestinationRoot + "/" + new Path(remoteSourceRelativePath).getName());
      LOG.info("Copying remote file " + source + " to local file " + destination);
      InputStream inputStream = getInputStream(remoteSourceRelativePath);
      // Use copyLarge (over 2GB)
      try {
        IOUtils.copyLarge(inputStream,
            new BufferedOutputStream(new FileOutputStream(destination)));
      } finally {
        inputStream.close();
      }
    } 
                              #location 9 
                              #vulnerability type RESOURCE_LEAK