private @NotNull CharSequence doIntern(@NotNull CharSequence text, int startOffset, int endOffset) {
    int hashCode;
    if (startOffset == 0 && endOffset == text.length()) {
      hashCode = StringUtil.stringHashCode(text);
    }
    else {
      hashCode = StringUtil.stringHashCode(text, startOffset, endOffset);
    }
    CharSequence interned = STATIC_ENTRIES.getSubSequenceWithHashCode(hashCode, text, startOffset, endOffset);
    if (interned != null) {
      return interned;
    }

    synchronized(entries) {
      return entries.getOrAddSubSequenceWithHashCode(hashCode, text, startOffset, endOffset);
    }
  }
private @NotNull CharSequence doIntern(@NotNull CharSequence text, int startOffset, int endOffset)