public void add(int index, long value) {
    	if (index < 0 || index > size) {
			throw new IndexOutOfBoundsException(
				"Invalid index %d for list of size %d".formatted(index, size));
    	}
        if (size == longs.length) {
            growArray();
        }
		try {
	        System.arraycopy(longs, index, longs, index+1, size-index);
		} catch(Exception e) {
		    Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
		}
	
        longs[index] = value;
		size++;
    }
@see java.util.List#add(int, java.lang.Object)
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArrayList.java