From e0c8deb5f8d8a95e1c47389d419120b6b5bc885b Mon Sep 17 00:00:00 2001 From: tsantalis Date: Mon, 16 Dec 2024 13:49:36 -0500 Subject: [PATCH] Fix method rename detection in commit https://github.com/junit-team/junit5/commit/eb35aa9cdecd71f49af177f2cad32f5257311874 --- .../java/gr/uom/java/xmi/decomposition/AbstractCodeMapping.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gr/uom/java/xmi/decomposition/AbstractCodeMapping.java b/src/main/java/gr/uom/java/xmi/decomposition/AbstractCodeMapping.java index e97ccc48ba..431c488c01 100644 --- a/src/main/java/gr/uom/java/xmi/decomposition/AbstractCodeMapping.java +++ b/src/main/java/gr/uom/java/xmi/decomposition/AbstractCodeMapping.java @@ -148,7 +148,7 @@ private boolean argumentizedStringExactAfterTypeReplacement() { String s2 = fragment2.getArgumentizedString(); for(Replacement r : replacements) { if(r.getType().equals(ReplacementType.TYPE)) { - if(s1.startsWith(r.getBefore()) && s2.startsWith(r.getAfter())) { + if(s1.contains(r.getBefore()) && s2.contains(r.getAfter())) { String temp = s2.replace(r.getAfter(), r.getBefore()); if(s1.equals(temp) || (s1 + JAVA.STATEMENT_TERMINATION).equals(temp)) { return true;