No, there is no statute of limitations for code violations. If your home is not compliant with building codes, it must be brought into compliance. It does not matter how long ago the violation or noncompliance arose--e.g. whether problem dates back 100 days or 100 year, it has to be brought into current code compliance.There may be nothing you can do--other than find some way to comply--if your city is determined to play hardball on this. That doesn't mean you should give up--you should definitely consult with a real estate attorney who can evalute all the particulars of your situation in detail. However, you need to be prepared that on code violations, it generally does not matter how long ago the work, etc. was done.