#vulnerable code 
                                public Input pdf(final String login) throws IOException {
        final double share = this.share(login);
        if (share == 0.0d) {
            throw new IllegalArgumentException(
                new Par(
                    "@%s doesn't have any share in %s"
                ).say(login, this.project.pid())
            );
        }
        try (final Item item = this.item()) {
            final Xocument doc = new Xocument(item);
            String latex = new TextOf(
                new ResourceOf("com/zerocracy/pm/cost/equity.tex")
            ).asString();
            latex = latex
                .replace("[OWNER]", login)
                .replace("[ENTITY]", doc.xpath("//entity/text()", "PROJECT"))
                .replace("[CEO]", doc.xpath("//ceo/text()", "CEO"))
                .replace("[SHARE]", String.format("%.2f", share))
                .replace("[SHARES]", String.format("%.0f", this.shares()))
                .replace("[PAR]", this.par().toString());
            return new Latex(latex).pdf();
        }
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public Input pdf(final String login) throws IOException {
        final double share = this.share(login);
        if (share == 0.0d) {
            throw new IllegalArgumentException(
                new Par(
                    "@%s doesn't have any share in %s"
                ).say(login, this.project.pid())
            );
        }
        try (final Item item = this.item()) {
            final Xocument doc = new Xocument(item);
            String latex = new TextOf(
                new ResourceOf("com/zerocracy/pm/cost/equity.tex")
            ).asString();
            latex = latex
                .replace("[OWNER]", login)
                .replace("[ENTITY]", doc.xpath("//entity/text()", "PROJECT"))
                .replace("[ADDRESS]", doc.xpath("//address/text()", "USA"))
                .replace("[CEO]", doc.xpath("//ceo/text()", "CEO"))
                .replace("[SHARE]", String.format("%.2f", share))
                .replace("[SHARES]", String.format("%.0f", this.shares()))
                .replace("[PAR]", this.par().toString());
            return new Latex(latex).pdf();
        }
    }