#vulnerable code 
                                public Cash fee(final String pid) throws IOException {
        if (!this.exists(pid)) {
            throw new IllegalArgumentException(
                new Par(
                    "Project %s doesn't exist, can't get fee"
                ).say(pid)
            );
        }
        try (final Item item = this.item()) {
            final Iterator<String> fees = new Xocument(item.path()).xpath(
                String.format("/catalog/project[@id='%s']/fee/text()", pid)
            ).iterator();
            final Cash fee;
            if (fees.hasNext()) {
                fee = new Cash.S(fees.next());
            } else {
                fee = Cash.ZERO;
            }
            return fee;
        }
    } 
                            #location 6 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public Cash fee(final String pid) throws IOException {
        this.checkExist(pid);
        try (final Item item = this.item()) {
            final Iterator<String> fees = new Xocument(item.path()).xpath(
                String.format("/catalog/project[@id='%s']/fee/text()", pid)
            ).iterator();
            final Cash fee;
            if (fees.hasNext()) {
                fee = new Cash.S(fees.next());
            } else {
                fee = Cash.ZERO;
            }
            return fee;
        }
    }