#vulnerable code 
                                @Test
    public void resolveTextAndFontsWhenTextRepeats() throws TaskIOException {
        PageTextWriter writer = new PageTextWriter(new PDDocument());
        List<PageTextWriter.TextWithFont> textAndFonts = writer.resolveFonts("123α456α789", helvetica);

        assertThat(textAndFonts.get(0).getFont().getName(), is("Helvetica"));
        assertThat(textAndFonts.get(0).getText(), is("123"));

        assertThat(textAndFonts.get(1).getFont().getName(), is(not("Helvetica")));
        assertThat(textAndFonts.get(1).getText(), is("α"));

        assertThat(textAndFonts.get(2).getFont().getName(), is("Helvetica"));
        assertThat(textAndFonts.get(2).getText(), is("456"));

        assertThat(textAndFonts.get(3).getFont().getName(), is(not("Helvetica")));
        assertThat(textAndFonts.get(3).getText(), is("α"));
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void resolveTextAndFontsWhenTextRepeats() throws TaskIOException {
        write("123α456α789");
    }