#vulnerable code 
                                @Override
    public void exec(final Message input) throws Exception {
        final Footprint footprint = new Footprint(
            this.farm, new SqsProject(this.farm, input)
        );
        final XML xml = new XMLDocument(input.getBody())
            .nodes("/claim").get(0);
        Logger.info(
            this, "Processing message %s", input.getMessageId()
        );
        footprint.open(
            xml, input.getMessageAttributes().get("signature").getStringValue()
        );
        Logger.info(
            this, "Claim was opened for message %s",
            input.getMessageId()
        );
        this.origin.exec(input);
        footprint.close(xml);
        Logger.info(
            this, "Claim was closed for message %s",
            input.getMessageId()
        );
    } 
                            #location 19 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    public void exec(final Message input) throws Exception {
        try (
            final Footprint footprint = new Footprint(
                this.farm, new SqsProject(this.farm, input)
            )
        ) {
            final XML xml = new XMLDocument(input.getBody())
                .nodes("/claim").get(0);
            Logger.info(
                this, "Processing message %s",
                input.getMessageId()
            );
            footprint.open(
                xml,
                input.getMessageAttributes().get("signature").getStringValue()
            );
            Logger.info(
                this, "Claim was opened for message %s",
                input.getMessageId()
            );
            this.origin.exec(input);
            footprint.close(xml);
            Logger.info(
                this, "Claim was closed for message %s",
                input.getMessageId()
            );
        }
    }