A User-aware Intelligent Refactoring for Discrete and Continuous Software Integration