/** * Set a new index (7) for an old index (3), so that getIndex() returns the old index (3) and * getFreshIndex() returns a higher index (8). Warning: do not use out of order! */ private static void setFreshValueBasis(SSAMapBuilder ssa, String name, int idx) { Preconditions.checkArgument( idx > 0, "Indices need to be positive for this SSAMap implementation:", name, idx); int oldIdx = ssa.getIndex(name); Preconditions.checkArgument( idx >= oldIdx, "SSAMap updates need to be strictly monotone:", name, idx, "vs", oldIdx); if (idx > oldIdx) { BAMFreshValueProvider bamfvp = new BAMFreshValueProvider(); bamfvp.put(name, idx); ssa.mergeFreshValueProviderWith(bamfvp); } }