#vulnerable code 
                             @Test
	public void objectRetrievedSuccessfullyFromEagerReferencedObjectOffHeapPool() {
		EagerReferencedObjectOffHeapPool<SampleOffHeapClass> objectPool = 
				offHeapService.createOffHeapPool(
						new ObjectOffHeapPoolCreateParameterBuilder<SampleOffHeapClass>().
								type(SampleOffHeapClass.class).
								objectCount(ELEMENT_COUNT).
								referenceType(ObjectPoolReferenceType.EAGER_REFERENCED).
							build());
   
    	for (int i = 0; i < ELEMENT_COUNT; i++) {
    		SampleOffHeapClass obj = objectPool.get();
    		Assert.assertEquals(0, obj.getOrder());
    		obj.setOrder(i);
    		Assert.assertEquals(i, obj.getOrder());
    	}
    	
    	objectPool.reset();
    	
    	for (int i = 0; i < ELEMENT_COUNT; i++) {
    		SampleOffHeapClass obj = objectPool.getAt(i);
    		Assert.assertEquals(0, obj.getOrder());
    		obj.setOrder(i);
    		Assert.assertEquals(i, obj.getOrder());
    	}
	} 
                            #location 13 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void objectRetrievedSuccessfullyFromEagerReferencedObjectOffHeapPool() {
		EagerReferencedObjectOffHeapPool<SampleOffHeapClass> objectPool = 
				offHeapService.createOffHeapPool(
						new ObjectOffHeapPoolCreateParameterBuilder<SampleOffHeapClass>().
								type(SampleOffHeapClass.class).
								objectCount(ELEMENT_COUNT).
								referenceType(ObjectPoolReferenceType.EAGER_REFERENCED).
							build());
   
    	for (int i = 0; true; i++) {
    		SampleOffHeapClass obj = objectPool.get();
    		if (obj == null) {
    			break;
    		}
    		Assert.assertEquals(0, obj.getOrder());
    		obj.setOrder(i);
    		Assert.assertEquals(i, obj.getOrder());
    	}
    	
    	objectPool.reset();
    	
    	for (int i = 0; i < ELEMENT_COUNT; i++) {
    		SampleOffHeapClass obj = objectPool.getAt(i);
    		Assert.assertEquals(0, obj.getOrder());
    		obj.setOrder(i);
    		Assert.assertEquals(i, obj.getOrder());
    	}
	}