Skip to main content

On Clones and Comments in Production and Test Classes: An Empirical Study

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

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12562))

  • 3457 Accesses

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.

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.

    www.sourcemeter.com.

References

  1. Basili, V., Briand, L., Melo, W.: A validation of OO design metrics as quality indicators. IEEE Trans. Soft. Eng. 22(10), 751–761 (1996)

    Article  Google Scholar 

  2. Cartwright, M., Shepperd, M.: An empirical investigation of an object-oriented software system. IEEE Trans. Softw. Eng. 26(8), 786–796 (2000)

    Article  Google Scholar 

  3. Field, A.: Discovering Statistics Using IBM SPSS Statistics, 4th edn. Sage Publications Ltd., Thousand Oaks (2013)

    Google Scholar 

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

    MATH  Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  8. Oman, P., Hagemeister, J.: Metrics for assessing a software system’s maintainability. In: Proceedings of the Conference on Software Maintenance, pp. 337–344 (1992)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Article  MathSciNet  Google Scholar 

  11. Stevens, W.P., Myers, G.J., Constantine, L.L.: Structured design. IBM Syst. J. 13(2), 115–139 (1974)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Steve Counsell .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics