Abstract
Automated refactoring is a key feature of modern IDEs. Existing refactorings rely on the transformation of source code declarations, in which references may also be transformed as a side effect. However, there exist situations in which a declaration is not available for refactoring or would be inappropriate to transform, for example, in the presence of dangling references or where a set of references should be retargeted to a different declaration.
We investigate the problem of dangling references through a detailed study of three open source libraries. We find that the introduction of dangling references during library migration is a significant real problem, and characterize the specific issues that arise. Based on these findings we provide and test a prototype tool, called Trident, that allows programmers to refactor references. Our results suggest that supporting the direct refactoring of references is a significant improvement over the state-of-the-art.
- }}J. Andersen and J. L. Lawall. Generic patch inference. Automat. Softw. Eng., 17(2):119--148, 2010. Google Scholar
Digital Library
- }}I. Balaban, F. Tip, and R. Fuhrer. Refactoring support for class library migration. In Proc. ACM SIGPLAN Conf. Obj.-Oriented Progr. Syst. Lang. Appl., pages 265--279, 2005. Google Scholar
Digital Library
- }}M. Boshernitsan and S. L. Graham. iXj: Interactive source-to-source transformations for Java. In Companion ACM SIGPLAN Conf. Obj.-Oriented Progr. Syst. Lang. Appl., pages 212--213, 2004. Google Scholar
Digital Library
- }}M. Boshernitsan, S. L. Graham, and M. A. Hearst. Aligning development tools with the way programmers think about code changes. In Proc. ACM SIGCHI Conf. Human Factors Comput. Syst., pages 567--576, 2007. Google Scholar
Digital Library
- }}R. I. Bull, A. Trevors, A. J. Malton, and M. W. Godfrey. Semantic grep: Regular expressions + relational abstraction. In Proc. Working Conf. Reverse Eng., pages 267--276, 2002. Google Scholar
Digital Library
- }}K. Chow and D. Notkin. Semi-automatic update of applications in response to library changes. In Proc. IEEE Int. Conf. Softw. Maintenance, pages 359--368, 1994. Google Scholar
Digital Library
- }}J. R. Cordy. The TXL source transformation language. Science of Computer Programming, 61(3):190--210, 2006. Google Scholar
Digital Library
- }}B. Dagenais and L. Hendren. Enabling static analysis for partial Java programs. In Proc. ACM SIGPLAN Conf. Obj.-Oriented Progr. Syst. Lang. Appl., pages 313--328, 2008. Google Scholar
Digital Library
- }}B. Dagenais and M. P. Robillard. Recommending adaptive changes for framework evolution. In Proc. Int. Conf. Softw. Eng., pages 481--490, 2008. Google Scholar
Digital Library
- }}D. Dig and R. E. Johnson. How do APIs evolve? A story of refactoring. J. Softw. Maint. Res. Pract., 18(2):83--107, 2006. Google Scholar
Digital Library
- }}D. Dig, C. Comertoglu, D. Marinov, and R. E. Johnson. Automated detection of refactorings in evolving components. In Proc. Europ. Conf. Obj.-Oriented Progr., volume 4067 of Lecture Notes in Computer Science, pages 404--428, 2006. Google Scholar
Digital Library
- }}D. Dig, S. Negara, V. Mohindra, and R. Johnson. ReBA: Refactoring-aware binary adaptation of evolving libraries. In Proc. Int. Conf. Softw. Eng., pages 441--450, 2008. Google Scholar
Digital Library
- }}M. S. Feather. Reuse in the context of a transformation-based methodology. In T. J. Biggerstaff and A. J. Perlis, editors, Software Reusability, volume 1: Concepts and Models, chapter 14, pages 337--359. Addison-Wesley, 1989. Google Scholar
Digital Library
- }}J. Gosling, B. Joy, G. Steele, and G. Bracha. Java Language Specification, chapter 13: Binary Compatibility. Addison-Wesley, 3rd edition, 2005.Google Scholar
- }}J. Henkel and A. Diwan. CatchUp!: Capturing and replaying refactorings to support API evolution. In Proc. Int. Conf. Softw. Eng., pages 274--283, 2005. Google Scholar
Digital Library
- }}P. Kapur, B. Cossette, and R. J. Walker. Refactoring references for library migration-Appendix. Technical Report 2010--960-09, Department of Computer Science, University of Calgary, 2010.Google Scholar
- }}M. Kim, D. Notkin, and D. Grossman. Automatic inference of structural changes for matching across program versions. In Proc. Int. Conf. Softw. Eng., pages 333--343, 2007. Google Scholar
Digital Library
- }}E. Murphy-Hill. A model of refactoring tool use. In Proc. Wkshp. Refactoring Tools, 2009.Google Scholar
- }}E. Murphy-Hill and A. P. Black. Breaking the barriers to successful refactoring: Observations and tools for Extract Method. In Proc. Int. Conf. Softw. Eng., pages 421--430, 2008. Google Scholar
Digital Library
- }}M. Nita and D. Notkin. Using twinning to adapt programs to alternative APIs. In Proc. Int. Conf. Softw. Eng., 2010. In press. Google Scholar
Digital Library
- }}I. S¸ avga and M. Rudolf. Refactoring-based support for binary compatibility in evolving frameworks. In Proc. Int. Conf. Generative Progr. Component Eng., pages 175--184, 2007. Google Scholar
Digital Library
- }}I. Savga, M. Rudolf, S. Goetz, and U. Aßmann. Practical refactoring-based framework upgrade. In Proc. Int. Conf. Generative Progr. Component Eng., pages 171--180, 2008. Google Scholar
Digital Library
- }}W. Tansey and E. Tilevich. Annotation refactoring: Inferring upgrade transformations for legacy applications. In Proc. ACM SIGPLAN Conf. Obj.-Oriented Progr. Syst. Lang. Appl., pages 295--312, 2008. Google Scholar
Digital Library
- }}F. Tip, A. Kiezun, and D. Baumer. Refactoring for generalization using type constraints. In Proc. ACM SIGPLAN Conf. Obj.-Oriented Progr. Syst. Lang. Appl., pages 13--26, 2003. Google Scholar
Digital Library
- }}P. Weissgerber and S. Diehl. Identifying refactorings from source-code changes. In Proc. IEEE/ACM Int. Conf. Automat. Softw. Eng., pages 231--240, 2006. Google Scholar
Digital Library
- }}S. Wu and U. Manber. Agrep - A fast approximate patternmatching tool. In Proc. USENIX Winter Technical Conf., pages 153--162, 1992.Google Scholar
- }}Z. Xing and E. Stroulia. API-evolution support with Diff-CatchUp. IEEE Trans. Softw. Eng., 33(12):818--836, 2007. Google Scholar
Digital Library
Index Terms
Refactoring references for library migration
Recommendations
Refactoring references for library migration
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsAutomated refactoring is a key feature of modern IDEs. Existing refactorings rely on the transformation of source code declarations, in which references may also be transformed as a side effect. However, there exist situations in which a declaration is ...
Search-Based Third-Party Library Migration at the Method-Level
Applications of Evolutionary ComputationAbstractIn software development, third-party libraries are commonly used to reduce implementation efforts and errors, while delivering high-quality, reliable and secure software. To support software evolution, newer libraries are continuously released to ...
Refactoring the Aspectizable Interfaces: An Empirical Assessment
Aspect Oriented Programming aims at addressing the problem of the crosscutting concerns, i.e., those functionalities that are scattered among several modules in a given system. Aspects can be defined to modularize such concerns. In this work, we focus ...







Comments