Skip to content

Commit

Permalink
Improvement over previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Dec 29, 2024
1 parent bb47b0f commit 51936ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java
Original file line number Diff line number Diff line change
Expand Up @@ -2503,13 +2503,13 @@ private UMLOperationBodyMapper findBestMapper(TreeSet<UMLOperationBodyMapper> ma
UMLOperationBodyMapper bestMapper = mapperSet.first();
VariableDeclarationContainer bestMapperOperation1 = bestMapper.getContainer1();
VariableDeclarationContainer bestMapperOperation2 = bestMapper.getContainer2();
int bestCommonParameterTypes = bestMapperOperation1.commonParameterTypes(bestMapperOperation2).size();
int bestCommonParameterTypes = bestMapperOperation1.commonParameters(bestMapperOperation2).size();
VariableDeclarationContainer secondBestMapperOperation1 = mapperList.size() > 1 ? mapperList.get(1).getContainer1() : null;
VariableDeclarationContainer secondBestMapperOperation2 = mapperList.size() > 1 ? mapperList.get(1).getContainer2() : null;
boolean secondBestMapperEqualSignatureWithCommonParameterTypes = secondBestMapperOperation1 != null && secondBestMapperOperation2 != null ?
equalSignatureWithCommonParameterTypes(secondBestMapperOperation1, secondBestMapperOperation2) : false;
int secondBestCommontParameterTypes = secondBestMapperOperation1 != null && secondBestMapperOperation2 != null ?
secondBestMapperOperation1.commonParameterTypes(secondBestMapperOperation2).size() : 0;
secondBestMapperOperation1.commonParameters(secondBestMapperOperation2).size() : 0;
boolean identicalBodyWithOperation1OfTheBestMapper = identicalBodyWithAnotherAddedMethod(bestMapper);
boolean identicalBodyWithOperation2OfTheBestMapper = identicalBodyWithAnotherRemovedMethod(bestMapper);
if(equalSignatureWithCommonParameterTypes(bestMapperOperation1, bestMapperOperation2) &&
Expand All @@ -2521,7 +2521,7 @@ private UMLOperationBodyMapper findBestMapper(TreeSet<UMLOperationBodyMapper> ma
UMLOperationBodyMapper mapper = mapperList.get(i);
boolean equalSignatureWithCommonParameterTypes = equalSignatureWithCommonParameterTypes(mapper.getContainer1(), mapper.getContainer2());
if(checkForCalls(mapper) || equalSignatureWithCommonParameterTypes) {
int commonParameterTypes = mapper.getContainer1().commonParameterTypes(mapper.getContainer2()).size();
int commonParameterTypes = mapper.getContainer1().commonParameters(mapper.getContainer2()).size();
VariableDeclarationContainer operation2 = mapper.getContainer2();
List<AbstractCall> operationInvocations2 = operation2.getAllOperationInvocations();
boolean anotherMapperCallsOperation2OfTheBestMapper = false;
Expand Down

0 comments on commit 51936ba

Please sign in to comment.