Skip to main content

Automated Detection of Refactorings in Evolving Components

  • Conference paper
ECOOP 2006 – Object-Oriented Programming (ECOOP 2006)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 4067))

Included in the following conference series:

Abstract

One of the costs of reusing software components is updating applications to use the new version of the components. Updating an application can be error-prone, tedious, and disruptive of the development process. Our previous study showed that more than 80% of the disruptive changes in five different components were caused by refactorings. If the refactorings that happened between two versions of a component could be automatically detected, a refactoring tool could replay them on applications. We present an algorithm that detects refactorings performed during component evolution. Our algorithm uses a combination of a fast syntactic analysis to detect refactoring candidates and a more expensive semantic analysis to refine the results. The experiments on components ranging from 17 KLOC to 352 KLOC show that our algorithm detects refactorings in real-world components with accuracy over 85%.

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 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Antoniol, G., Di Penta, M., Merlo, E.: An automatic approach to identify class evolution discontinuities. In: IWPSE 2004: Proceedings of International Workshop on Principles of Software Evolution, pp. 31–40 (2004)

    Google Scholar 

  2. What’s new in Borland Jbuilder (2005), http://www.borland.com/resources/en/pdf/white_papers/jb2005_whats_new.pdf

  3. Broder, A.: On the resemblance and containment of documents. In: SEQUENCES 1997: Proceedings of Compression and Complexity of Sequences, pp. 21–29 (1997)

    Google Scholar 

  4. Balaban, I., Tip, F., Fuhrer, R.: Refactoring support for class library migration. In: OOPSLA 2005: Proceedings of Object-oriented programming, systems, languages, and applications, pp. 265–279. ACM Press, New York (2005)

    Google Scholar 

  5. Demeyer, S., Ducasse, S., Nierstrasz, O.: Finding refactorings via change metrics. In: OOPSLA 2000: Proceedings of Object oriented programming, systems, languages, and applications, pp. 166–177 (2000)

    Google Scholar 

  6. Dig, D., Johnson, R.: The role of refactorings in api evolution. In: ICSM 2005: Proceedings of International Conference on Software Maintenance, Washington, DC, USA, pp. 389–398. IEEE Computer Society Press, Los Alamitos (2005)

    Google Scholar 

  7. Donovan, A., Kiezun, A., Tschantz, M.S., Ernst, M.D.: Converting Java programs to use generic libraries. In: OOPSLA 2004: Proceedings of Object-oriented programming, systems, languages, and applications, pp. 15–34. ACM Press, New York (2004)

    Google Scholar 

  8. Eclipse Foundation, http://eclipse.org

  9. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Adison-Wesley, London (1999)

    Google Scholar 

  10. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)

    Google Scholar 

  11. Gorg, C., Weisgerber, P.: Detecting and visualizing refactorings from software archives. In: IWPC 2005: Proceedings of the 13th International Workshop on Program Comprehension, Washington, DC, USA, pp. 205–214. IEEE Computer Society Press, Los Alamitos (2005)

    Chapter  Google Scholar 

  12. Godfrey, M.W., Zou, L.: Using origin analysis to detect merging and splitting of source code entities. IEEE Transactions on Software Engineering 31(2), 166–181 (2005)

    Article  Google Scholar 

  13. Henkel, J., Diwan, A.: CatchUp!: Capturing and replaying refactorings to support API evolution. In: ICSE 2005: Proceedings of International Conference on Software Engineering, pp. 274–283 (2005)

    Google Scholar 

  14. Kulkarni, P., Douglis, F., LaVoie, J.D., Tracey, J.M.: Redundancy elimination within large collections of files. In: USENIX Annual Technical Conference, General Track, pp. 59–72 (2004)

    Google Scholar 

  15. Li, Z., Lu, S., Myagmar, S., Zhou, Y.: CP-Miner: A tool for finding copy-paste and related bugs in operating system code. In: OSDI 2004: Proceedings of the Sixth Symposium on Operating System Design and Implementation, pp. 289–302 (2004)

    Google Scholar 

  16. Manber, U.: Finding similar files in a large file system. Technical Report 93-33, University of Arizona (1993)

    Google Scholar 

  17. Opdyke, B., Johnson, R.: Refactoring: An aid in designing application frameworks and evolving object-oriented systems. In: SOOPPA 1990: Proceedings of Symposium on Object-Oriented Programming Emphasizing Practical Applications (1990)

    Google Scholar 

  18. Opdyke, B.: Refactoring Object-Oriented Frameworks. PhD thesis, University of Illinois at Urbana-Champaign (1992)

    Google Scholar 

  19. Rabin, M.O.: Fingerprinting by random polynomials. Technical Report 15-81, Harvard University (1981)

    Google Scholar 

  20. Roberts, D., Brant, J., Johnson, R.E.: A refactoring tool for Smalltalk. TAPOS 3(4), 253–263 (1997)

    Google Scholar 

  21. Van Rysselberghe, F., Demeyer, S.: Reconstruction of successful software evolution using clone detection. In: IWPSE 2003: Proceedings of 6th International Workshop on Principles of Software Evolution, pp. 126–130 (2003)

    Google Scholar 

  22. RefactoringCrawler’s web page: https://netfiles.uiuc.edu/dig/RefactoringCrawler

  23. Ramaswamy, L., Iyengar, A., Liu, L., Douglis, F.: Automatic detection of fragments in dynamically generated web pages. In: WWW 2004: Proceedings of the 13th international conference on World Wide Web, pp. 443–454. ACM Press, New York (2004)

    Chapter  Google Scholar 

  24. Roberts, D.: Practical Analysis for Refactoring. PhD thesis, University of Illinois at Urbana-Champaign (1999)

    Google Scholar 

  25. Tokuda, L., Batory, D.: Evolving object-oriented designs with refactorings. Automated Software Engineering 8(1), 89–120 (2001)

    Article  MATH  Google Scholar 

  26. Thomas, D.: Refactoring as meta programming? Journal of Object Technology 4(1), 7–11 (2005)

    Article  Google Scholar 

  27. Tip, F., Kiezun, A., Bauemer, D.: Refactoring for generalization using type constraints. In: OOPSLA 2003: Proceedings of Object-oriented programing, systems, languages, and applications, pp. 13–26. ACM Press, New York (2003)

    Google Scholar 

  28. von Dincklage, D., Diwan, A.: Converting Java classes to use generics. In: OOPSLA 2004: Proceedings of Object-oriented programming, systems, languages, and applications, pp. 1–14. ACM Press, New York (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Dig, D., Comertoglu, C., Marinov, D., Johnson, R. (2006). Automated Detection of Refactorings in Evolving Components. In: Thomas, D. (eds) ECOOP 2006 – Object-Oriented Programming. ECOOP 2006. Lecture Notes in Computer Science, vol 4067. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11785477_24

Download citation

  • DOI: https://doi.org/10.1007/11785477_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-35726-1

  • Online ISBN: 978-3-540-35727-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics