Type, inspection and repair of casting defects