Patent 9740480 was granted and assigned to King Fahd University of Petroleum and Minerals on August, 2017 by the United States Patent and Trademark Office.
Methods and apparatuses are provided for code refactoring. The method includes acquiring a code and identifying, using processing circuitry and based on a Markov decision process model, a refactoring sequence. The refactoring sequence includes a plurality of refactoring steps to be applied to the code. Further, the method includes refactoring, by the processing circuitry, the code according to the refactoring sequence.