§ 1523. Judgment of foreclosure in certain cases. 1. In an action under section 1503 if it shall appear to the court that there was a defect in the original foreclosure proceedings and such defect was not occasioned by the fraud or wilful neglect of the plaintiff, the judgment may foreclose or reforeclose the mortgage pursuant to article 13 of this chapter, notwithstanding that an action to foreclose the mortgage would otherwise be barred; provided, however, that no recovery shall be granted for any residue of the debt, remaining unsatisfied, if an action to foreclose the mortgage would otherwise be barred.
2. If it shall appear to the court in any such action that the defect in the foreclosure proceedings was not due to fraud or wilful neglect of the plaintiff and that the defendant or the person under whom he claims was not actually prejudiced thereby, the judgment may fix a time for redemption of the property and provide that a failure to redeem within such time shall thereafter preclude the defendant from redeeming the property or claiming any right, title or interest therein.
3. If a redemption of the property is ordered, the court must direct that the value of any improvement to the property made subsequent to the original sale or conveyance in lieu of foreclosure shall be added in computing the amount necessary to redeem the premises, in the same manner as if the value of such improvements was a portion of the mortgage debt.
4. If a new sale of the premises is ordered, the court may include in the judgment a provision awarding to the plaintiff the value of any improvements to the property made subsequent to the original sale or conveyance in lieu of foreclosure, in the same manner as if the value of such improvements was a portion of the mortgage debt.
5. The relief provided for in subdivision two of this section shall not be granted unless
a. the mortgage was executed after September 1, 1951, or
b. the defendant whose right title or interest will be extinguished by failure to redeem the property within the time fixed by the judgment held such right to redeem only by virtue of a subordinate mortgage or other lien, and an action to foreclose such right of redemption would not be barred at the time this act shall take effect.
The relief provided for in subdivision four of this section shall not be granted unless the improvements were made after September 1, 1951, except to the extent that a recovery, allowance or credit for or on account of the value of any improvements, including improvements made prior to the effective date of this act, might be granted, in any other action or proceeding, to the person maintaining the action provided for in section 1503.