#vulnerable code 
                                @Test
    public void testResizeWithZCGetNewBuffer() {
        String smallValue = "";
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.setLength((BLOCK_SIZE / Character.BYTES) / 2);
        String longValue = stringBuilder.toString();

        oak.zc().put("A", "");
        oak.zc().put("B", longValue);
        OakRBuffer buffer = oak.zc().get("A");
        assertEquals(0, buffer.getInt(0));

        oak.zc().put("A", longValue);
        assertEquals(longValue.length(), buffer.getInt(0));
    } 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void testResizeWithZCGetNewBuffer() {
        final int blockSize = BlocksPool.getInstance().blockSize();

        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.setLength((blockSize / Character.BYTES) / 2);
        String longValue = stringBuilder.toString();
        String smallValue = "";

        oak.zc().put("A", smallValue);
        oak.zc().put("B", longValue);
        OakRBuffer buffer = oak.zc().get("A");
        assertEquals(0, buffer.getInt(0));

        oak.zc().put("A", longValue);
        assertEquals(longValue.length(), buffer.getInt(0));
    }