What is "repair and deduct"?

To keep residential real property in habitable condition, some local jurisdictions (and some standard lease forms) allow a tenant to give written notice to the landlord that there is a defect in the property. The notice to the landlord typically must provide the landlord with a reasonable amount of time to make the repair ("cure the defect"). After waiting the required amount of time after providing the written notice to the landlord, the tenant may then go out and hire a professional to make the necessary repair, pay the repairman, and then deduct the cost of the repairs from the rent paid to the landlord. Some restrictions on "repair and deduct" are that the cost of the repair must not exceed a certain dollar amount or be in excess of one month's rent.