#vulnerable code 
                              public static SharedTorrent fromFile(File source, File parent, boolean multiThreadHash, boolean seeder, boolean leecher,
                                       TorrentStatisticProvider torrentStatisticProvider)
          throws IOException, NoSuchAlgorithmException {
    FileInputStream fis = new FileInputStream(source);
    byte[] data = new byte[(int) source.length()];
    fis.read(data);
    fis.close();
    return new SharedTorrent(data, parent, multiThreadHash, seeder, leecher, DEFAULT_REQUEST_STRATEGY, torrentStatisticProvider);
  } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              public static SharedTorrent fromFile(File source, File parent, boolean multiThreadHash, boolean seeder, boolean leecher,
                                       TorrentStatisticProvider torrentStatisticProvider)
          throws IOException, NoSuchAlgorithmException {
    byte[] data = FileUtils.readFileToByteArray(source);
    return new SharedTorrent(data, parent, multiThreadHash, seeder, leecher, DEFAULT_REQUEST_STRATEGY, torrentStatisticProvider);
  }