#vulnerable code 
                                private static String readResource(final String name) {
        final StringBuilder ret = new StringBuilder();
        InputStream is = null;
        try {
            is = UrlRegularExpressions.class.getClassLoader().getResourceAsStream(name);
            final InputStreamReader reader = new InputStreamReader(is, ASCII);
            int read = 0;
            final char[] buf = new char[1024];
            do {
                read = reader.read(buf, 0, buf.length);
                if (read > 0) {
                    ret.append(buf, 0, read);
                }
            } while (read >= 0);
        } catch (final IOException ex) {
            throw new RuntimeException(ex);
        } finally {
            closeQuietly(is);
        }
        return ret.toString();
    } 
                            #location 15 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private static String readResource(final String name) {
        final StringBuilder ret = new StringBuilder();
        InputStream is = null;
        InputStreamReader reader = null;
        try {
            is = UrlRegularExpressions.class.getClassLoader().getResourceAsStream(name);
            reader = new InputStreamReader(is, ASCII);
            int read = 0;
            final char[] buf = new char[1024];
            do {
                read = reader.read(buf, 0, buf.length);
                if (read > 0) {
                    ret.append(buf, 0, read);
                }
            } while (read >= 0);
        } catch (final IOException ex) {
            throw new RuntimeException(ex);
        } finally {
            closeQuietly(is);
            closeQuietly(reader);
        }
        return ret.toString();
    }