#vulnerable code 
                                @Test
    public void testNoArgBuilderCallerClassInfo() throws Exception {
        final PrintStream ps = IoBuilder.forLogger().buildPrintStream();
        ps.println("discarded");
        final ListAppender app = context.getListAppender("IoBuilderTest");
        final List<String> messages = app.getMessages();
        assertThat(messages, not(empty()));
        assertThat(messages, hasSize(1));
        final String message = messages.get(0);
        assertThat(message, startsWith(getClass().getName() + ".testNoArgBuilderCallerClassInfo"));
        app.clear();
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testNoArgBuilderCallerClassInfo() throws Exception {
        try (final PrintStream ps = IoBuilder.forLogger().buildPrintStream()) {
            ps.println("discarded");
            final ListAppender app = context.getListAppender("IoBuilderTest");
            final List<String> messages = app.getMessages();
            assertThat(messages, not(empty()));
            assertThat(messages, hasSize(1));
            final String message = messages.get(0);
            assertThat(message, startsWith(getClass().getName() + ".testNoArgBuilderCallerClassInfo"));
            app.clear();
        }
    }