private static boolean isValidIdentifier(boolean isMethod, String identifier) {

    assert identifier != null : "Null identifier passed to the isValidIdentifier() method.";
    assert !identifier.isEmpty() : "Empty identifier passed to the isValidIdentifier() method.";

    if (isMethod && (identifier.equals(CodeConstants.INIT_NAME) || identifier.equals(CodeConstants.CLINIT_NAME))) {
      return true;
    }

    if (!Character.isJavaIdentifierStart(identifier.charAt(0))) {
      return false;
    }

    char[] chars = identifier.toCharArray();

    for(int i = 1; i < chars.length; i++) {
      char ch = chars[i];

      if ((!Character.isJavaIdentifierPart(ch)) || Character.isIdentifierIgnorable(ch)) {
        return false;
      }
    }

    return true;

  }
Return {@code true} if, and only if identifier passed is compliant to JLS9 section 3.8 AND DOES NOT CONTAINS so-called "ignorable" characters.
Ignorable characters are removed by javac silently during compilation and thus may appear only in specially crafted obfuscated classes.
For more information about "ignorable" characters see <a href="https://bugs.openjdk.java.net/browse/JDK-7144981">JDK-7144981</a>.

@param identifier Identifier to be checked
@return {@code true} in case {@code identifier} passed can be used as an identifier; {@code false} otherwise.
src/org/jetbrains/java/decompiler/modules/renamer/ConverterHelper.java