My question is as above: Can one be non-resident alien in the US without being a resident anywhere else?
Let's assume the following simplified case: a former resident of Germany visits the US for a full calendar year of research on a J visa (his first stay in the US ever). He receives a German scholarship in a form that would be taxable in Germany. Hence, he ends his residency ("Wohnsitz") in Germany in order to avoid tax liability in Germany. Still, he is considered a non-resident alien for US tax purposes because he is exempt of counting days, and his scholarship is not US source income since it is non-compensatory, is primarily intended to support your own personal research or study, and is from a non-US payer. The tax treaty between Germany and the US because he is neither a resident of the US nor of Germany. So his scholarship is not taxable in the US nor in Germany.
Where is the flaw in the described situation? I guess it is that if you are not a resident of Germany (and hence cannot claim German residence for tax purposes on Schedule OI of Form 1040NR-EZ), you are not exempt of counting days of presence in the US. Still, I have not found any citeable source to support this guess; in particular, Form 8843 does not ask for residence at all.
Update: The tax treaty
shall apply to persons who are residents of one or both of the Contracting States, except as otherwise provided in this Convention.
This is article I of the tax treaty with Germany; in the 2006 protocol, this one has been subject to major additions, though.
In the version of the 2006 protocol (article II), the definition of residence is the following (article IV, paragraph 1):
“1. For the purposes of this Convention, the term "resident of a Contracting State" means any person who, under the laws of that State, is liable to tax therein by reason of his domicile, residence, place of management, place of incorporation, or any other criterion of a similar nature, and also includes that State and any political 4 subdivision or local authority thereof. The term, however, does not include any person who is liable to tax in that State in respect only of income from sources in that State or of profits attributable to a permanent establishment in that State or capital situated therein.”
Article IV, paragraphs 2 and 3 then only deal with residents of both Contracting States.