1. Warranty of habitability. The judge’s conclusion that the landlord breached the warranty of habitability due to “the failure to provide locks and the failure ... to completely repair the kitchen ceiling” is not clearly erroneous. See Wesson v. Leone Enterprises, Inc., 437 Mass. 708, 712 (2002). “The judge has *478wide discretion in determining whether the conditions in any given rental unit amount to a material breach of the implied warranty of habitability.” Jablonski v. Clemons, 60 Mass. App. Ct. 473, 475 (2004), citing Boston Hous. Authy. v. Hemingway, 363 Mass. 184, 200-201 & n.16 (1973). Although the parties gave conflicting testimony as to the condition of the locks on the door to the premises, we give deference to the trial judge’s credibility determination. See Jablonski v. Casey, 64 Mass. App. Ct. 744, 747 (2005). In addition, the judge’s conclusion that the hole in the ceiling and the failure to provide locks constituted a breach of the warranty of habitability is consistent with the relevant legal standards. See Doe v. New Bedford Hous. Authy., 417 Mass. 273, 281 (1994) (minimum standards of warranty of habitability are measured by applicable State building and sanitary codes). See also 105 Code Mass. Regs. § 410.480 (2007) (owner shall provide, install, and maintain locks to secure against unlawful entry).