The document discusses detecting and removing bad code smells from source code. It describes a tool called HIST that uses change history information to detect code smells. The tool extracts change history from version control logs, analyzes the code changes, and uses the information to detect five types of code smells: divergent change, shotgun surgery, parallel inheritance, blob, and feature envy. An evaluation of HIST shows it improves on static code analysis techniques in detecting these code smells, with F-measure scores for detection ranging from 64-92% compared to 0-48% for static analysis alone. The document concludes by discussing some of the researcher's ongoing and future work related to code smells and refactoring.