void () { final Runnable runnable = () -> { if (!myMethodToReplaceIn.isValid()) return; MethodDuplicatesHandler.invokeOnScope(myProject, Collections.singleton(myMethodToReplaceIn), new AnalysisScope(myMethodToReplaceIn.getContainingFile()), true); }; ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> ApplicationManager.getApplication().runReadAction(runnable), JavaRefactoringBundle.message("introduce.parameter.duplicates.progress"), true, myProject); }