Assessment of the Code Refactoring Dataset Regarding the Maintainability of Methods
- 1.4k Downloads
Code refactoring has a solid theoretical background while being used in development practice at the same time. However, previous works found controversial results on the nature of code refactoring activities in practice. Both their application context and impact on code quality needs further examination.
Our paper encourages the investigation of code refactorings in practice by providing an excessive open dataset of source code metrics and applied refactorings through several releases of 7 open-source systems. We already demonstrated the practical value of the dataset by analyzing the quality attributes of the refactored source code classes and the values of source code metrics improved by those refactorings.
In this paper, we have gone one step deeper and explored the effect of code refactorings at the level of methods. We found that similarly to class level, lower maintainability indeed triggers more code refactorings in practice at the level of methods and these refactorings significantly decrease size, coupling and clone metrics.
KeywordsCode refactoring Software maintainability Empirical study Refactoring dataset
This work was partially supported by the European Union project “REPARA – Reengineering and Enabling Performance And poweR of Applications”, project number: 609666.
- 1.Bakota, T., Hegedűs, P., Körtvélyesi, P., Ferenc, R., Gyimóthy, T.: A probabilistic software quality model. In: Proceedings of the 27th IEEE International Conference on Software Maintenance (ICSM), pp. 243–252, September 2011Google Scholar
- 4.van Emden, E., Moonen, L.: Java quality assurance by detecting code smells. In: Proceedings of the 9th Working Conference on Reverse Engineering, pp. 97–106 (2002)Google Scholar
- 5.Fontana, F.A., Spinelli, S.: Impact of refactoring on quality code evaluation. In: Proceedings of the 4th Workshop on Refactoring Tools, WRT 2011, pp. 37–40. ACM, New York (2011). http://doi.acm.org/10.1145/1984732.1984741
- 7.Ge, X., Sarkar, S., Murphy-Hill, E.: Towards refactoring-aware code review. In: Proceedings of the 7th International Workshop on Cooperative and Human Aspects of Software Engineering, CHASE 2014, pp. 99–102. ACM, New York (2014)Google Scholar
- 8.Hegedűs, P., Bakota, T., Ladányi, G., Faragó, C., Ferenc, R.: A drill-down approach for measuring maintainability at source code element level. Electron. Commun. EASST 60, 20–29 (2013). http://journal.ub.tu-berlin.de/eceasst/article/download/852/846 Google Scholar
- 9.Hoque, M.I., Ranga, V.N., Pedditi, A.R., Srinath, R., Rana, M.A.A., Islam, M.E., Somani, A.: An empirical study on refactoring activity. ACM Computing Research Repository abs/1412.6359 (2014)Google Scholar
- 10.Kataoka, Y., Imai, T., Andou, H., Fukaya, T.: A quantitative evaluation of maintainability enhancement by refactoring. In: Proceedings of the International Conference on Software Maintenance, pp. 576–585 (2002)Google Scholar
- 11.Kádár, I., Hegedűs, P., Ferenc, R., Gyimóthy, T.: A code refactoring dataset and its assessment regarding software maintainability. In: Proceedings of the 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering. IEEE Computer Society (2016, to appear)Google Scholar
- 12.Kim, M., Gee, M., Loh, A., Rachatasumrit, N.: Ref-Finder: a refactoring reconstruction tool based on logic query templates. In: Proceedings of the 18th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2010), pp. 371–372 (2010)Google Scholar
- 14.McKnight, P.E., Najab, J.: Mann-Whitney U Test. Corsini Encyclopedia of Psychology. Wiley, New York (2010)Google Scholar
- 16.Menzies, T., Krishna, R., Pryor, D.: The Promise Repository of Empirical Software Engineering Data (2015). http://openscience.us/repo
- 17.Murgia, A., Tonelli, R., Marchesi, M., Concas, G., Counsell, S., McFall, J., Swift, S.: Refactoring and its relationship with fan-in and fan-out: an empirical study. In: Proceedings of the 16th European Conference on Software Maintenance and Reengineering (CSMR), pp. 63–72, March 2012Google Scholar
- 19.Oman, P., Hagemeister, J.: Metrics for assessing a software system’s maintainability. In: Proceedings of the International Conference on Software Maintenance, pp. 337–344. IEEE Computer Society Press (1992)Google Scholar
- 20.Parsai, A., Murgia, A., Soetens, Q.D., Demeyer, S.: Mutation testing as a safety net for test code refactoring. CoRR abs/1506.07330 (2015)Google Scholar
- 21.Peters, R., Zaidman, A.: Evaluating the lifespan of code smells using software repository mining. In: Proceedings of the 16th European Conference on Software Maintenance and Reengineering (CSMR), pp. 411–416, March 2012Google Scholar
- 22.Prete, K., Rachatasumrit, N., Sudan, N., Kim, M.: Template-based reconstruction of complex refactorings. In: IEEE International Conference on Software Maintenance (ICSM), pp. 1–10, September 2010Google Scholar
- 23.Wang, W., Godfrey, M.W.: Recommending clones for refactoring using design, context, and history. In: 2014 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 331–340. IEEE (2014)Google Scholar