(a) If any warranty provided for in this subtitle is breached, the court may award legal or equitable relief, or both, as justice requires.
(b) Unless an express warranty specifies a longer period of time, the warranties provided for in this subtitle expire:
(1) In the case of a dwelling completed at the time of the delivery of the deed to the original purchaser, one year after the delivery or after the taking of possession by the original purchaser, whichever occurs first;
(2) In the case of a dwelling not completed at the time of delivery of the deed to the original purchaser, one year after the date of the completion or taking of possession by the original purchaser, whichever occurs first; and
(3) In the case of structural defects, two years after the date of completion, delivery, or taking possession, whichever occurs first.
(c) The warranties provided under this section do not expire on the subsequent sale of a dwelling by the original purchaser to a subsequent purchaser, but continue to protect the subsequent purchaser until the warranties provided under subsection (b) of this section expire. The warranties provided under this section do not apply to any defect caused by the original purchaser.
(d) Any action arising under this subtitle shall be commenced within two years after the defect was discovered or should have been discovered or within two years after the expiration of the warranty, whichever occurs first.