@Test public void shouldComputeDiff_whenLastItemIsExtra() { final ArrayList<Integer> listA = Lists.newArrayList(1, 2, 3); final ArrayList<Integer> listB = Lists.newArrayList(1, 2, 3, 4); final DataDiffUtil<Integer> util = new DataDiffUtil<Integer>(); final LinkedList<DataDiffUtil.Diff<Integer>> diffs = util.diff_main(listA, listB); assertThat(diffs.toString(), equalTo("[Diff(EQUAL,\"[1, 2, 3]\"), Diff(INSERT,\"[4]\")]")); }
public LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2) { return diff_main(list1, list2, true); }
DataDiffUtil { public LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2) { return diff_main(list1, list2, true); } }
DataDiffUtil { public LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2) { return diff_main(list1, list2, true); }  }
DataDiffUtil { public LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2) { return diff_main(list1, list2, true); }  LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2); LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2,
                                         boolean checklines); int diff_commonPrefix(List<T> list1, List<T> list2); int diff_commonSuffix(List<T> list1, List<T> list2); void diff_cleanupSemantic(LinkedList<Diff<T>> diffs); void diff_cleanupSemanticLossless(LinkedList<Diff<T>> diffs); void diff_cleanupEfficiency(LinkedList<Diff<T>> diffs); void diff_cleanupMerge(LinkedList<Diff<T>> diffs); static boolean endsWith(List<S> source, List<S> prefix); static boolean endsWith(List<S> source, List<S> prefix, int toffset); static int indexOf(List<S> source, List<S> target); static int indexOf(List<S> source, List<S> target, int fromIndex); static int indexOf(List<S> source, int sourceOffset, int sourceCount,
                                  List<S> target, int targetOffset, int targetCount,
                                  int fromIndex); }
DataDiffUtil { public LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2) { return diff_main(list1, list2, true); }  LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2); LinkedList<Diff<T>> diff_main(List<T> list1, List<T> list2,
                                         boolean checklines); int diff_commonPrefix(List<T> list1, List<T> list2); int diff_commonSuffix(List<T> list1, List<T> list2); void diff_cleanupSemantic(LinkedList<Diff<T>> diffs); void diff_cleanupSemanticLossless(LinkedList<Diff<T>> diffs); void diff_cleanupEfficiency(LinkedList<Diff<T>> diffs); void diff_cleanupMerge(LinkedList<Diff<T>> diffs); static boolean endsWith(List<S> source, List<S> prefix); static boolean endsWith(List<S> source, List<S> prefix, int toffset); static int indexOf(List<S> source, List<S> target); static int indexOf(List<S> source, List<S> target, int fromIndex); static int indexOf(List<S> source, int sourceOffset, int sourceCount,
                                  List<S> target, int targetOffset, int targetCount,
                                  int fromIndex); public float Diff_Timeout; public short Diff_EditCost; }