if (node != null) {
diff_match_patch dmp = new diff_match_patch();
String oldText = node.getProperty(Content.content);
LinkedList<Patch> patches = (LinkedList<Patch>) dmp.patch_fromText(patch);
final Object[] results = dmp.patch_apply(patches, oldText);
try {
node.setProperty(Content.content, results[0].toString());