From 42e10cac5431d5de27b7b2584fcde1aa4c8fc567 Mon Sep 17 00:00:00 2001 From: Pouryafard75 Date: Thu, 12 Sep 2024 16:41:05 -0400 Subject: [PATCH] ASTDiff : Fix the issue with MemberRef and MethodRefs in javadocs --- .../astDiff/models/ExtendedMultiMappingStore.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/refactoringminer/astDiff/models/ExtendedMultiMappingStore.java b/src/main/java/org/refactoringminer/astDiff/models/ExtendedMultiMappingStore.java index 147e771e2..0e52beca1 100644 --- a/src/main/java/org/refactoringminer/astDiff/models/ExtendedMultiMappingStore.java +++ b/src/main/java/org/refactoringminer/astDiff/models/ExtendedMultiMappingStore.java @@ -183,6 +183,8 @@ public boolean isDstMapped(Tree dst) { return hasDst(dst) && getSrcs(dst) != null && getSrcs(dst).size() > 0; } public void addMappingRecursively(Tree src, Tree dst) { + if (!src.getType().equals(dst.getType()) && !src.isLeaf() && !dst.isLeaf()) + return; addMapping(src, dst); if (src.getChildren() != null) for (int i = 0; i < src.getChildren().size(); i++)