if (!newParagraphs.isEmpty()) {
diff_match_patch dmp = new diff_match_patch();
for (Node newParagraph : newParagraphs) {
int minEditDistance = Integer.MAX_VALUE;
for (Node oldParagraph : oldParagraphs) {
LinkedList<Diff> diffs = dmp.diff_main(
getTextContent(oldParagraph), getTextContent(newParagraph));
minEditDistance = Math.min(minEditDistance, modifiedLevenshteinDistance(diffs));
}
if (minEditDistance > EDIT_DISTANCE_THRESHOLD) {
Element paragraphElement = (Element) newParagraph;