Skip to content

Commit

Permalink
Properly restore broken method pair in commit
Browse files Browse the repository at this point in the history
junit-team/junit4@24a5aad
Rename Method	protected runMethod(method TestMethod, notifier RunNotifier) : void renamed to protected runChild(method TestMethod, notifier RunNotifier) : void in class org.junit.internal.runners.JUnit4ClassRunner
  • Loading branch information
tsantalis committed Dec 26, 2024
1 parent d663e28 commit f42ea55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public class UMLOperationBodyMapper implements Comparable<UMLOperationBodyMapper
private List<Set<AbstractCodeMapping>> internalParameterizeTestMultiMappings = new ArrayList<Set<AbstractCodeMapping>>();
private boolean nested;
private boolean lambdaBodyMapper;
private boolean anonymousCollapse;
private AbstractCall operationInvocation;
private Map<String, String> parameterToArgumentMap1;
private Map<String, String> parameterToArgumentMap2;
Expand All @@ -144,6 +145,10 @@ public boolean isNested() {
return nested;
}

public boolean isAnonymousCollapse() {
return anonymousCollapse;
}

private Set<AbstractCodeFragment> statementsWithStreamAPICalls(List<AbstractCodeFragment> leaves) {
Set<AbstractCodeFragment> streamAPICalls = new LinkedHashSet<AbstractCodeFragment>();
for(AbstractCodeFragment statement : leaves) {
Expand Down Expand Up @@ -461,6 +466,7 @@ else if(statement1.getString().equals(list2.get(i))) {
if((anonymous1.size() == 1 && anonymous2.size() == 0) ||
(anonymous1.size() == 1 && anonymous2.size() == 1 && anonymous1.get(0).getAnonymousClassDeclarations().size() > 0 && anonymous2.get(0).getAnonymousClassDeclarations().size() == 0) ||
(anonymous1.size() + nestedAnonymous1.size() == anonymous2.size() + nestedAnonymous2.size() + 1 && anonymous1.get(0).getAnonymousClassDeclarations().size() > 0)) {
this.anonymousCollapse = true;
AbstractCodeFragment anonymousFragment = null;
for(AbstractCodeFragment leaf1 : leaves1) {
if(leaf1.getAnonymousClassDeclarations().size() > 0) {
Expand All @@ -487,6 +493,7 @@ else if(lambdas1.size() == 1 && anonymous2.size() == 0 && lambdas2.size() == 0)
else if((anonymous1.size() == 0 && anonymous2.size() == 1) ||
(anonymous1.size() == 1 && anonymous2.size() == 1 && anonymous1.get(0).getAnonymousClassDeclarations().size() == 0 && anonymous2.get(0).getAnonymousClassDeclarations().size() > 0) ||
(anonymous1.size() + nestedAnonymous1.size() + 1 == anonymous2.size() + nestedAnonymous2.size() && anonymous2.get(0).getAnonymousClassDeclarations().size() > 0)) {
this.anonymousCollapse = true;
AbstractCodeFragment anonymousFragment = null;
for(AbstractCodeFragment leaf2 : leaves2) {
if(leaf2.getAnonymousClassDeclarations().size() > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,7 @@ private boolean mappedElementsMoreThanNonMappedT2(int mappings, UMLOperationBody
}
}
return mappings > nonMappedElementsT2 || (mappings >= nonMappedElementsT2WithoutThoseCallingAddedOperation &&
nonMappedElementsT2CallingAddedOperation >= nonMappedElementsT2WithoutThoseCallingAddedOperation) ||
nonMappedElementsT2CallingAddedOperation >= nonMappedElementsT2WithoutThoseCallingAddedOperation && !operationBodyMapper.isAnonymousCollapse()) ||
(operationBodyMapper.getMappings().size() > nonMappedElementsT2 && nonMappedElementsT2CallingAddedOperation > 0 &&
operationBodyMapper.getContainer1().getClassName().equals(operationBodyMapper.getContainer2().getClassName()));
}
Expand Down

0 comments on commit f42ea55

Please sign in to comment.