Lapse and anti-lapse

Lapse and anti-lapse are complementary concepts under the US law of wills, which address the disposition of property that is willed to someone who dies before the testator (the writer of the will).
Lapse.
At common law, lapse occurs when the beneficiary or the devisee under the will predeceases the testator, invalidating the gift. The gift would instead revert to the residuary estate or be granted under the law of intestate succession.
If the deceased beneficiary was intended to inherit part or all of the residuary estate, then that portion of the estate would pass by intestate succession, as though the testator had left no will. This rule is referred to as the doctrine of no residue of a residue, because the portion of the residuary estate that did not itself pass under the will could not be considered part of the residuary estate at all.
Under section 2-604(b) of the uniform probate code, "if the residue is devised to two or more persons, the share of a residuary devisee that fails for any reason passes to the other residuary devisee, or to other residuary devisees in proportion to the interest of each in the remaining part of the residue." Simply put, if there are two parties in the remainder and one has not survived, the entirety of the remainder goes to the surviving residuary devisee or devisees.
In jurisdictions which have adopted the Uniform Simultaneous Death Act, or the 1991 version of the Uniform Probate Code (but not the previous Uniform Probate Code), any devisee who dies within 120 hours "after" the testator is legally considered to have died "before" the testator. In such jurisdictions, only a devisee who survives more than 120 hours after the testator is considered to have met this "statutory survival test."
Anti-lapse statutes.
Most common-law jurisdictions have enacted an anti-lapse statute to address this situation. The anti-lapse statute "saves" the bequest if it has been made to parties specified in the statute, usually members of the testator's immediate family, if they had issue that survived the testator. For example, the New York anti-lapse statute specifies brothers, sisters, and issue, specifically. If the anti-lapse statute does indeed apply, then the issue of the deceased beneficiary will inherit whatever was willed to the beneficiary. The testator can prevent the operation of an anti-lapse statute by providing that the gift will only go to the named beneficiary "if" that beneficiary survives the testator, or by simply stating in the will that the anti-lapse statute does not apply.
Another modification to the common law of lapse is the elimination of the "no residue of a residue" rule where multiple beneficiaries are named to inherit the residue. The modern view is that where a beneficiary was intended to inherit part of the residuary estate who predeceases the testator, and that beneficiary is not covered by the anti-lapse statute, then that beneficiary's inheritance will return to the residuary estate, to be inherited by the other beneficiaries to whom the residue has been willed.