Predicting code refactoring via analyzing the history of quality metrics and code anti-patterns