#fixed code
                                @Test
    public void testDoubleClose() throws Exception
    {
        HikariConfig config = new HikariConfig();
        config.setMinimumIdle(1);
        config.setMaximumPoolSize(1);
        config.setInitializationFailFast(true);
        config.setConnectionTestQuery("VALUES 1");
        config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource");

        HikariDataSource ds = new HikariDataSource(config);
        try
        {
            Connection connection = ds.getConnection();
            connection.close();
            connection.close();
        }
        finally
        {
            ds.close();
        }
    }
#vulnerable code 
                                @Test
    public void testDoubleClose() throws Exception
    {
        HikariConfig config = new HikariConfig();
        config.setMinimumIdle(1);
        config.setMaximumPoolSize(1);
        config.setInitializationFailFast(true);
        config.setConnectionTestQuery("VALUES 1");
        config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource");

        HikariDataSource ds = new HikariDataSource(config);
        try
        {
            Connection connection = ds.getConnection();
            connection.close();
            connection.close();
        }
        finally
        {
            ds.shutdown();
        }
    } 
                            #location 20 
                            #vulnerability type RESOURCE_LEAK