Debugging with AI: Streamlining Code Refactoring