diff --git a/src/main/java/gr/uom/java/xmi/decomposition/StringBasedHeuristics.java b/src/main/java/gr/uom/java/xmi/decomposition/StringBasedHeuristics.java index 052e56c82..06c3ef18c 100644 --- a/src/main/java/gr/uom/java/xmi/decomposition/StringBasedHeuristics.java +++ b/src/main/java/gr/uom/java/xmi/decomposition/StringBasedHeuristics.java @@ -1351,7 +1351,7 @@ else if(token1.endsWith(")" + JAVA.STATEMENT_TERMINATION) && token2.endsWith(JAV } int size = filteredIntersection.size(); int threshold = Math.max(tokens1.size(), tokens2.size()) - size; - if((size > 0 && size > threshold) || (size > 1 && size >= threshold) || (size > 1 && subExpressionMappings.size() == size)) { + if((size > 0 && size > threshold) || (size > 1 && size >= threshold) || (size > 1 && subExpressionMappings.size() == size) || (size > 1 && intersection.size() == Math.min(tokens1.size(), tokens2.size()))) { List tokens1AsList = new ArrayList<>(tokens1); List tokens2AsList = new ArrayList<>(tokens2); int counter = 0;