#vulnerable code 
                             @Override
	public T getAt(int index) {
		checkAvailability();
		if (index < 0 || index >= objectCount) {
			throw new IllegalArgumentException("Invalid index: " + index);
		}	
		if (getInUseFromObjectIndex(index) != OBJECT_IS_AVAILABLE) {
			throw new ObjectInUseException(index);
		}
		if (index == 0) {
			System.out.println(directMemoryService.addressOf(objectArray) + ", " + arrayStartAddress);
		}
		// Address of class could be changed by GC at "Compact" phase.
		//long address = objectsStartAddress + (index * objectSize);
		//updateClassPointerOfObject(address);
		return takeObject(objectArray[index]);
	} 
                            #location 7 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                             @Override
	public T getAt(int index) {
		checkAvailability();
		if (index < 0 || index >= objectCount) {
			throw new IllegalArgumentException("Invalid index: " + index);
		}	
		if (getInUseFromObjectIndex(index) != OBJECT_IS_AVAILABLE) {
			throw new ObjectInUseException(index);
		}
		// Address of class could be changed by GC at "Compact" phase.
		//long address = objectsStartAddress + (index * objectSize);
		//updateClassPointerOfObject(address);
		return takeObject(objectArray[index]);
	}