#fixed code
                                @Test
    public void testName() {
        Bytes<Void> bytes = Bytes.allocateDirect(30);

        long expected = 12345L;
        int offset = 5;

        bytes.writeLong(offset, expected);
        bytes.writePosition(offset + 8);
        assertEquals(expected, bytes.readLong(offset));
    }
#vulnerable code 
                                @Test
    public void testName() {
        NativeBytesStore<Void> nativeStore = NativeBytesStore.nativeStoreWithFixedCapacity(30);
        Bytes<Void> bytes = nativeStore.bytesForWrite();

        long expected = 12345L;
        int offset = 5;

        bytes.writeLong(offset, expected);
        bytes.writePosition(offset + 8);
        assertEquals(expected, bytes.readLong(offset));
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK