Abstract
While many OO class features have been explored in detail, little work in the past has explored the characteristics of test classes. In this exploratory paper, we investigate traits of these classes which we believe demonstrate distinct differences between test classes and production classes. We explore differences between the number of clones, the number of comments and the maintainability of each class type. We believe that developers unjustifiably treat test classes as “second-class citizens” and we would therefore expect test classes to contain a) far more clones, b) a far lower (i.e., poorer) comment density and, c) worse maintainability levels. Six open-source systems were used as a basis of the work. Results showed that all three suppositions were indeed supported; this suggests the need to explore test classes in more detail and to remedy this clear problem that contributes to the level of technical debt.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
References
Basili, V., Briand, L., Melo, W.: A validation of OO design metrics as quality indicators. IEEE Trans. Soft. Eng. 22(10), 751–761 (1996)
Cartwright, M., Shepperd, M.: An empirical investigation of an object-oriented software system. IEEE Trans. Softw. Eng. 26(8), 786–796 (2000)
Field, A.: Discovering Statistics Using IBM SPSS Statistics, 4th edn. Sage Publications Ltd., Thousand Oaks (2013)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)
Hegedus, P., Bakota, T., Ladányi, G., Faragó, C., Ferenc, R.: A drill-down approach for measuring maintainability at source code element level. Commun. EASST 60 (2013)
Kadar, I., Hegedus, P., Ferenc, R., Gyimothy, T.: A manually validated code refactoring dataset and its assessment regarding software maintainability. In: PROMISE 2016, Ciudad Real, pp. 10:1–10:4. ACM (2016)
McCabe, T.J.: A complexity measure. IEEE Trans. Softw. Eng. 2(4), 308–320 (1976)
Oman, P., Hagemeister, J.: Metrics for assessing a software system’s maintainability. In: Proceedings of the Conference on Software Maintenance, pp. 337–344 (1992)
Roy, C., Cordy, J.: Benchmarks for software clone detection: a ten-year retrospective. In: Software Analysis, Evolution and Reengineering, SANER, Campobasso, Italy, pp. 26–37. IEEE Computer Society (2018)
Roy, C., Cordy, J., Koschke, R.: Comparison and evaluation of code clone detection techniques and tools: a qualitative approach. Sci. Comput. Program. 74(7), 470–495 (2009)
Stevens, W.P., Myers, G.J., Constantine, L.L.: Structured design. IBM Syst. J. 13(2), 115–139 (1974)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Counsell, S., Swift, S., Arzoky, M., Destefnas, G. (2020). On Clones and Comments in Production and Test Classes: An Empirical Study. In: Morisio, M., Torchiano, M., Jedlitschka, A. (eds) Product-Focused Software Process Improvement. PROFES 2020. Lecture Notes in Computer Science(), vol 12562. Springer, Cham. https://doi.org/10.1007/978-3-030-64148-1_19
Download citation
DOI: https://doi.org/10.1007/978-3-030-64148-1_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-64147-4
Online ISBN: 978-3-030-64148-1
eBook Packages: Computer ScienceComputer Science (R0)