Fix PIEAE in PyExtractMethodTest
They were caused by the fact that we first replace selected fragment with method call and then use invalided elements of the same fragment to find its duplicates. I split ExtractMethodHelper#processDuplicates() into two methods: collectDuplicates() that finds duplicates before the substitution is performed and replaceDuplicatesWithPrompt() that handles user notification and replacing found occurrences afterwards. The same way this refactoring is implemented for Java sources (see ExtractMethodHandler.invokeOnElements()).
Showing
+72 -19
Please register or sign in to comment