Skip to main content

Assessment of the Code Refactoring Dataset Regarding the Maintainability of Methods

  • Conference paper
  • First Online:
Computational Science and Its Applications -- ICCSA 2016 (ICCSA 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9789))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

     http://www.sourcemeter.com/.

  2. 2.

     http://www.quality-gate.com/.

References

  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 2011

    Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Article  Google 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

  6. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)

    MATH  Google Scholar 

  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 

  13. McCabe, T.J.: A complexity measure. IEEE Trans. Softw. Eng. 2, 308–320 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  14. McKnight, P.E., Najab, J.: Mann-Whitney U Test. Corsini Encyclopedia of Psychology. Wiley, New York (2010)

    Google Scholar 

  15. Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004)

    Article  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 2012

    Google Scholar 

  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)

    Article  Google 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 2012

    Google 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 2010

    Google 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 

Download references

Acknowledgment

This work was partially supported by the European Union project “REPARA – Reengineering and Enabling Performance And poweR of Applications”, project number: 609666.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Péter Hegedűs .

Editor information

Editors and Affiliations

Appendix

Appendix

Table 6. The type of refactorings extracted by RefFinder at class and method level

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Kádár, I., Hegedűs, P., Ferenc, R., Gyimóthy, T. (2016). Assessment of the Code Refactoring Dataset Regarding the Maintainability of Methods. In: Gervasi, O., et al. Computational Science and Its Applications -- ICCSA 2016. ICCSA 2016. Lecture Notes in Computer Science(), vol 9789. Springer, Cham. https://doi.org/10.1007/978-3-319-42089-9_43

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-42089-9_43

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-42088-2

  • Online ISBN: 978-3-319-42089-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics