Revision rev = Diff.diff(text1, text2);
int count1 = 0;
int count2 = 0;
int index = 0;
for (int i = 0; i < rev.size(); i++) {
Delta delta = rev.getDelta(i);
Range orgRange = new Range(delta.getOriginal().rangeString());
Range revRange = new Range(delta.getRevised().rangeString());
// matched
while (count1 != orgRange.getFrom() - 1) {
index = index + text1[count1].length() + 1;
count1++;
}