#vulnerable code 
                                void buildLexicon(String filename, FileInputStream lexiconInput) throws IOException {
        int lineno = -1;
        try (InputStreamReader isr = new InputStreamReader(lexiconInput);
                LineNumberReader reader = new LineNumberReader(isr)) {
            for (String line = reader.readLine(); line != null; line = reader.readLine()) {
                lineno = reader.getLineNumber();
                WordEntry entry = parseLine(line);
                if (entry.headword != null) {
                    addToTrie(entry.headword, wordInfos.size());
                }
                params.add(entry.parameters);
                wordInfos.add(entry.wordInfo);
            }
        } catch (Exception e) {
            if (lineno > 0) {
                System.err.println("Error: " + e.getMessage() + " at line " + lineno + " in " + filename);
            }
            throw e;
        }
    } 
                            #location 14 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                DictionaryBuilder() {
        buffer = ByteBuffer.allocate(BUFFER_SIZE);
        buffer.order(ByteOrder.LITTLE_ENDIAN);
    }