Ordered sequencing of Refactorings based on Preconditions and Postconditions
DOI:
https://doi.org/10.61467/2007.1558.2026.v17i1.1025Keywords:
Software refactoring, Refactoring sequences, Sequencing code transformations, Quality assessment in refactoringAbstract
Refactoring is an essential practice in software development, aimed at improving the internal quality of code without modifying its external behaviour. This work introduces a modification to the Greedy algorithm through the integration of preconditions and postconditions to seek to optimise the ordering of refactoring operations. Unlike the traditional approach, which selects transformations without considering their cumulative impact, the proposed algorithm evaluates each step to help ensure progressive improvement in key metrics such as abstraction, modular protection, and implementation inheritance. To validate the effectiveness of the algorithm, it was applied to 30 applications selected from the GitHub repository, with the condition that each project remained executable both before and after refactoring. Metrics were evaluated at each stage of the process to assess the actual impact of the generated sequences.
Smart citations: https://scite.ai/reports/10.61467/2007.1558.2026.v17i1.1025
Dimensions.
Open Alex.
References
Barón, N., Salgado, R., Valenzuela, B., & Alcántara, J. (2023). Technique to enhance modular protection in legacy software systems. In Proceedings of the 12th International Conference on Software Process Improvement (CIMPS) (pp. 71–77). IEEE. https://doi.org/10.1109/CIMPS61323.2023.10528853
Eilertsen, A. M. (2020). Refactoring operations grounded in manual code changes. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering: Companion Proceedings (ICSE ’20 Companion) (pp. 182–185). ACM. https://doi.org/10.1145/3377812.3381395
Fowler, M. (1999). Refactoring: Improving the design of existing code. Addison-Wesley.
Kaur, G., & Sharma, D. (2015). A study on Robert C. Martin’s metrics for packet categorization using fuzzy logic. International Journal of Hybrid Information Technology, 8(12), 215–224. https://doi.org/10.14257/ijhit.2015.8.12.15
Kurbatova, Z., Veselov, I., Golubev, Y., & Bryksin, T. (2020). Recommendation of move method refactoring using path-based representation of code. In Proceedings of the 42nd IEEE/ACM International Conference on Software Engineering Workshops (ICSEW ’20) (pp. 315–322). ACM. https://doi.org/10.1145/3387940.3392191
Mahouachi, R., Kessentini, M., & Ó Cinnéide, M. (2013). Search-based refactoring detection. In GECCO ’13 Companion: Genetic and Evolutionary Computation Conference (pp. 205–206). ACM. https://doi.org/10.1145/2464576.2464680
Meananeatra, P. (2012). Identifying refactoring sequences for improving software maintainability. In Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering (ASE ’12) (pp. 406–409). ACM. https://doi.org/10.1145/2351676.2351760
Mens, T., & Tourwé, T. (2004). A survey of software refactoring. IEEE Transactions on Software Engineering, 30(2), 126–139. https://doi.org/10.1109/TSE.2004.1265817
Opdyke, W. F. (1992). Refactoring object-oriented frameworks (Doctoral dissertation). University of Illinois at Urbana–Champaign.
Ortiz-Gutiérrez, O., Santaolaya-Salgado, R., Fragoso-Díaz, O.-G., & Rojas-Pérez, J.-C. (2019). Métricas para la medición del factor de flexibilidad y el factor de herencia de implementación de sistemas de software. RISTI – Revista Ibérica de Sistemas e Tecnologias de Informação, (34), 97–111. https://doi.org/10.17013/risti.34.97-111
Ouni, A., Kessentini, M., & Sahraoui, H. (2014). Multiobjective optimization for software refactoring and evolution. In Advances in Computers (Vol. 94, pp. 103–167). Elsevier. https://doi.org/10.1016/B978-0-12-800161-5.00004-9
Tarwani, S., & Chug, A. (2020). Assessment of optimum refactoring sequence to improve the software quality of object-oriented software. Journal of Information and Optimization Sciences. https://doi.org/10.1080/02522667.2020.1809097
Tsimakis, A., Zarras, A., & Vassiliadis, P. (2019). The three-step refactoring detector pattern. In Proceedings of the 24th European Conference on Pattern Languages of Programs (EuroPLop ’19) (pp. 1–9). ACM. https://doi.org/10.1145/3361149.3361168
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 International Journal of Combinatorial Optimization Problems and Informatics

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.