This question is related to a comment in Shafarevich's Basic Algebraic Geometry 2. Shafarevich shows that the affine line with doubled origin is not separated by showing that the diagonal is not closed in the product $X\times_k X$.
Moreover, he shows that a rational function which is regular at one origin is also regular at the other origin (which is equivalent to $\mathcal{O}_{X,x_0}=\mathcal{O}_{X,x_1}$).
Then he says and I quote "It can be shown that nonseparatedness is quite generally associated with this type of phenomenon".
So what is the general statement here. Naively one/I would think that he was saying something like this
For an integral separated scheme $X$ and points $x,y\in X$ such that $x\neq y$, there exists $f,g\in K(X)$ such that $f\in \mathcal{O}_{X,x},g\in \mathcal{O}_{X,y}$ and $f\notin \mathcal{O}_{X,y},g\notin \mathcal{O}_{X,x}$.
So what is it that Shafarevich was alluding to.