void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { PsiElement element = startElement.getParent(); PsiMethod method = findMethodToFix(element); if (method != null) { method = updater.getWritable(method); method.getModifierList().setModifierProperty(PsiModifier.FINAL, true); if (method.getContainingFile() != element.getContainingFile()) { updater.moveTo(requireNonNullElse(method.getNameIdentifier(), method)); } } }