#vulnerable code 
                                @Override
    public double vote(final String login, final StringBuilder log)
        throws IOException {
        final int jobs = new LengthOf(
            new Agenda(this.pmo, login).jobs()
        ).intValue();
        log.append(
            new Par(
                "%d out of %d job(s) in agenda"
            ).say(jobs, this.max)
        );
        return (double) (this.max - Math.min(jobs, this.max))
            / (double) this.max;
    } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    public double vote(final String login, final StringBuilder log)
        throws IOException {
        final int mine = this.jobs.value().get(login);
        final int smaller = new Filtered<>(
            speed -> speed < mine,
            this.jobs.value().values()
        ).size();
        log.append(
            Logger.format(
                "Workload of %d jobs is no.%d",
                mine, smaller + 1
            )
        );
        return 1.0d - (double) smaller / (double) this.jobs.value().size();
    }