When a sale is made of a railroad in this State under execution or by force of a decree or judgment in foreclosure or insolvency proceedings or otherwise, or when a lease of a railroad is made by a receiver by order of the Superior Court, the sale and conveyance or lease shall vest in the purchaser or lessee such title of the parties to the suit as the court may direct, and may include all property and franchises of the company subject to all conditions, limitations and restrictions.
N.J.S. § 48:12-138