@SuppressWarnings("PMD.NPathComplexity")
    private int addItemInternal(final int ppos, final Collection<T> items) {
        if (items == null || items.isEmpty()) {
            return 0;
        }

        final int pos = Math.max(0, Math.min(this.itemList.size(), ppos));

        int posOrigStart = 0;
        int posOrigEnd = originalItemList.size();

        if (this.itemToOriginalItemMap.containsKey(pos)) {
            posOrigStart = this.itemToOriginalItemMap.containsKey(pos - 1) ? this.itemToOriginalItemMap.get(pos - 1) + 1 : 0;
            posOrigEnd = this.itemToOriginalItemMap.get(pos);
        } else if (this.itemToOriginalItemMap.containsKey(pos - 1)) {
            //append to end of filtered list, so after last filtered item in original list
            posOrigStart = originalIndex(pos - 1) + 1;
        }

        int posInOriginal = posOrigStart;
        final T firstItem = items.iterator().next();
        while (posInOriginal < posOrigEnd && originalItemListInsertOrder != null &&
                originalItemListInsertOrder.compare(originalItemList.get(posInOriginal), firstItem) < 0) {
            posInOriginal++;
        }

        this.originalItemList.addAll(posInOriginal, items);

        int insertCount = 0;
        for (T newItem : items) {
            if (isFiltered(newItem)) {
                this.itemList.add(pos + insertCount, newItem);
                insertCount++;
            }
        }
        for (Integer key : new ArrayList<>(this.itemToOriginalItemMap.keySet())) {
            if (key < pos) {
                break;
            }
            this.itemToOriginalItemMap.put(key + insertCount, originalIndex(key) + items.size());
        }
        int newPos = pos;
        int i = 0;
        for (T item : items) {
            if (isFiltered(item)) {
                this.itemToOriginalItemMap.put(newPos, posInOriginal + i);
                newPos++;
            }
            i++;
        }

        return insertCount;
    }
Return only READONLY list to prevent unwanted modifications
main/src/main/java/cgeo/geocaching/ui/recyclerview/ManagedListAdapter.java