Automated Program Transformation for Improving Software Quality