Pipelines Reliability Analysis Under Corrosion Effect and Residual Stress