@Override
  public void visitMethod(@NotNull PsiMethod method) {
    if (containsSynchronization) {
      return;
    }
    if (method.hasModifierProperty(PsiModifier.SYNCHRONIZED)) {
      containsSynchronization = true;
      return;
    }
    super.visitMethod(method);
  }
@Override
  public void visitMethod(@NotNull PsiMethod method)