#vulnerable code 
                                public void laden() {
        clear();
        File file = new File(datei);
        if (!file.exists()) {
            return;
        }
        try {
            FileInputStream fstream = new FileInputStream(datei);
            DataInputStream in = new DataInputStream(fstream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
            String strLine;
            while ((strLine = br.readLine()) != null) {
                super.add(strLine);
            }
            //Close the input stream
            in.close();
            ListenerMediathekView.notify(ListenerMediathekView.EREIGNIS_LISTE_HISTORY_GEAENDERT, History.class.getSimpleName());
        } catch (Exception e) {//Catch exception if any
            System.err.println("Fehler: " + e);
            Log.fehlerMeldung(303049876, Log.FEHLER_ART_PROG, History.class.getName(), e);
        }
    } 
                            #location 18 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void laden() {
        clear();

        if (Files.notExists(historyFilePath))
            return;

        try (BufferedReader br = new BufferedReader(new InputStreamReader(new DataInputStream(Files.newInputStream(historyFilePath))))) {
            String strLine;
            while ((strLine = br.readLine()) != null) {
                super.add(strLine);
            }

            ListenerMediathekView.notify(ListenerMediathekView.EREIGNIS_LISTE_HISTORY_GEAENDERT, History.class.getSimpleName());
        } catch (Exception e) {
            System.err.println("Fehler: " + e);
            Log.fehlerMeldung(303049876, Log.FEHLER_ART_PROG, History.class.getName(), e);
        }
    }