Affiliation:
1. New York University, New York, NY
2. IBM T.J. Watson Research Center, Yorktown Heights, NY
Abstract
As object-oriented class libraries evolve, classes are occasionally deprecated in favor of others with roughly the same functionality. In Java's standard libraries, for example, class Hashtable has been superseded by HashMap, and Iterator is now preferred over Enumeration. Migrating client applications to use the new idioms is often desirable, but making the required changes to declarations and allocation sites can be quite labor-intensive. Moreover, migration becomes complicated---and sometimes impossible---if an application interacts with external components, if a legacy class is not completely equivalent to its replacement, or if multiple interdependent classes must be migrated simultaneously. We present an approach in which mappings between legacy classes and their replacements are specified by the programmer. Then, an analysis based on
type constraints
determines where declarations and allocation sites can be updated. The method was implemented in Eclipse, and evaluated on a number of Java applications. On average, our tool could migrate more than 90% of the references to legacy classes.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference31 articles.
1. Bracha G. Cohen N. Kemper C. Odersky M. Stoutamire D. Thorup K. and Wadler P. Adding generics to the Java programming language: Public draft specification version 2.0. Tech. rep. Java Community Process JSR-000014 June 23 2003.]] Bracha G. Cohen N. Kemper C. Odersky M. Stoutamire D. Thorup K. and Wadler P. Adding generics to the Java programming language: Public draft specification version 2.0. Tech. rep. Java Community Process JSR-000014 June 23 2003.]]
Cited by
53 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Characterizing Python Library Migrations;Proceedings of the ACM on Software Engineering;2024-07-12
2. A Lightweight Polyglot Code Transformation Language;Proceedings of the ACM on Programming Languages;2024-06-20
3. Adventure of a Lifetime: Extract Method Refactoring for Rust;Proceedings of the ACM on Programming Languages;2023-10-16
4. PyMigBench: A Benchmark for Python Library Migration;2023 IEEE/ACM 20th International Conference on Mining Software Repositories (MSR);2023-05
5. PYEVOLVE: Automating Frequent Code Changes in Python ML Systems;2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE);2023-05