#vulnerable code 
                                @Test
    public void testAverageAll()
    {
        List<Tuple> expected = computeExpected("SELECT AVG(totalprice) FROM orders", DOUBLE);

        TupleStream price = createBlockStream(ordersData, Column.ORDER_TOTALPRICE, DOUBLE);
        AggregationOperator aggregation = new AggregationOperator(price, AverageAggregation.PROVIDER);

        assertEqualsIgnoreOrder(tuples(aggregation), expected);
    } 
                            #location 9 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testAverageAll()
    {
        List<Tuple> expected = computeExpected("SELECT AVG(totalprice) FROM orders", DOUBLE);

        TupleStream price = createTupleStream(ordersData, Column.ORDER_TOTALPRICE, DOUBLE);
        AggregationOperator aggregation = new AggregationOperator(price, AverageAggregation.PROVIDER);

        assertEqualsIgnoreOrder(tuples(aggregation), expected);
    }