From 7ef9e17d0616ef74581a614c54f95c2441b3fd96 Mon Sep 17 00:00:00 2001 From: tsantalis Date: Tue, 17 Dec 2024 11:33:28 -0500 Subject: [PATCH] Enable Extract Variable detection in commit https://github.com/junit-team/junit5/commit/a8447445d4aba316325fae2a12d68a672abb8148 --- .../gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java b/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java index 3c841accd4..0105a4b2f1 100644 --- a/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java +++ b/src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java @@ -933,7 +933,7 @@ else if(container1.getBodyHashCode() != container2.getBodyHashCode() && !contain if(statement.getVariableDeclarations().size() > 0) { VariableDeclaration declaration = statement.getVariableDeclarations().get(0); AbstractExpression initializer = declaration.getInitializer(); - if(initializer != null && (initializer.getMethodInvocations().size() > 0 || initializer.getCreations().size() > 0)) { + if(initializer != null && (initializer.getMethodInvocations().size() > 0 || initializer.getCreations().size() > 0 || initializer.getTypeLiterals().size() > 0)) { for(AbstractCodeFragment nonMappedLeaf1 : nonMappedLeavesT1) { boolean matchingVariableDeclaration = false; List declarations1 = nonMappedLeaf1.getVariableDeclarations();