Designing Refactoring Tool for Object-Oriented Code Based on Metrics
https://doi.org/10.15514/ISPRAS-2025-37(5)-11
Abstract
Currently, the information technologies industry is a leader in growth rate among the main economic sectors. However, the most important components of the development process, such as estimation and refactoring of program products, still remain without generic tools. Therefore, our main goal is to design a mean of unified modification and formal evaluation for code in object-oriented programming languages. We use refactoring patterns to define code modifications, and code metrics calculation to assess its characteristics. Our tool should help developers to make decisions connected with code quality and its modification necessity, automatize that change. Actually, it may be used in organizations and educational institutions. We have developed a domain specific language to unify the specification of object-oriented languages. Furthermore, a research prototype of the tool has been created. 3 object-oriented languages descriptions and 6 diverse refactoring patterns have been developed to demonstrate capabilities of the approach.
About the Authors
Artem Olegovich KORZNIKOVRussian Federation
BSc (Applied Mathematics and Computer Science), Master’s student of the Department of Physics and Mathematics of PSU. Research interests: code metrics, object-oriented programming languages, domain specific languages, code refactoring.
Natalya Nikolaevna DATSUN
Russian Federation
Cand. Sci. (Phys.-Math,), visiting lecturer of Department of Information Technology in Business of the National Research University Higher School of Economics, Perm; Associate Professor, Department of Applied Informatics, Information Systems and Technologies, Perm State Humanitarian Pedagogical University. Her research interests include code metrics, object-oriented analysis, and design.
References
1. Качанов В.В., Ермаков М.К., Панкратенко Г.А., Спиридонов А.В., Волков А.С., Марков С.И. Технический долг в жизненном цикле разработки ПО: запахи кода. Труды ИСП РАН, том 33, вып. 6, 2021 г., стр. 95-110. DOI: 10.15514/ISPRAS-2021-33(6)-7. / Kachanov V.V., Ermakov M.K., Pankratenko G.A., Spiridonov A.V., Volkov A.S., Markov S.I. Technical debt in the software development lifecycle: code smells. Trudy ISP RAN/Proc. ISP RAS, 2021, vol. 33, issue 6, pp. 95-110 (in Russian). DOI: 10.15514/ISPRAS–2021–33(6)–7.
2. Sharma T., Efstathiou V., Louridas P., Spinellis D. Code smell detection by deep direct-learning and transfer-learning. Journal of Systems and Software, vol. 176, article no. 110936, 2021, pp.1-25. DOI: 10.1016/j.jss.2021.110936.
3. Сыромятников С. В., Бронштейн И. Е., Луговской Н. Л. Рефакторинг в рамках программного проекта. Труды ИСП РАН, том 26, вып. 1, 2014 г., стр. 395-402. DOI: 10.15514/ISPRAS-2014-26(1)-16. / Syromyatnikov S. V., Bronshteyn I. E., Lugovskoy N. L. Refactoring on the Whole Project. Trudy ISP RAN/Proc. ISP RAS, 2014, vol. 26, issue 1, pp. 395-402 (in Russian). DOI: 10.15514/ISPRAS-2014-26(1)-16.
4. Ivers J., Nord R. L., Ozkaya I., Seifried C., Timperley C. S., Kessentini M. Industry's cry for tools that support large-scale refactoring. In Proc. of the 44th International Conference on Software Engineering: Software Engineering in Practice, 2022, pp. 163-164. DOI: 10.1145/3510457.3513074.
5. Almogahed A., Mahdin H., Omar M., Zakaria N. H., Alawadhi A., Barraood S. O. Empirical Investigation of the Diverse Refactoring Effects on Software Quality: The Role of Refactoring Tools and Software Size. In Proc. of the 2023 3rd International Conference on Emerging Smart Technologies and Applications, 2023, pp. 1-6. DOI: 10.1109/eSmarTA59349.2023.10293407.
6. Golubev Y., Kurbatova Z., AlOmar E. A., Bryksin T., Mkaouer M. W. (2021) One Thousand and One Stories: A Large-Scale Survey of Software Refactoring (online). Available at: https://doi.org/10.48550/arXiv.2107.07357, accessed 05.05.2025.
7. Peruma A., AlOmar E. A., Newman C. D., Mkaouer M. W., Ouni A. Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship Between Technical Debt and Refactoring. In Proc. of the 2022 IEEE/ACM 19th International Conference on Mining Software Repositories, 2022, pp. 127-131. DOI: 10.1145/3524842.3528527
8. Li Z., Avgeriou P., Liang P. A Systematic Mapping Study on Technical Debt and its Management. Journal of Systems and Software, vol. 101, 2015, pp. 193-220. DOI: 10.1016/j.jss.2014.12.027.
9. Panigrahi R., Kuanar S. K., Kumar L. Application of Naïve Bayes classifiers for refactoring Prediction at the method level. In Proc. of the 2020 International Conference on Computer Science, Engineering and Applications, 2020, pp. 1-6. DOI: 10.1109/ICCSEA49143.2020.9132849.
10. Lambiase S., Cupito A., Pecorelli F., De Lucia A., Palomba F. Just-In-Time Test Smell Detection and Refactoring: The DARTS Project. In Proc. of the 2020 IEEE/ACM 28th International Conference on Program Comprehension, 2020, pp. 441-445. DOI: 10.1145/3387904.3389296.
11. Perera J., Tempero E., Tu Y.-C., Blincoe K. Quantifying Requirements Technical Debt: A Systematic Mapping Study and a Conceptual Model. In Proc. of the 2023 IEEE 31st International Requirements Engineering Conference, 2023, pp. 123-133. DOI: 10.1109/RE57278.2023.00021.
12. Tavares C., Ferreira F., Figueiredo E. A Systematic Mapping of Literature on Software Refactoring Tools. In Proc. of the XIV Brazilian Symposium on Information Systems, 2018, article no. 11, pp. 1-8. DOI: 10.1145/3229345.3229357.
13. Murphy-Hill E., Black A. P. Refactoring Tools: Fitness for Purpose. IEEE Software, 2008, vol. 25, issue 5, pp. 38-44. DOI: 10.1109/MS.2008.123.
14. Zhang Z., Xing Z., Xu X., Zhu L. RIdiom: Automatically Refactoring Non-Idiomatic Python Code with Pythonic Idioms. In Proc. of the 2023 IEEE/ACM 45th International Conference on Software Engineering: Companion Proceedings, 2023, pp. 102-106. DOI: 10.1109/ICSE-Companion58688.2023.00034.
15. Zhang Y., Li C., Shao S. ReSwitcher: Automatically Refactoring Java Programs for Switch Expression. In Proc. of the 2021 IEEE International Symposium on Software Reliability Engineering Workshops, 2021, pp. 399-400. DOI: 10.1109/ISSREW53611.2021.00108.
16. Iannone E., Pecorelli F., Di Nucci D., Palomba F., De Lucia A. Refactoring Android-specific Energy Smells: A Plugin for Android Studio. In Proc. of the 2020 IEEE/ACM 28th International Conference on Program Comprehension, 2020, pp. 451-455. DOI: 10.1145/3387904.3389298.
17. Корзников А. О., Дацун Н. Н. Методы и средства расчета и применения метрик кода программных продуктов: систематическое картографирование литературы. Известия СПбГЭТУ «ЛЭТИ», том 17, вып. 8, 2024 г., стр. 48-64. DOI: 10.32603/2071-8985-2024-17-8-48-64. / Korznikov A. O., Datsun N. N. Methods for Calculation and Application of Software Code Metrics: A Systematic Mapping Study. LETI Transactions on Electrical Engineering & Computer Science, 2024, vol. 17, issue 8, pp. 48-64 (in Russian). DOI: 10.32603/2071-8985-2024-17-8-25-64.
18. Colakoglu F. N., Yazici A., Mishra A. Software Product Quality Metrics: A Systematic Mapping Study. IEEE Access, vol. 9, 2021, pp. 44647-44670. DOI: 10.1109/ACCESS.2021.3054730.
19. Mshelia Y. U., Apeh S. T., Edoghogho O. A comparative assessment of software metrics tools. In Proc. of the 2017 International Conference on Computing Networking and Informatics, 2017. P. 1-9. DOI: 10.1109/ICCNI.2017.8123809.
20. Agnihotri M., Chug, A. A Systematic Literature Survey of Software Metrics, Code Smells and Refactoring Techniques. Journal of Information Processing Systems, 16(4), 2020, pp. 915-934. DOI: 10.3745/JIPS.04.0184.
21. Fernandes S., Aguiar A., Restivo A. LiveRef: a Tool for Live Refactoring Java Code. In Proc. of the 37th IEEE/ACM International Conference on Automated Software Engineering, 2022, article no. 161, pp. 1-4. DOI: 10.1145/3551349.3559532.
22. Mooij A. J., Ketema J., Klusener S., Schuts M. Reducing Code Complexity through Code Refactoring and Model-Based Rejuvenation. In Proc. of the 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering, 2020, pp. 617-621. DOI: 10.1109/SANER48275.2020.9054823.
23. Luciv D. V., Koznov D. V., Shelikhovskii A. A., Romanovsky K. Yu., Chernishev G. A., Terekhov A. N., Grigoriev D. A., Smirnova A. N., Borovkov D. V., Vasenina A. I. Interactive Near Duplicate Search in Software Documentation. Programming and Computer Software, 2019, vol. 45, pp. 346-355. DOI: 10.1134/S0361768819060045.
24. Dallal J. Al, Abdulsalam H., AlMarzouq M., Selamat A. Machine Learning-Based Exploration of the Impact of Move Method Refactoring on Object-Oriented Software Quality Attributes. Arabian Journal for Science and Engineering, 2024, vol. 49, pp. 3867-3885. DOI: 10.1007/s13369-023-08174-0.
25. Корзников А. О., Дацун Н. Н. Разработка приложения для получения метрик программного продукта на языке объектно-ориентированного программирования. Вестник Пермского университета. Математика. Механика. Информатика, вып. 3 (62), 2023 г., стр. 76-84. DOI: 10.17072/1993-0550-2023-3-76-84. / Korznikov A.O., Datsun N.N. Program Realization for Code Metrics Calculation in Object-Oriented Programming Language. Bulletin of Perm University. Mathematics. Mechanics. Computer Science, 2023, issue 3(62), pp. 76-84. (in Russian). DOI: 10.17072/1993-0550-2023-3-76-84.
Review
For citations:
KORZNIKOV A.O., DATSUN N.N. Designing Refactoring Tool for Object-Oriented Code Based on Metrics. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2025;37(5):143-156. https://doi.org/10.15514/ISPRAS-2025-37(5)-11






