private void acceptName(char[] name) {
    // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570
    if (name == null) return;

    if (!CharOperation.prefixEquals(
            this.completionEngine.completionToken, name, false /* ignore case */)
        && !(this.completionEngine.options.camelCaseMatch
            && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return;

    if (acceptedNames.includes(name)) return;

    this.acceptedNames.add(name);

    // accept result
    this.requestor.acceptName(name);
  }