Given the location of the 'middle snake', split the diff in two parts and recurse. @param text1 Old string to be diffed. @param text2 New string to be diffed. @param x Index of split point in text1. @param y Index of split point in text2. @param deadline Time at which to bail if not yet complete. @
(String text1, String text2,
int x, int y, long deadline)
| 490 | * @return LinkedList of Diff objects. |
| 491 | */ |
| 492 | private LinkedList<Diff> diff_bisectSplit(String text1, String text2, |
| 493 | int x, int y, long deadline) { |
| 494 | String text1a = text1.substring(0, x); |
| 495 | String text2a = text2.substring(0, y); |
| 496 | String text1b = text1.substring(x); |
| 497 | String text2b = text2.substring(y); |
| 498 | |
| 499 | // Compute both diffs serially. |
| 500 | LinkedList<Diff> diffs = diff_main(text1a, text2a, false, deadline); |
| 501 | LinkedList<Diff> diffsb = diff_main(text1b, text2b, false, deadline); |
| 502 | |
| 503 | diffs.addAll(diffsb); |
| 504 | return diffs; |
| 505 | } |
| 506 | |
| 507 | /** |
| 508 | * Split two texts into a list of strings. Reduce the texts to a string of |