Skip to main content

Is Complexity of Re-test a Reason Why Some Refactorings Are Buggy? an Empirical Perspective

  • Conference paper
  • First Online:
Quality of Information and Communications Technology (QUATIC 2020)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1266))

  • 1132 Accesses

Abstract

In this short paper, we explore one simple, yet unexplored question about the relationship between refactoring and bugs. Is the complexity of re-testing code immediately after refactoring a reason why some refactorings are buggy? To facilitate our analysis, we use a set of over four thousand refactorings mined from three open-source systems and decomposed into the four test categories of van Deursen and Moonen. Preliminary results showed that, compared with non-buggy classes, buggy classes had been subjected to more refactorings where a large re-test commitment was required; extent of re-test may therefore be a significant factor in determining whether refactoring creates bugs. Our finding supports that of Bavota et al. - that more and better testing after certain refactoring practices could reduce the harm that refactorings cause.

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.

    http://ant.apache.org/, http://argouml.tigris.org/, http://xerces.apache.org/xerces-j/.

References

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

    Article  Google Scholar 

  2. Bavota, G., De Carluccio, B., De Lucia, A., Di Penta, M., Oliveto, R., Strollo, O.: When does a refactoring induce bugs? An empirical study. In: 12th IEEE Conference on Source Code Analysis and Manipulation, SCAM 2012, Italy, 2012, pp. 104–113 (2012)

    Google Scholar 

  3. Briand, L., Devanbu, P., Melo, W.: An investigation into coupling measures for C++. In: International Conference on Software Engineering, vol. 12 (1999)

    Google Scholar 

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

    Google Scholar 

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

    MATH  Google Scholar 

  6. Kim, M., Gee, M., Loh, A., Rachatasumrit, N.: Ref-finder: a refactoring reconstruction tool based on logic query templates, pp. 371–372 (January 2010)

    Google Scholar 

  7. Negara, S., Chen, N., Vakilian, M., Johnson, R.E., Dig, D.: A comparative study of manual and automated refactorings. In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920, pp. 552–576. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39038-8_23

    Chapter  Google Scholar 

  8. Opdyke, W.: Refactoring: a program restructuring aid in designing object-oriented application frameworks. Ph.D. thesis, Univ. of Illinois (1992)

    Google Scholar 

  9. van Deursen, A., Moonen, L.: The video store revisited - thoughts on refactoring and testing. In: Proceedings - XP 2002, Sardinia, Italy (2002)

    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., Destefanis, G. (2020). Is Complexity of Re-test a Reason Why Some Refactorings Are Buggy? an Empirical Perspective. In: Shepperd, M., Brito e Abreu, F., Rodrigues da Silva, A., Pérez-Castillo, R. (eds) Quality of Information and Communications Technology. QUATIC 2020. Communications in Computer and Information Science, vol 1266. Springer, Cham. https://doi.org/10.1007/978-3-030-58793-2_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-58793-2_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-58792-5

  • Online ISBN: 978-3-030-58793-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics