just for info: be aware that this feature that list.set(list.size(), value) is allowed and is equivalent to list.add(value) makes this list incompatible with standard List implementations. When replacing LongList by ArrayList<Long> Myersdiff will not work anymore. Costed me some minutes testing :-)