Determination of optimum refactoring sequence using A* algorithm after prioritization of classes
Anuradha Chug, Sandhya Tarwani · 2017
Bad smells are the surface indication of deeper problem into source code; therefore, they need to be identified as early as possible without compromising on the quality of the software. This lead towards the requirement of refactoring that is the process used in improving the internal attributes like maintainability of the software without affecting its external attributes. Hence, to enhance quality in terms of maintainability refactoring should be done in a controlled and iterative manner. In this study, we have proposed a method that will help researchers and developers to generate a refactoring sequence in advance with the help of heuristic search A∗ algorithm. We have chosen one class of an open source project with the help of prioritization technique to illustrate the generation of the sequence. A∗ algorithm helps in finding an appropriate sequence which has maximum value of maintainability by choosing a path of minimum metrics value. We have identified ten bad smells and used nine refactoring techniques to remove them. With the help of this technique, software developers and maintainers team would be able to figure out refactoring sequence in advance and hence will help them in completing their work within time and budget constraints.