#vulnerable code 
                                @Test
    public void parsesJson() throws Exception {
        final Farm farm = new PropsFarm(new FkFarm());
        final Take take = new TkGithub(
            farm, (frm, github, event) -> "nothing"
        );
        MatcherAssert.assertThat(
            take.act(
                new RqWithBody(
                    new RqFake("POST", "/"),
                    String.format(
                        "payload=%s",
                        URLEncoder.encode(
                            "{\"foo\": \"bar\"}",
                            StandardCharsets.UTF_8.displayName()
                        )
                    )
                )
            ),
            new HmRsStatus(HttpURLConnection.HTTP_OK)
        );
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void parsesJson() throws Exception {
        MatcherAssert.assertThat(
            new TkGithub(
                new PropsFarm(),
                new Rebound.Fake("nothing")
            ).act(
                new RqWithBody(
                    new RqFake("POST", "/"),
                    String.format(
                        "payload=%s",
                        URLEncoder.encode(
                            "{\"foo\": \"bar\"}",
                            StandardCharsets.UTF_8.displayName()
                        )
                    )
                )
            ),
            new HmRsStatus(HttpURLConnection.HTTP_OK)
        );
    }