Refactoring in code groupping