An Investigation of Entropy and Refactoring in Software Evolution

  • Conference paper
  • First Online:
Product-Focused Software Process Improvement (PROFES 2022)

Abstract

As software evolves, the source code tends to become more complex and therefore harder to maintain, something that is exacerbated by poor development practice, where a disorderly development process is more likely to yield a disorderly and more complex result. Disorder in source code evolution may be quantified by using source code change entropy, a measure of the scattering pattern of code changes, i.e., how widely spread throughout the codebase are individual changes. Refactoring is an important activity for improving the structure of existing code and reducing its complexity, but it is unclear if refactoring can effectively counteract software entropy. Understanding how or if refactoring can reduce entropy could provide insights on software evolution and help reduce maintenance cost.

We empirically investigate how entropy at the system and file level evolves in software systems and how it is influenced by refactoring activities as well as non-refactoring changes. We identify refactorings in the version history of open-source projects through the analysis of source code and change metadata. We observe that system-level entropy fluctuates up and down, but remains relatively stable over time on average. We also observe that file-level entropy tends to decrease over time in response to both refactorings and non-refactoring changes, challenging the findings of previous studies. We observe factors which may lessen the utility of existing entropy metrics and suggest future avenues for exploring this intriguing but little-studied concept in software evolution.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Thailand)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 85.59
Price includes VAT (Thailand)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 99.99
Price excludes VAT (Thailand)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://github.com/Daniel-Keenan-QUB/entropy-project.

References

  1. Bianchi, A., Caivano, D., Lanubile, F., Visaggio, G.: Evaluating software degradation through entropy. In: 7th IEEE International Software Metrics Symposium. p. 210. IEEE Computer Society (2001)

    Google Scholar 

  2. Boehm, B.W.: Software Engineering Economics. Prentice Hall (1981)

    Google Scholar 

  3. Canfora, G., Cerulo, L., Cimitile, M., Penta, M.D.: How changes affect software entropy: An empirical study. Empirical Software Engineering 19(1), 1–38 (2014)

    Article  Google Scholar 

  4. Canfora, G., Cerulo, L., Penta, M.D., Pacilio, F.: An exploratory study of factors influencing change entropy. In: The 18th IEEE International Conference on Program Comprehension. pp. 134–143. IEEE Computer Society (2010)

    Google Scholar 

  5. D’Ambros, M., Lanza, M., Robbes, R.: Evaluating defect prediction approaches: A benchmark and an extensive comparison. Empirical Software Engineering 17(4–5), 531–577 (2012)

    Article  Google Scholar 

  6. França, J.M., Dos Santos, C.A.R., de Oliveira, K.S., Soares, M.S.: An empirical evaluation of refactoring crosscutting concerns into aspects using software metrics. In: 2013 10th International Conference on Information Technology: New Generations. pp. 674–679. IEEE (2013)

    Google Scholar 

  7. Hassan, A.E.: Predicting faults using the complexity of code changes. In: 31st International Conference on Software Engineering. pp. 78–88. IEEE (2009)

    Google Scholar 

  8. Hassan, A.E., Holt, R.C.: The chaos of software development. In: 6th International Workshop on Principles of Software Evolution. pp. 84–94. IEEE Computer Society (2003)

    Google Scholar 

  9. Hassan, A.E., Holt, R.C.: Studying the chaos of code development. In: 10th Working Conference on Reverse Engineering. pp. 123–133. IEEE Computer Society (2003)

    Google Scholar 

  10. Jacobson, I., Christerson, M., Jonsson, P., Övergaard, G.: Object-oriented Software Engineering - A Use Case Driven Approach. Addison-Wesley (1992)

    Google Scholar 

  11. Kaur, A., Chopra, D.: Reasons for non-applicability of software entropy metrics for bug prediction in android. International Journal of Computer and Systems Engineering 10(6), 1170–1175 (2016)

    Google Scholar 

  12. Kaur, A., Kaur, K., Chopra, D.: An empirical study of software entropy based bug prediction using machine learning. International Journal of System Assurance Engineering and Management. 8(2s), 599–616 (2017)

    Google Scholar 

  13. Lehman, M.M.: On understanding laws, evolution, and conservation in the large-program life cycle. Journal of Systems and Software 1, 213–221 (1980)

    Article  Google Scholar 

  14. Murphy-Hill, E.R., Parnin, C., Black, A.P.: How we refactor, and how we know it. IEEE Transactions on Software Engineering 38(1), 5–18 (2012)

    Article  Google Scholar 

  15. Sehgal, R., Nagpal, R., Mehrotra, D., et al.: Measuring code smells and anti-patterns. In: 2019 4th international conference on information systems and computer networks (ISCON). pp. 311–314. IEEE (2019)

    Google Scholar 

  16. Shannon, C.E.: A mathematical theory of communication. Bell System Technical Journal 27(3), 379–423 (1948)

    Article  MathSciNet  MATH  Google Scholar 

  17. Tsantalis, N., Mansouri, M., Eshkevari, L.M., Mazinanian, D., Dig, D.: Accurate and efficient refactoring detection in commit history. In: Proceedings of the 40th International Conference on Software Engineering. pp. 483–494. ACM (2018)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Des Greer .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Keenan, D., Greer, D., Cutting, D. (2022). An Investigation of Entropy and Refactoring in Software Evolution. In: Taibi, D., Kuhrmann, M., Mikkonen, T., Klünder, J., Abrahamsson, P. (eds) Product-Focused Software Process Improvement. PROFES 2022. Lecture Notes in Computer Science, vol 13709. Springer, Cham. https://doi.org/10.1007/978-3-031-21388-5_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-21388-5_20

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-21387-8

  • Online ISBN: 978-3-031-21388-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation