skip to main content
research-article

Refactoring references for library migration

Published:17 October 2010Publication History
Skip Abstract Section

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.

References

  1. }}J. Andersen and J. L. Lawall. Generic patch inference. Automat. Softw. Eng., 17(2):119--148, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}J. R. Cordy. The TXL source transformation language. Science of Computer Programming, 61(3):190--210, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}B. Dagenais and M. P. Robillard. Recommending adaptive changes for framework evolution. In Proc. Int. Conf. Softw. Eng., pages 481--490, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}J. Gosling, B. Joy, G. Steele, and G. Bracha. Java Language Specification, chapter 13: Binary Compatibility. Addison-Wesley, 3rd edition, 2005.Google ScholarGoogle Scholar
  15. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}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 ScholarGoogle Scholar
  17. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}E. Murphy-Hill. A model of refactoring tool use. In Proc. Wkshp. Refactoring Tools, 2009.Google ScholarGoogle Scholar
  19. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}M. Nita and D. Notkin. Using twinning to adapt programs to alternative APIs. In Proc. Int. Conf. Softw. Eng., 2010. In press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}S. Wu and U. Manber. Agrep - A fast approximate patternmatching tool. In Proc. USENIX Winter Technical Conf., pages 153--162, 1992.Google ScholarGoogle Scholar
  27. }}Z. Xing and E. Stroulia. API-evolution support with Diff-CatchUp. IEEE Trans. Softw. Eng., 33(12):818--836, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Refactoring references for library migration

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!