(a) Whenever one or more mechanics' liens are placed upon any real estate pursuant to sections 49-33 , 49-34 , 49-35 and 49-38 , the owner of the real estate, if no action to foreclose the lien is then pending before any court, may make application, together with a proposed order and summons, to the superior court for the judicial district in which the lien may be foreclosed under the provisions of section 51-345 , or to any judge thereof, that a hearing or hearings be held to determine whether the lien or liens should be discharged or reduced. The court or judge shall thereupon order reasonable notice of the application to be given to the lienor or lienors named therein and, if the application is not made by all owners of the real estate as may appear of record, shall order reasonable notice of the application to be given to all other such owners, and shall set a date or dates for the hearing or hearings to be held thereon. If the lienor or lienors or any owner entitled to notice is not a resident of this state, the notice shall be given by personal service, registered or certified mail, publication or such other method as the court or judge shall direct. At least four days' notice shall be given to the lienor, lienors or owners entitled to notice prior to the date of the hearing.
(b) The application, order and summons shall be substantially in the following form: