private static boolean hasConflictingName(PsiDeclarationStatement initialization,
                                              PsiStatement newStatement,
                                              JavaCodeStyleManager manager) {
      return StreamEx.of(initialization.getDeclaredElements())
        .select(PsiNamedElement.class)
        .map(namedElement -> namedElement.getName())
        .filter(nonNull())
        .anyMatch(name -> !name.equals(manager.suggestUniqueVariableName(name, newStatement, true)));
    }
private static boolean hasConflictingName(PsiDeclarationStatement initialization,
                                              PsiStatement newStatement,
                                              JavaCodeStyleManager manager)