#fixed code
                                private Tuple createTuple(String value)
    {
        TupleInfo tupleInfo = new TupleInfo(VARIABLE_BINARY);
        Tuple tuple = tupleInfo.builder()
                .append(Slices.wrappedBuffer(value.getBytes(UTF_8)))
                .build();

        return tuple;
    }
#vulnerable code 
                                private Tuple createTuple(String value)
    {
        byte[] bytes = value.getBytes(UTF_8);
        Slice slice = Slices.allocate(bytes.length + SIZE_OF_SHORT);
        slice.output()
                .appendShort(bytes.length + 2)
                .appendBytes(bytes);

        return new Tuple(slice, new TupleInfo(VARIABLE_BINARY));
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK