Even though this question has been answered before, I think it is still worth an effort to make this clearer.
If you look into the code of getLocationOnScreen and getLocationInWindow:
public void getLocationOnScreen(int[] outLocation) {
// It calls the getLocationInWindow
getLocationInWindow(outLocation);
// and adjust accordingly in case the window is not the top-level window
final AttachInfo info = mAttachInfo;
if (info != null) {
outLocation[0] += info.mWindowLeft; // refer image below
outLocation[1] += info.mWindowTop; // refer image below
}
}
public void getLocationInWindow(int[] outLocation) {
// do my calculation here
// by traversing views contained in this window (in a single tree of views)
...
}
This is further explained in the image below, where blue indicates screen & red indicates window:

It is important to note that window can be your top-level window (covers the entire screen), or other custom windows such as dialog.
So, going back to your questions:
getLocationOnScreen returns location with added height of status bar
That's right. Your phone's screen includes the status bar's view
getLocationOnScreen and getLocationInWindow, they both return same location of a button with added height of status bar
That is because the window you are working with is the top level window that covers your entire phone's screen.