void (List<Match> matches) { if (!isStatic() && isCanBeStatic()) { for (Match match : matches) { if (!isInSameFile(match) || !isInSameClass(match)) { PsiUtil.setModifierProperty(myExtractedMethod, PsiModifier.STATIC, true); myStatic = true; break; } } } }