You need to see the violations. If the violations amount of an "unsafe living standard" or "unsafe to be in the premises" then you have a right to terminate the lease. If the lease has language that makes it void if housing violations.
Contact me for further detailed questions and answers. 215-561-0877 DISCLAIMER: Matthew Solomon is licensed to practice law in both the State of Pennsylvania and the State of New Jersey.This answer based on general legal principles and is not intended for the purpose of providing specific legal advice or opinions. This answer does not constitute the establishment of an attorney-client relationship.
There are not enough details here to give you a good answer.
If you have a lease of a set term like 12 months, you can only break the lease (and not be liable for the remainder of the lease), if the house is uninhabitable. A non-functioning hot water heater, repaired by an unlicensed person certainly seems to make the building uninhabitable. Depending on this violations that might also make the house uninhabitable. If the house does not have a certificate of occupancy, it is uninhabitable.
If you have a month-month, you can move and only be liable for the time you lived there.
You should move if you think the hot water heater is dangerous or the house is uninhabitable.
Consult with an attorney and discuss all the details.