The two scenarios which we run into the most seem to be (1) the Goldilocks Scenario and (2) the Intoxicated Idiot.
1) The Goldilocks Scenario: We get this every so often and I'm still surprised by it. The residents of a house discover that a homeless guy is sleeping in the shed or the garage or (had a couple of these lately) wake up to find someone on the couch in the living room. Another variant of this is the landlord that goes to check his empty property and finds someone in it. In all these cases the person has not shown any intent to commit a crime beyond trespass and therefore cannot be convicted of B&E. However, he has never been banned from the property either and therefore cannot be convicted of statutory trespass.
2) The Intoxicated Idiot: Generally, this is the guy who, at two in the morning, is so drunk or high that he goes to the wrong house. Sometimes it's the next trailer over, but often he goes back to the house he grew up in (which is now lived in by an entirely different family). Quite a few of these fall under statutory trespass because person in the property yells at the guy to get out and the guy doesn't. However, in a fair number of these the lawful resident hides in the bedroom and calls the police or goes out to confront the intruder but never actually utters the magic words "Get out!" Again, there's no B&E here and, without the active banning, no statutory trespass.
So, what's the solution? Common Law Trespass. You see, Virginia Code 18.2-119 didn't set out to deal with all trespasses. It only deals with "Trespass after having been forbidden to do so." The common law is where we find the formula for dealing with other trespasses.
To be clear, under the common law not all trepasses were misdemeanors. The test as to whether an act was a common law criminal trespass can be found in Henderson v. Commonwealth, 49 Va. 708 (1852):
It is abundantly clear that the mere breaking and entering the close of another, though in contemplation of law a trespass committed [by force of arms], is only a civil injury to be redressed by action; and cannot be treated as a misdemeanor to be vindicated by indictment or public prosecution. But when it is attended by circumstances constituting a breach of the peace, such as entering the dwelling house with offensive weapons, in a manner to cause terror and alarm to the family and inmates of the house, the trespass is heightened into a public offence, and becomes the subject of a criminal prosecution.This case, in which Henderson went onto the porch of the house and shot two dogs, seems to set out some basic parameters. Coming into the "close" is not a criminal trespass and can only be addressed civilly. The "close" is land which is surrounded by a boundary of some sort. This is not to be confused with curtilage which is the area and buildings immediately surrounding a house and used in everyday life. A close on a farm could include acres or miles of fenced in property which is far outside the curtilage.
On the other hand the same case states that when "the place where the entry is made is a dwelling house, as reason would suggest, and the peace of those abiding under the sanctity of their home and the security of their castle, would strongly require, is a most important circumstance to be taken into consideration in the aggravation of trespass [within the close] into a misdemeanor." Since this trespass actually occurred on the porch, the curtilage would also seem to be included as part of the sanctity of the home and security of the castle. It's arguable that the case only meant to include the porch as part of the residence or that maybe it counted the smoke from the firearms floating into the residence as entry into the actual residence. In any case, at the very least criminal trespass is trespass upon the residence.
The second part has to do with breaching the peace. Here we can look to Graham v. Harless, 153 Va. 228 (1929): "It is true that a mere trespass upon real or personal property, which is also the subject of a civil action, is not always a crime at common law; but it is a crime at common law if it amounts to a breach of the peace, or if it tends to or threatens a breach of the peace." Of course this is a civil case, but we see the same thing repeated in a more modern criminal case, Snead v. Commonwealth, 212 Va. 803 (1972): "Our examination of the authorities makes it clear that unless a trespass upon land or premises amounted to a breach of the peace or tended to or threatened such a breach, the trespasser was not criminally liable at common law."
An actual breach of the peace is fairly easy to establish; it's "an act of violence or an act likely to produce violence." Taylor v. Commonwealth, 11 Va. App. 649 (1991). In other words a breach of the peace is everything from a confrontation which would likely lead to violence all the way up the scale of violence to murder (most often probably a battery).
As for something which would tend to cause a breach, that would seem to be anything which could reasonably be thought to lead to a confrontation that could lead to violence. This would include things such as entering a residence without permission.
Having established that common law trespass fills the gap, we now have to establish what punishment attaches. Like most common law offenses, it would fall under 18.2-12: "A misdemeanor for which no punishment or no maximum punishment is prescribed by statute shall be punishable as a Class 1 misdemeanor." So it would carry exactly the same punishment as statutory trespass, up to 12 months in jail and/or up to a $2,500 fine.
Common Law Trespass
(1) Enter into the residence of another, AND
(2)(a) Breach the peace, OR
(2)(b) Act in a manner tending to breach the peace.
Up to 12 months in jail and/or up to a $2,500 fine.