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%.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
What’s new in Borland Jbuilder (2005), http://www.borland.com/resources/en/pdf/white_papers/jb2005_whats_new.pdf
Broder, A.: On the resemblance and containment of documents. In: SEQUENCES 1997: Proceedings of Compression and Complexity of Sequences, pp. 21–29 (1997)
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)
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)
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)
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)
Eclipse Foundation, http://eclipse.org
Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Adison-Wesley, London (1999)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)
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)
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)
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)
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)
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)
Manber, U.: Finding similar files in a large file system. Technical Report 93-33, University of Arizona (1993)
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)
Opdyke, B.: Refactoring Object-Oriented Frameworks. PhD thesis, University of Illinois at Urbana-Champaign (1992)
Rabin, M.O.: Fingerprinting by random polynomials. Technical Report 15-81, Harvard University (1981)
Roberts, D., Brant, J., Johnson, R.E.: A refactoring tool for Smalltalk. TAPOS 3(4), 253–263 (1997)
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)
RefactoringCrawler’s web page: https://netfiles.uiuc.edu/dig/RefactoringCrawler
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)
Roberts, D.: Practical Analysis for Refactoring. PhD thesis, University of Illinois at Urbana-Champaign (1999)
Tokuda, L., Batory, D.: Evolving object-oriented designs with refactorings. Automated Software Engineering 8(1), 89–120 (2001)
Thomas, D.: Refactoring as meta programming? Journal of Object Technology 4(1), 7–11 (2005)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)