Skip to main content

A Hands-on OpenStack Code Refactoring Experience Report

  • Conference paper
  • First Online:

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

Abstract

Nowadays, almost everyone uses some kind of cloud infrastructure. As clouds gaining more and more attention, it is now even more important to have stable and reliable cloud systems. Along with stability and reliability comes source code maintainability. Unfortunately, maintainability has no exact definition, there are several definitions both from users’ and developers’ perspective. In this paper, we analyzed two projects of OpenStack, the world’s leading open-source cloud system, using QualityGate, a static software analyzer which can help to determine the maintainability of software. During the analysis we found quality issues that could be fixed by refactoring the code. We have created 47 patches in this two OpenStack projects. We have also analyzed our patches with QualityGate to see whether they increase the maintainability of the system. We found that a single refactoring has a barely noticeable effect on the maintainability of the software, what is more, it can even decrease maintainability. But if we do refactorings regularly, their cumulative effect will probably increase the quality in the mid and long-term. We also experienced that our refactoring commits were very appreciated by the open-source community.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.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

Learn about institutional subscriptions

Notes

  1. 1.

    https://www.sonarqube.org/.

  2. 2.

    Jenkins is an open-source continuous integration system. More details can be found at https://jenkins.io/.

  3. 3.

    https://github.com/openstack-infra/jenkins-job-builder.

  4. 4.

    https://github.com/openstack/tempest.

  5. 5.

    https://www.python.org/dev/peps/pep-0008/.

  6. 6.

    https://www.pylint.org/.

  7. 7.

    http://openqa.sed.hu.

  8. 8.

    http://www.inf.u-szeged.hu/~antal/pub/2018-iccsa-openstack-refactoring/.

  9. 9.

    https://github.com/openstack/watcher/commit/a2750c7.

  10. 10.

    https://github.com/openstack/watcher/commit/67455c6.

  11. 11.

    https://github.com/openstack/watcher/commit/f0b58f8.

  12. 12.

    https://review.openstack.org/349582/.

  13. 13.

    https://review.openstack.org/247560.

  14. 14.

    https://review.openstack.org/263343/.

