@NonNull
    private static Set<String> exceptCachesWithOfflineLog(@NonNull final Set<String> geocodes) {
        if (geocodes.isEmpty()) {
            return geocodes;
        }

        final List<String> geocodesWithOfflineLog = queryToColl(dbTableLogsOffline,
                new String[]{"geocode"},
                null,
                null,
                null,
                null,
                new LinkedList<>(),
                GET_STRING_0);
        geocodes.removeAll(geocodesWithOfflineLog);
        return geocodes;
    }
remove all geocodes from the given list of geocodes where an offline log exists
main/src/main/java/cgeo/geocaching/storage/DataStore.java