Contrary to popular belief most of the time a Certificate of Occupancy is NOT any type of a guarantee permits or inspections were obtained for work performed on a home. In most of New Jersey what buyers are told is a Certificate of Occupancy is actually just a municipal inspection of smoke detectors, carbon monoxide detectors and fire extinguishers. There are exceptions to this rule, towns like Fair Lawn do check for a list of defects as does Prospect Park. Other towns like Clifton are concerned more with illegal occupancies in basement and attics than code conformance.
Make sure you get a written document from the municipality detaining exactly what the Certificate of Occupancy includes in order to avoid misunderstandings.
Make sure you obtain written verification from the municipality the required permits, inspections, approvals and real estate tax updates were obtained OR obtain them prior to expiration of your inspection contingency.