I don't understand why on a LL forum anyone would assume this LL is a slum lord. All we have is a friend of a tenant telling us there are code violations. Most tenants don't even know what would be considered a code violation. If we are going to assume than here is my assumption.
The tenant was fine with the condition of the apartment for five months but now wants to move and is trying to use "code violations" as an excuse. That being said if she were my tenant and she could be out by the end of the month LMR and SD would be fine with me. If the unit was in good shape and I rented it the following month then she would get back what she is owed.