Context-Aware Automated Refactoring For Unified Memory Allocation In Nvidia Cuda Programs