Case-Based Reasoning Approach for Well Failure Diagnostics and Planning