Fix for issue
Supporting Stream API refactorings within extracted and inlined methods
@@ -895,6 +895,12 @@ public class UMLOperationBodyMapper implements Comparable<UMLOperationBodyMapper
}
// TODO remove non-mapped inner nodes from T1 corresponding to mapped expressions
+ Set<AbstractCodeFragment> streamAPIStatements1 = statementsWithStreamAPICalls(leaves1);
+ Set<AbstractCodeFragment> streamAPIStatements2 = statementsWithStreamAPICalls(leaves2);
+ if(streamAPIStatements1.size() == 0 && streamAPIStatements2.size() > 0) {
+ processStreamAPIStatements(leaves1, leaves2, innerNodes1, streamAPIStatements2);
+ }
+
//remove the leaves that were mapped with replacement, if they are not mapped again for a second time
leaves1.removeAll(addedLeaves1);
leaves2.removeAll(addedLeaves2);
@@ -1091,6 +1097,12 @@ public class UMLOperationBodyMapper implements Comparable<UMLOperationBodyMapper
}
processLeaves(leaves1, expressionsT2, parameterToArgumentMap1);
+ Set<AbstractCodeFragment> streamAPIStatements1 = statementsWithStreamAPICalls(leaves1);
+ Set<AbstractCodeFragment> streamAPIStatements2 = statementsWithStreamAPICalls(leaves2);
+ if(streamAPIStatements1.size() == 0 && streamAPIStatements2.size() > 0) {
+ processStreamAPIStatements(leaves1, leaves2, innerNodes1, streamAPIStatements2);
+ }
+
//remove the leaves that were mapped with replacement, if they are not mapped again for a second time
leaves2.removeAll(addedLeaves2);
//remove the innerNodes that were mapped with replacement, if they are not mapped again for a second time
