Assessment of the Code Refactoring Dataset Regarding the Maintainability of Methods

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9789)


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.


Code 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. 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
  2. 2.
    Bavota, G., De Lucia, A., Di Penta, M., Oliveto, R., Palomba, F.: An experimental investigation on the innate relationship between quality and refactoring. J. Syst. Softw. 107, 1–14 (2015)CrossRefGoogle Scholar
  3. 3.
    Choi, E., Yoshida, N., Inoue, K.: An investigation into the characteristics of merged code clones during software evolution. IEICE Trans. Inf. Syst. 97(5), 1244–1253 (2014)CrossRefGoogle Scholar
  4. 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. 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).
  6. 6.
    Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)zbMATHGoogle Scholar
  7. 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. 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). Google Scholar
  9. 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. 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. 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. 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
  13. 13.
    McCabe, T.J.: A complexity measure. IEEE Trans. Softw. Eng. 2, 308–320 (1976)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    McKnight, P.E., Najab, J.: Mann-Whitney U Test. Corsini Encyclopedia of Psychology. Wiley, New York (2010)Google Scholar
  15. 15.
    Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004)CrossRefGoogle Scholar
  16. 16.
    Menzies, T., Krishna, R., Pryor, D.: The Promise Repository of Empirical Software Engineering Data (2015).
  17. 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
  18. 18.
    Murphy-Hill, E., Parnin, C., Black, A.P.: How we refactor, and how we know it. IEEE Trans. Softw. Eng. 38(1), 5–18 (2012)CrossRefGoogle Scholar
  19. 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. 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. 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. 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. 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

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.University of SzegedSzegedHungary

Personalised recommendations