The impact of refactoring to patterns on software quality attributes