diff --git a/refdiff-core/src/main/java/refdiff/core/diff/CstComparator.java b/refdiff-core/src/main/java/refdiff/core/diff/CstComparator.java index 5fbdfe2..6710def 100644 --- a/refdiff-core/src/main/java/refdiff/core/diff/CstComparator.java +++ b/refdiff-core/src/main/java/refdiff/core/diff/CstComparator.java @@ -673,7 +673,7 @@ public Optional matchingNodeAfter(Optional optN1) { public boolean sameLocation(CstNode n1, CstNode n2) { if (n1.getParent().isPresent() && n2.getParent().isPresent()) { return matchingNodeAfter(n1.getParent().get()).equals(n2.getParent()); - } else if (!n1.getParent().isPresent() && !n1.getParent().isPresent()) { + } else if (!n1.getParent().isPresent() && !n2.getParent().isPresent()) { return sameNamespace(n1, n2); } else { return false;