} else if (differences[i].getOrgPosition() == currentPosition) {
if (differences[i].getOperation() == Difference.DELETE) {
haveDeleteOperation = true;
} else if (differences[i].getOperation() == Difference.ADD &&
haveDeleteOperation == true) {
throw new MergeException(
"Differences array is not sorted. Delete before Add");
}
} else {
throw new MergeException("Differences array need to be sorted.");
}
}
// reset sequence counters
orgSeq.start();