Reliability Analysis of Complex Systems with Repair