Effective Fault Treatment for Improving the Dependability of COTS and Legacy-Based Applications