public int addCalculatedWaypoints(final Collection<Pair<String, String>> foundPatterns, final String namePrefix) {
        int added = 0;
        for (final Pair<String, String> pattern : foundPatterns) {
            final Waypoint wpCandidate = new Waypoint(namePrefix + " " + (added + 1), WaypointType.WAYPOINT, true);
            final CalculatedCoordinate cc = new CalculatedCoordinate();
            cc.setLatitudePattern(pattern.first);
            cc.setLongitudePattern(pattern.second);
            wpCandidate.setCalculated(cc, f -> variables.getValue(f));
            final boolean changed = addOrMergeInfoToExistingWaypoint(true, namePrefix, wpCandidate);
            if (changed) {
                added++;
            }
        }
        return added;
    }
changes this cache's variables with the given one's. Change is forced!
main/src/main/java/cgeo/geocaching/models/Geocache.java