References

  1. OpenStack Docs: Hacking: OpenStack Hacking Guideline Enforcement. https://docs.openstack.org/hacking/latest/user/hacking.html

  2. User talk: OpenStack Quality Improvement Plan. https://wiki.openstack.org/wiki/User_talk:P%C3%A9ter_Heged%C5%B1s

  3. How To Contribute - OpenStack (2018). https://wiki.openstack.org/wiki/How_To_Contribute. Accessed 09 Apr 2018

  4. OpenStack Docs: Modules List (2018). https://docs.openstack.org/puppet-openstack-guide/latest/contributor/module-list.html. Accessed 09 Apr 2018

  5. Advani, D., Hassoun, Y., Counsell, S.: Extracting refactoring trends from open-source software and a possible solution to the ‘related refactoring’ conundrum. In: Proceedings of the 2006 ACM Symposium on Applied Computing, SAC 2006, pp. 1713–1720. ACM, New York (2006). http://doi.acm.org/10.1145/1141277.1141685

  6. Bakota, T., Hegedűs, P., Siket, I., Ladányi, G., Ferenc, R.: Qualitygate sourceaudit: a tool for assessing the technical quality of software. In: Proceedings of the CSMR-WCRE Software Evolution Week, pp. 440–445. IEEE Computer Society (2014)

    Google Scholar 

  7. Bakota, T., Hegedűs, P., Körtvélyesi, P., Ferenc, R., Gyimóthy, T.: A probabilistic software quality model. In: Proceedings of the 27th International Conference on Software Maintenance (ICSM), pp. 243–252. IEEE Computer Society (2011)

    Google Scholar 

  8. Bakota, T., Hegedűs, P., Ladányi, G., Körtvélyesi, P., Ferenc, R., Gyimóthy, T.: A cost model based on software maintainability. In: Proceedings of the 28th International Conference on Software Maintenance (ICSM), pp. 316–325. IEEE Computer Society (2012)

    Google Scholar 

  9. Baset, S.A., Tang, C., Tak, B.C., Wang, L.: Dissecting open source cloud evolution: an OpenStack case study. In: HotCloud (2013)

    Google Scholar 

  10. Demeyer, S.: Refactor conditionals into polymorphism: what’s the performance cost of introducing virtual calls? In: Proceedings of the 21st IEEE International Conference on Software Maintenance, ICSM 2005, pp. 627–630. IEEE (2005)

    Google Scholar 

  11. Du Bois, B., Demeyer, S., Verelst, J.: Refactoring-improving coupling and cohesion of existing code. In: Proceedings of the 11th Working Conference on Reverse Engineering, pp. 144–151. IEEE (2004)

    Google Scholar 

  12. Du Bois, B., Mens, T.: Describing the impact of refactoring on internal program quality. In: Proceedings of the International Workshop on Evolution of Large-Scale Industrial Software Applications, pp. 37–48 (2003)

    Google Scholar 

  13. Erl, T., Puttini, R., Mahmood, Z.: Cloud Computing: Concepts Technology & Architecture, 1st edn. Prentice Hall Press, Upper Saddle River (2013)

    Google Scholar 

  14. Ubuntu Cloud: OpenStack Wins, Eucalyptus Loses. http://talkincloud.com/ubuntu-cloud-openstack-wins-eucalyptus-loses

  15. Fitfield, T.: Introduction to OpenStack. Linux J. 2013(235) (2013). http://dl.acm.org/citation.cfm?id=2555789.2555793

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

    MATH  Google Scholar 

  17. Hegedűs, P., Kádár, I., Ferenc, R., Gyimóthy, T.: Empiricalevaluation of software maintainability based on a manually validatedrefactoring dataset. Inf. Softw. Technol. (2017, accepted, to appear). https://doi.org/10.1016/j.infsof.2017.11.012. http://www.sciencedirect.com/science/article/pii/S0950584916303561

  18. ISO/IEC: ISO/IEC 9126. Software Engineering - Product quality 6.5. ISO/IEC (2001)

    Google Scholar 

  19. ISO/IEC: ISO/IEC 25000:2005. Software Engineering - Software product Quality Requirements and Evaluation (SQuaRE) - Guide to SQuaRE. ISO/IEC (2005)

    Google Scholar 

  20. Kemerer, C.F., Paulk, M.C.: The impact of design and code reviews on software quality: an empirical study based on PSP data. IEEE Trans. Software Eng. 35(4), 534–550 (2009)

    Article  Google Scholar 

  21. 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 

  22. Letouzey, J.L.: The SQALE method for evaluating technical debt. In: Third International Workshop on Managing Technical Debt (MTD), pp. 31–36. IEEE (2012). https://doi.org/10.1109/MTD.2012.6225997

  23. Martin, R.C.: Clean Code: A Handbook of Agile Software Craftsmanship. Pearson Education, New York (2009)

    Google Scholar 

  24. McIntosh, S., Kamei, Y., Adams, B., Hassan, A.E.: An empirical study of the impact of modern code review practices on software quality. Empir. Softw. Eng. 21(5), 2146–2189 (2016)

    Article  Google Scholar 

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

    Article  Google Scholar 

  26. Mirkalaei, M., Pooya, S.: API Failures in OpenStack Cloud Environments. Ph.D. thesis, École Polytechnique de Montréal (2017)

    Google Scholar 

  27. Musavi, P., Adams, B., Khomh, F.: Experience report: an empirical study of API failures in OpenStack cloud environments. In: 2016 IEEE 27th International Symposium on Software Reliability Engineering (ISSRE), pp. 424–434. IEEE (2016)

    Google Scholar 

  28. Opdyke, W.F.: Refactoring object-oriented frameworks. Ph.D. thesis, University of Illinois (1992)

    Google Scholar 

  29. The OpenStack Foundation. https://www.openstack.org/foundation

  30. OpenStack Releases. https://releases.openstack.org/

  31. OpenStack Release models. https://releases.openstack.org/reference/release_models.html

  32. Ubuntu Cloud Infrastructure. https://help.ubuntu.com/community/UbuntuCloudInfrastructure

  33. OpenStack. https://en.wikipedia.org/wiki/OpenStack

  34. Sahraoui, H.A., Godin, R., Miceli, T.: Can metrics help to bridge the gap between the improvement of OO design quality and its automation? In: Proceedings of International Conference on Software Maintenance, pp. 154–162. IEEE (2000)

    Google Scholar 

  35. Simon, F., Steinbruckner, F., Lewerentz, C.: Metrics based refactoring. In: Proceedings of the Fifth European Conference on Software Maintenance and Reengineering, pp. 30–38. IEEE (2001)

    Google Scholar 

  36. Slipetskyy, R.: Security issues in OpenStack. Master’s thesis, Institutt for telematikk (2011)

    Google Scholar 

  37. Stroulia, E., Kapoor, R.: Metrics of refactoring-based development: an experience report. In: Wang, X., Johnston, R., Patel, S. (eds.) OOIS 2001, pp. 113–122. Springer, Heidelberg (2001). https://doi.org/10.1007/978-1-4471-0719-4_13

    Chapter  Google Scholar 

  38. Szőke, G., Antal, G., Nagy, C., Ferenc, R., Gyimóthy, T.: Empirical study on refactoring large-scale industrial systems and its effects on maintainability. J. Syst. Softw. 129(C), 107–126 (2017). https://doi.org/10.1016/j.jss.2016.08.071. http://www.sciencedirect.com/science/article/pii/S0164121216301558?via%3Dihub

    Article  Google Scholar 

Download references

Acknowledgment

The project has been supported by the UNKP-17-4 New National Excellence Program of the Ministry of Human Capacities, Hungary.

The authors would also like to express their gratitude to Gergely Ladányi and Béla Vancsics for providing technical support in QualityGate analysis and OpenStack contribution as well as to Balázs Gibizer from Ericsson Hungary for his valuable guidance in the OpenStack development.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Péter Hegedűs .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Antal, G., Szarka, A., Hegedűs, P. (2018). A Hands-on OpenStack Code Refactoring Experience Report. In: Gervasi, O., et al. Computational Science and Its Applications – ICCSA 2018. ICCSA 2018. Lecture Notes in Computer Science(), vol 10964. Springer, Cham. https://doi.org/10.1007/978-3-319-95174-4_37

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-95174-4_37

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-95173-7

  • Online ISBN: 978-3-319-95174-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics