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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
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)
Boehm, B.W.: Software Engineering Economics. Prentice Hall (1981)
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)
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)
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)
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)
Hassan, A.E.: Predicting faults using the complexity of code changes. In: 31st International Conference on Software Engineering. pp. 78–88. IEEE (2009)
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)
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)
Jacobson, I., Christerson, M., Jonsson, P., Övergaard, G.: Object-oriented Software Engineering - A Use Case Driven Approach. Addison-Wesley (1992)
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)
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)
Lehman, M.M.: On understanding laws, evolution, and conservation in the large-program life cycle. Journal of Systems and Software 1, 213–221 (1980)
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)
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)
Shannon, C.E.: A mathematical theory of communication. Bell System Technical Journal 27(3), 379–423 (1948)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)