Skip to content

Commit

Permalink
Fix matching of method pairs in annotation type declarations
Browse files Browse the repository at this point in the history
junit-team/junit5@eb35aa9
Rename Method	public parameters() : String renamed to public parameterTypeNames() : String in class org.junit.platform.suite.api.SelectMethod
  • Loading branch information
tsantalis committed Jan 2, 2025
1 parent 97f45f7 commit 6309cb1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9764,6 +9764,21 @@ else if(!thisEqualSignature && otherEqualSignature) {
return 1;
}
}
if(this.getContainer1().getJavadoc() != null && this.getContainer2().getJavadoc() != null &&
operationBodyMapper.getContainer1().getJavadoc() != null && operationBodyMapper.getContainer2().getJavadoc() != null) {
boolean thisCommonJavadoc =
this.getContainer1().getJavadoc().getText().contains(this.getContainer2().getJavadoc().getText()) ||
this.getContainer2().getJavadoc().getText().contains(this.getContainer1().getJavadoc().getText());
boolean otherCommonJavadoc =
operationBodyMapper.getContainer1().getJavadoc().getText().contains(operationBodyMapper.getContainer2().getJavadoc().getText()) ||
operationBodyMapper.getContainer2().getJavadoc().getText().contains(operationBodyMapper.getContainer1().getJavadoc().getText());
if(thisCommonJavadoc && !otherCommonJavadoc) {
return -1;
}
else if(!thisCommonJavadoc && otherCommonJavadoc) {
return 1;
}
}
int thisEditDistance = this.editDistance();
int otherEditDistance = operationBodyMapper.editDistance();
if(thisEditDistance != otherEditDistance) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,8 @@ private boolean delegatesToAnotherRemovedOperation(UMLOperation removedOperation
private void updateMapperSet(TreeSet<UMLOperationBodyMapper> mapperSet, UMLOperation removedOperation, UMLOperation addedOperation, int differenceInPosition) throws RefactoringMinerTimedOutException {
boolean mapperWithZeroNonMappedStatementsOrIdenticalMethodName = false;
for(UMLOperationBodyMapper mapper : mapperSet) {
if(mapper.getContainer1().getBodyHashCode() == mapper.getContainer2().getBodyHashCode()) {
if(mapper.getContainer1().getBody() != null && mapper.getContainer2().getBody() != null &&
mapper.getContainer1().getBodyHashCode() == mapper.getContainer2().getBodyHashCode()) {
return;
}
if(mapper.getContainer1().getName().equals(mapper.getContainer2().getName())) {
Expand Down

0 comments on commit 6309cb1

Please sign in to comment.