#vulnerable code 
                                private static void load(EscapeMode e, String file, int size) {
        e.nameKeys = new String[size];
        e.codeVals = new int[size];
        e.codeKeys = new int[size];
        e.nameVals = new String[size];

        InputStream stream = Entities.class.getResourceAsStream(file);
        if (stream == null)
            throw new IllegalStateException("Could not read resource " + file + ". Make sure you copy resources for " + Entities.class.getCanonicalName());

        int i = 0;
        BufferedReader input = new BufferedReader(new InputStreamReader(stream, ASCII));
        CharacterReader reader = new CharacterReader(input);

        while (!reader.isEmpty()) {
            // NotNestedLessLess=10913,824;1887

            final String name = reader.consumeTo('=');
            reader.advance();
            final int cp1 = Integer.parseInt(reader.consumeToAny(codeDelims), codepointRadix);
            final char codeDelim = reader.current();
            reader.advance();
            final int cp2;
            if (codeDelim == ',') {
                cp2 = Integer.parseInt(reader.consumeTo(';'), codepointRadix);
                reader.advance();
            } else {
                cp2 = empty;
            }
            String indexS = reader.consumeTo('\n');
            // default git checkout on windows will add a \r there, so remove
            if (indexS.charAt(indexS.length() - 1) == '\r') {
                indexS = indexS.substring(0, indexS.length() - 1);
            }
            final int index = Integer.parseInt(indexS, codepointRadix);
            reader.advance();

            e.nameKeys[i] = name;
            e.codeVals[i] = cp1;
            e.codeKeys[index] = cp1;
            e.nameVals[index] = name;

            if (cp2 != empty) {
                multipoints.put(name, new String(new int[]{cp1, cp2}, 0, 2));
            }
            i++;
        }
        Validate.isTrue(i == size, "Unexpected count of entities loaded for " + file);
    } 
                            #location 13 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private static void load(EscapeMode e, String file, int size) {
        e.nameKeys = new String[size];
        e.codeVals = new int[size];
        e.codeKeys = new int[size];
        e.nameVals = new String[size];

        InputStream stream = Entities.class.getResourceAsStream(file);
        if (stream == null)
            throw new IllegalStateException("Could not read resource " + file + ". Make sure you copy resources for " + Entities.class.getCanonicalName());

        int i = 0;
        BufferedReader input = null;
        try {
            input = new BufferedReader(new InputStreamReader(stream, ASCII));
            CharacterReader reader = new CharacterReader(input);

            while (!reader.isEmpty()) {
                // NotNestedLessLess=10913,824;1887

                final String name = reader.consumeTo('=');
                reader.advance();
                final int cp1 = Integer.parseInt(reader.consumeToAny(codeDelims), codepointRadix);
                final char codeDelim = reader.current();
                reader.advance();
                final int cp2;
                if (codeDelim == ',') {
                    cp2 = Integer.parseInt(reader.consumeTo(';'), codepointRadix);
                    reader.advance();
                } else {
                    cp2 = empty;
                }
                String indexS = reader.consumeTo('\n');
                // default git checkout on windows will add a \r there, so remove
                if (indexS.charAt(indexS.length() - 1) == '\r') {
                    indexS = indexS.substring(0, indexS.length() - 1);
                }
                final int index = Integer.parseInt(indexS, codepointRadix);
                reader.advance();

                e.nameKeys[i] = name;
                e.codeVals[i] = cp1;
                e.codeKeys[index] = cp1;
                e.nameVals[index] = name;

                if (cp2 != empty) {
                    multipoints.put(name, new String(new int[]{cp1, cp2}, 0, 2));
                }
                i++;
            }
        } finally {
            try {
                if (input != null) {
                    input.close();
                }
            } catch (IOException e1) {
                //ignore exception
            }
        }
        Validate.isTrue(i == size, "Unexpected count of entities loaded for " + file);
    }