Answer
Code 15 (To be rectified at next port): Applied to minor deficiencies that do not jeopardize the immediate safety of the crew, ship, or environment. The vessel is permitted to clear port and sail but must rectify the issue before departing the next port of call.
Code 17 (To be rectified before departure): Applied to significant deficiencies that must be completely resolved while the ship is still alongside. The vessel will not be granted port clearance to sail until a PSC officer or Class surveyor verifies the repair.
Code 30 (Grounds for Detention): The most severe action. Applied when a ship has critical structural, safety, or environmental deficiencies (e.g., inoperable emergency generator, leaking oily water separator, compromised fire pumps) that make it unsafe to proceed to sea. The vessel is officially detained.