/** * Compute a list of patches to turn text1 into text2. * text1 will be derived from the provided diffs. * * @param diffs Array of Diff objects for text1 to text2. * @return LinkedList of Patch objects. */ public LinkedList<Patch> patchMake(LinkedList<Diff> diffs) { if (diffs == null) { throw new IllegalArgumentException("Null inputs. (patchMake)"); } // No origin string provided, compute our own. String text1 = diffText1(diffs); return patchMake(text1, diffs); }
for (Patch aPatch : patches) { int expected_loc = aPatch.start2 + delta; String text1 = diffText1(aPatch.diffs); int start_loc; int end_loc = -1;