Patch Refactoring