#fixed code
                                @Test
    public void votesHighIfMaxJobsReached() throws Exception {
        final Project project = new FkProject();
        final String user = "g4s8";
        final int total = 10;
        final Pmo pmo = new Pmo(new FkFarm());
        new Options(pmo, user).bootstrap().maxJobsInAgenda(total);
        final Agenda agenda = new Agenda(pmo, user).bootstrap();
        for (int num = 0; num < total; ++num) {
            agenda.add(project, String.format("gh:test/test#%d", num), "DEV");
        }
        MatcherAssert.assertThat(
            new VsOptionsMaxJobs(pmo).take(user, new StringBuilder(0)),
            // @checkstyle MagicNumberCheck (1 lines)
            Matchers.closeTo(1.0, 0.001)
        );
    }
#vulnerable code 
                                @Test
    public void votesHighIfMaxJobsReached() throws Exception {
        final Project project = new FkProject();
        final FkFarm farm = new FkFarm();
        final String user = "g4s8";
        final int total = 10;
        final Pmo pmo = new Pmo(farm);
        new Options(pmo, user).bootstrap().maxJobsInAgenda(total);
        final Agenda agenda = new Agenda(pmo, user).bootstrap();
        for (int num = 0; num < total; ++num) {
            agenda.add(project, String.format("gh:test/test#%d", num), "DEV");
        }
        MatcherAssert.assertThat(
            new VsOptionsMaxJobs(pmo).take(user, new StringBuilder(0)),
            // @checkstyle MagicNumberCheck (1 lines)
            Matchers.closeTo(1.0, 0.001)
        );
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK