diff --git a/src/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java b/src/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java index 9fd8f0da7a..839ef87bf9 100644 --- a/src/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java +++ b/src/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java @@ -7696,8 +7696,8 @@ else if(invokedOperationsAfter != null && invokedOperationsAfter.size() > 0) { if(invocationCoveringTheEntireStatement1 != null && invocationCoveringTheEntireStatement2 != null && variableDeclarations1.size() > 0 && variableDeclarations1.toString().equals(variableDeclarations2.toString()) && invocationCoveringTheEntireStatement1.variableDeclarationInitializersRenamedWithIdenticalArguments(invocationCoveringTheEntireStatement2)) { - Replacement replacement = new MethodInvocationReplacement(invocationCoveringTheEntireStatement1.getName(), - invocationCoveringTheEntireStatement2.getName(), invocationCoveringTheEntireStatement1, invocationCoveringTheEntireStatement2, ReplacementType.METHOD_INVOCATION_NAME_AND_EXPRESSION); + Replacement replacement = new MethodInvocationReplacement(invocationCoveringTheEntireStatement1.actualString(), + invocationCoveringTheEntireStatement2.actualString(), invocationCoveringTheEntireStatement1, invocationCoveringTheEntireStatement2, ReplacementType.METHOD_INVOCATION_NAME_AND_EXPRESSION); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); } @@ -8074,8 +8074,8 @@ else if(operationInvocation1.inlinedStatementBecomesAdditionalArgument(invocatio } } } - Replacement replacement = new ObjectCreationReplacement(creation1.getName(), - creationCoveringTheEntireStatement2.getName(), (ObjectCreation)creation1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); + Replacement replacement = new ObjectCreationReplacement(creation1.actualString(), + creationCoveringTheEntireStatement2.actualString(), (ObjectCreation)creation1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); } @@ -8138,7 +8138,7 @@ else if(operationInvocation1.inlinedStatementBecomesAdditionalArgument(invocatio replacementInfo.addReplacement(composite); } else { - Replacement replacement = new MethodInvocationReplacement(invocationCoveringTheEntireStatement1.getName(), invocationCoveringTheEntireStatement2.getName(), + Replacement replacement = new MethodInvocationReplacement(invocationCoveringTheEntireStatement1.actualString(), invocationCoveringTheEntireStatement2.actualString(), invocationCoveringTheEntireStatement1, invocationCoveringTheEntireStatement2, ReplacementType.METHOD_INVOCATION); replacementInfo.addReplacement(replacement); } @@ -8202,7 +8202,7 @@ else if(operationInvocation1.inlinedStatementBecomesAdditionalArgument(invocatio replacementInfo.addReplacement(composite); } else { - Replacement replacement = new MethodInvocationReplacement(invocationCoveringTheEntireStatement1.getName(), invocationCoveringTheEntireStatement2.getName(), + Replacement replacement = new MethodInvocationReplacement(invocationCoveringTheEntireStatement1.actualString(), invocationCoveringTheEntireStatement2.actualString(), invocationCoveringTheEntireStatement1, invocationCoveringTheEntireStatement2, ReplacementType.METHOD_INVOCATION); replacementInfo.addReplacement(replacement); } @@ -8241,8 +8241,8 @@ else if(operationInvocation1.inlinedStatementBecomesAdditionalArgument(invocatio creationCoveringTheEntireStatement2.getType().getClassType().endsWith("Exception")) { Set argumentIntersection = creationCoveringTheEntireStatement1.argumentIntersection(creationCoveringTheEntireStatement2); if(argumentIntersection.size() > 0 && argumentIntersection.size() == Math.min(creationCoveringTheEntireStatement1.arguments().size(), creationCoveringTheEntireStatement2.arguments().size())) { - Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.getName(), - creationCoveringTheEntireStatement2.getName(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION); + Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.actualString(), + creationCoveringTheEntireStatement2.actualString(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); } @@ -8256,8 +8256,8 @@ else if(operationInvocation1.inlinedStatementBecomesAdditionalArgument(invocatio parent2 = parent2.getParent(); } if(parent1 != null && parent2 != null && parent1.getString().equals(parent2.getString())) { - Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.getName(), - creationCoveringTheEntireStatement2.getName(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION); + Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.actualString(), + creationCoveringTheEntireStatement2.actualString(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); } @@ -8269,14 +8269,14 @@ else if(operationInvocation1.inlinedStatementBecomesAdditionalArgument(invocatio return replacementInfo.getReplacements(); } else if(creationCoveringTheEntireStatement1.identicalWithDifferentNumberOfArguments(creationCoveringTheEntireStatement2, replacementInfo.getReplacements(), parameterToArgumentMap)) { - Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.getName(), - creationCoveringTheEntireStatement2.getName(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); + Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.actualString(), + creationCoveringTheEntireStatement2.actualString(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); } else if(creationCoveringTheEntireStatement1.inlinedStatementBecomesAdditionalArgument(creationCoveringTheEntireStatement2, replacementInfo.getReplacements(), replacementInfo.statements1)) { - Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.getName(), - creationCoveringTheEntireStatement2.getName(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); + Replacement replacement = new ObjectCreationReplacement(creationCoveringTheEntireStatement1.actualString(), + creationCoveringTheEntireStatement2.actualString(), creationCoveringTheEntireStatement1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); } @@ -8334,14 +8334,14 @@ else if(creationCoveringTheEntireStatement1.inlinedStatementBecomesAdditionalArg return replacementInfo.getReplacements(); } else if(objectCreation1.identicalWithDifferentNumberOfArguments(creationCoveringTheEntireStatement2, replacementInfo.getReplacements(), parameterToArgumentMap)) { - Replacement replacement = new ObjectCreationReplacement(objectCreation1.getName(), - creationCoveringTheEntireStatement2.getName(), (ObjectCreation)objectCreation1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); + Replacement replacement = new ObjectCreationReplacement(objectCreation1.actualString(), + creationCoveringTheEntireStatement2.actualString(), (ObjectCreation)objectCreation1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); } else if(objectCreation1.inlinedStatementBecomesAdditionalArgument(creationCoveringTheEntireStatement2, replacementInfo.getReplacements(), replacementInfo.statements1)) { - Replacement replacement = new ObjectCreationReplacement(objectCreation1.getName(), - creationCoveringTheEntireStatement2.getName(), (ObjectCreation)objectCreation1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); + Replacement replacement = new ObjectCreationReplacement(objectCreation1.actualString(), + creationCoveringTheEntireStatement2.actualString(), (ObjectCreation)objectCreation1, creationCoveringTheEntireStatement2, ReplacementType.CLASS_INSTANCE_CREATION_ARGUMENT); replacementInfo.addReplacement(replacement); return replacementInfo.getReplacements(); }