Survey of Application Program Interface Migration Methods for object-oriented languages
https://doi.org/10.15514/ISPRAS-2025-37(4)-7
Abstract
Application migration is the process of moving software from one platform or API version to another. With rapid technological development and constant changes in user preferences, effective interface migration is becoming a necessity to maintain the competitiveness of applications. This article provides an overview of modern methods of application programming interface migration, focusing on the importance of adapting software to changing conditions and user requirements. The article also classifies existing approaches to migration, including the use of automated tools, adaptation and refactoring methods for code on object-oriented languages. The advantages and disadvantages of various methods, such as adapting user interfaces to new platforms, template-based migration, and using adapters to ensure compatibility between legacy and new interfaces are considered. The challenges faced by developers during migration are discussed, including semantic transformation issues and the need to take into account the specifics of target platforms. This review will be useful for both researchers and practitioners working in the field of software development, providing knowledge about methods and approaches to successful migration of application programming interfaces.
About the Authors
Yan Andreevich CHURKINRussian Federation
Researcher in Compiler Technology department at ISP RAS. Research interests: static analysis, compiler technologies, optimizations.
Dmitry Mikhailovich MELNIK
Russian Federation
Senior Researcher in Compiler Technology department. Research interests: compiler technologies, optimizations.
Ruben Arturovich BUCHATSKIY
Russian Federation
Cand. Sci. (Tech.), researcher in Compiler Technology department at ISP RAS. Research interests: static analysis, compiler technologies, optimizations.
References
1. What is an API? (Application Programming Interface).
2. https://www.mulesoft.com/resources/api/what-is-an-api (accessed 01.09.2024).
3. CMake Documentation and Community. https://cmake.org/documentation/ (accessed 01.09.2024).
4. Android API levels. https://apilevels.com (accessed 01.09.2024).
5. Lamothe M., Shang W., Chen T. H. P. A3: Assisting android api migrations using code examples. IEEE Transactions on Software Engineering, 2020, vol. 48, issue 2, pp. 417-431, DOI: 10.1109/TSE.2020.2988396.
6. Top Programming Languages for Android App Development in 2023.
7. https://medium.com/agileinsider/top-programming-languages-for-android-app-development-in-2023-3eb5d (accessed 01.09.2024).
8. Github. https://github.com/ (accessed 01.09.2024).
9. Rodriguez L. R. and Lawall J. Increasing Automation in the Backporting of Linux Drivers Using Coccinelle. In 11th European Dependable Computing Conference (EDCC), Paris, France, 2015, pp. 132-143, DOI: 10.1109/EDCC.2015.23.
10. Kang H. J., Thung F., Lawall J., Muller G., Jiang L., Lo D. Semantic Patches for Java Program Transformation (Experience Report). In 33rd European Conference on Object-Oriented Programming (ECOOP 2019). Leibniz International Proceedings in Informatics (LIPIcs), vol. 134, pp. 22:1-22:27, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019), DOI: 10.4230/LIPIcs.ECOOP.2019.22.
11. Chenglong Wang, Jiajun Jiang, Jun Li, Yingfei Xiong, Xiangyu Luo, Lu Zhang, and Zhenjiang Hu. Transforming Programs between APIs with Many-to-Many Mappings. In 30th European Conference on Object-Oriented Programming (ECOOP 2016). Leibniz International Proceedings in Informatics (LIPIcs), vol. 56, pp. 25:1-25:26, Schloss Dagstuhl–Leibniz-Zentrum für Informatik (2016), DOI: 10.4230/LIPIcs.ECOOP.2016.25.
12. M. Nita and D. Notkin. Using twinning to adapt programs to alternative APIs. 2010 ACM/IEEE 32nd International Conference on Software Engineering, Cape Town, South Africa, 2010, pp. 205-214, DOI: 10.1145/1806799.1806832.
13. Jun Li, Chenglong Wang, Yingfei Xiong, Zhenjiang Hu. SWIN: Towards Type-Safe Java Program Adaptation between APIs. Proceedings of the 2015 Workshop on Partial Evaluation and Program Manipulation, 2015, pp. 91-102, DOI: 10.1145/2678015.2682534.
14. Savchenko V. V., Sorokin K. S., Pankratenko G. A., Markov S., Spiridonov A., Alexandrov I., Volkov A. S., and Sun, K.-W. Nobrainer: An example-driven framework for C/C++ code transformations. Perspectives of System Informatics: 12th International Andrei P. Ershov Informatics Conference, PSI 2019, Novosibirsk, Russia, July 2–5, 2019, Revised Selected Papers 12, Springer International Publishing, 2019, pp. 140-155, DOI: 10.1007/978-3-030-37487-7_12.
15. Clang: a C language family frontend for LLVM. https://clang.llvm.org/ (accessed 01.09.2024).
16. The LLVM Compiler Infrastructure. https://llvm.org/ (accessed 01.09.2024).
17. AST Matcher Reference. https://clang.llvm.org/docs/LibASTMatchersReference.html (accessed 01.09.2024).
18. The Official YAML Web Site. https://yaml.org/ (accessed 01.09.2024).
19. Johnson A., Coti C., Malony A.D., Doerfert J. MARTINI: The Little Match and Replace Tool for Automatic Application Rewriting with Code Examples. In: Cano, J., Trinder, P. (eds) Euro-Par 2022: Parallel Processing. Euro-Par 2022. Lecture Notes in Computer Science, vol 13440. Springer, Cham., 2022, vol. 7, issue 76, pp. 4590, DOI: 10.1007/978-3-031-12597-3_2.
20. Wasserman L. Scalable, example-based refactorings with refaster. WRT'13: Proceedings of the 2013 ACM Workshop on refactoring tools, pp. 25-28, DOI: 10.1145/2541348.2541355.
21. Waddington D., Yao B. High-fidelity C/C++ code transformation. Science of Computer Programming, 2007, vol. 68, issue 2, pp. 64-78, DOI: 10.1016/j.scico.2006.04.010.
22. Visser E. (2001). Stratego: A Language for Program Transformation Based on Rewriting Strategies System Description of Stratego 0.5, 2001, pp. 357-361. Springer, Berlin, Heidelberg. DOI: 10.1007/3-540-45127-7_27.
23. Pawlak R. et al. Spoon: A Library for Implementing Analyses and Transformations of Java Source Code. Software: Practice and Experience, 2016, vol. 46, issue 9, pp. 1155-1179, DOI: 10.1002/spe.2346.
24. Long F., Amidon P., Rinard M. Automatic inference of code transforms for patch generation. Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, 2017, pp. 727-739, DOI: 10.1145/3106237.3106253.
25. Saha R. K., Lyu Y., Yoshida H. and Prasad M. R. Elixir: Effective object-oriented program repair, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE), Urbana, IL, USA, 2017, pp. 648-659, DOI: 10.1109/ASE.2017.8115675.
26. Wen M., Chen J., Wu R., Hao D. and Cheung S.-C., Context-Aware Patch Generation for Better Automated Program Repair, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE), Gothenburg, Sweden, 2018, pp. 1-11, DOI: 10.1145/3180155.3180233.
27. Xuan J., Xie X., Monperrus M. Crash Reproduction via Test Case Mutation: Let Existing Test Cases Help. ESEC/FSE 2015 - 10th Joint Meeting on Foundations of Software Engineering, NIER Track, Aug 2015, Bergamo, Italy. pp.910-913, DOI: 10.1145/2786805.2803206.
28. Xuan J. et al. Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs. IEEE Transactions on Software Engineering, 2016, vol. 43, issue 1, pp. 34-55, DOI: 10.1109/TSE.2016.2560811.
29. Martinez M., Monperrus M. Astor: A program repair library for java. Proceedings of the 25th international symposium on software testing and analysis, 2016, pp. 441-444, DOI: 10.1145/2931037.2948705.
30. Van Tonder R., Le Goues C. Lightweight Multi-Language Syntax Transformation with Parser Parser Combinators. Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2019, pp. 363-378, DOI: 10.1145/3314221.3314589.
31. OpenRewrite: Semantic code search and transformation tool. Moderne Inc., https://docs.openrewrite.org/ (accessed 01.09.2024).
32. Introduction to Apache HttpClient. https://blog.knoldus.com/introduction-to-apache-httpclient/ (accessed 01.09.2024).
33. Lossless Semantic Trees (LST).
34. https://docs.openrewrite.org/concepts-explanations/lossless-semantic-trees (accessed 01.09.2024).
35. go-patch: Structured code diffs and refactors. Uber Technologies, Inc. GitHub repository.
36. https://github.com/uber-go/gopatch (accessed 01.09.2024).
37. Detailed Description of Unified Format.
38. https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html (accessed 01.09.2024).
39. CodeTurn: Automated Mainframe Code Conversion. https://www.astadia.com/products/codeturn (accessed 01.09.2024).
40. Cordy J. R. The TXL source transformation language. Science of Computer Programming, 2006, vol. 61, issue 3, pp. 190-210, DOI: 10.1016/j.scico.2006.04.002.
41. Jscodeshift. https://github.com/facebook/jscodeshift (accessed 01.09.2024).
42. Recast. https://github.com/benjamn/recast (accessed 01.09.2024).
43. AST-types. https://github.com/benjamn/ast-types (accessed 01.09.2024).
44. AVA. https://github.com/avajs/ava (accessed 01.09.2024).
45. React-codemod. https://github.com/reactjs/react-codemod (accessed 01.09.2024).
46. Lodash-codemods. https://github.com/jfmengels/lodash-codemods (accessed 01.09.2024).
47. ESTree. https://github.com/estree/estree (accessed 01.09.2024).
48. Using the Compiler API. https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API (accessed 01.09.2024).
49. Klint P., van der Storm T., Vinju J. Rascal: A Domain Specific Language for Source Code Analysis and Manipulation. 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation, Edmonton, AB, Canada, 2009, pp. 168-177, DOI: 10.1109/SCAM.2009.28.
50. Wright H. K., Jasper D., Klimek M., Carruth C. and Wan Z. Large-Scale Automated Refactoring Using ClangMR, 2013 IEEE International Conference on Software Maintenance, Eindhoven, Netherlands, 2013, pp. 548-551, DOI: 10.1109/ICSM.2013.93.
51. Koppel J., Premtoon V., Solar-Lezama A. One tool, many languages: language-parametric transformation with incremental parametric syntax. Proceedings of the ACM on Programming Languages, 2018, vol. 2, issue OOPSLA, pp. 1-28, DOI: 10.1145/3276492.
52. Ketkar A. et al. A Lightweight Polyglot Code Transformation Language. Proceedings of the ACM on Programming Languages, 2024, vol. 8, issue PLDI, article No.: 199, pp. 1288-1312, DOI: 10.1145/3656429.
53. Max Brunsfeld Tree-sitter. GitHub. https://tree-sitter.github.io/tree-sitter/ (accessed 01.09.2024).
54. Ramanathan M. K., Clapp L., Barik R. and Sridharan M. Piranha: Reducing Feature Flag Debt at Uber, 2020 IEEE/ACM 42nd International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP), Seoul, Korea (South), 2020, pp. 221-230, DOI: 10.1145/3377813.3381350.
55. Baxter I. D. DMS: Program transformations for practical scalable software evolution. IWPSE '02: Proceedings of the International Workshop on Principles of Software Evolution, pp. 48-51, DOI: 10.1145/512035.512047.
56. Dagenais B., Robillard M. P. SemDiff: Analysis and recommendation support for API evolution. 2009 IEEE 31st International Conference on Software Engineering, Vancouver, BC, Canada, 2009, pp. 599-602, DOI: 10.1109/ICSE.2009.5070565.
57. Henkel J., Diwan A. CatchUp! Capturing and replaying refactorings to support API evolution. Proceedings, 27th International Conference on Software Engineering, 2005. ICSE 2005., St. Louis, MO, USA, 2005, pp. 274-283, DOI: 10.1109/ICSE.2005.1553570.
58. Eclipse. https://www.eclipse.org/ (accessed 01.09.2024).
59. Bruneton E., Lenglet R., Coupaye T. ASM: a code manipulation tool to implement adaptable systems. In Adaptable and extensible component systems, 2002, vol. 30, issue 19.
60. ast-grep: write code to match code. Open-source. https://ast-grep.github.io (accessed 01.09.2024).
61. Semgrep. Open-source. https://github.com/semgrep/semgrep (accessed 01.09.2024).
62. CodeQL: the libraries and queries that power security researchers around the world, as well as code scanning in GitHub Advanced Security. GitHub, Inc., https://codeql.github.com (accessed 01.09.2024).
63. Lamothe M., Shang W. Exploring the use of automated API migrating techniques in practice: an experience report on android. Proceedings of the 15th International Conference on Mining Software Repositories, 2018, pp. 503-514, DOI: 10.1145/3196398.3196420.
64. Chow, Notkin. Semi-automatic update of applications in response to library changes. 1996 Proceedings of International Conference on Software Maintenance, Monterey, CA, USA, 1996, pp. 359-368, DOI: 10.1109/ICSM.1996.565039.
65. Parr T. J., Dietz H. G., Cohen W. E. PCCTS reference manual: version 1.00. ACM SIGPLAN Notices, 1992, vol. 27, issue 2, pp. 88-165, DOI: 10.1145/130973.130980.
66. Parr T. J. An Overview of SORCERER: A Simple Tree-Parser Generator. Poster paper; International Conference on Compiler Construction 1994; Edinburgh, Scotland; April 1994.
67. Bartolomei T. T., Czarnecki K., Lämmel R. Swing to SWT and back: Patterns for API migration by wrapping. 2010 IEEE International Conference on Software Maintenance, Timisoara, Romania, 2010, pp. 1-10, DOI: 10.1109/ICSM.2010.5610429.
68. Java Swing Tutorial. https://www.javatpoint.com/java-swing (accessed 01.09.2024).
69. SWT: The Standard Widget Toolkit. https://www.eclipse.org/swt/ (accessed 01.09.2024).
70. Adapter Pattern. https://www.geeksforgeeks.org/adapter-pattern/ (accessed 01.09.2024).
71. Fazzini M., Xin Q., Orso A. Automated API-usage update for Android apps. ISSTA 2019: Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 204-215, DOI: 10.1145/3293882.3330571.
72. Alrubaye H., Alshoaibi D., Alomar E., Mkaouer M. W., and Ouni A. How Does API Migration Impact Software Quality and Comprehension? An Empirical Study. 2019, DOI: 10.48550/arXiv.1907.07724.
73. Opdyke W. F. Refactoring object-oriented frameworks. University of Illinois at Urbana-Champaign, 1992.
74. Fowler M. Refactoring: improving the design of existing code. Addison-Wesley Professional, 2018.
75. Stroggylos K., Spinellis D. Refactoring – Does It Improve Software Quality? Fifth International Workshop on Software Quality (WoSQ'07: ICSE Workshops 2007), Minneapolis, MN, USA, 2007, pp. 10-10, DOI: 10.1109/WOSQ.2007.11.
76. Stevens W. P., Myers G. J., Constantine L. L. Structured design. In IBM Systems Journal, vol. 13, issue 2, pp. 115-139, 1974, DOI: 10.1147/sj.132.0115.
77. Pantiuchina J., Lanza M., Bavota G. Improving Code: The (Mis) Perception of Quality Metrics, 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME), Madrid, Spain, 2018, pp. 80-91, DOI: 10.1109/ICSME.2018.00017.
78. Chávez A., Ferreira I., Fernandes E., Cedrim D., Garcia A. SBES '17: Proceedings of the XXXI Brazilian Symposium on Software Engineering, pp. 74-83, DOI: 10.1145/3131151.3131171.
79. Migrating your apps to Android 9. https://developer.android.com/about/versions/pie/android-9.0-migration (accessed 01.09.2024).
80. Li L. et al. Characterising deprecated Android APIs. MSR '18: Proceedings of the 15th International Conference on Mining Software Repositories, pp. 254 – 264, DOI: 10.1145/3196398.3196419.
81. Sawant A.A., Robbes R. & Bacchelli A. On the reaction to deprecation of clients of 4 + 1 popular Java APIs and the JDK. Empirical Software Engineering, vol. 23, issue 4, 2158–2197 (2018). DOI: 10.1007/s10664-017-9554-9.
82. Hora A., Robbes R., Anquetil N., Etien A., Ducasse S., Valente M. T. How Do Developers React to API Evolution? The Pharo Ecosystem Case, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME), Bremen, Germany, 2015, pp. 251-260, DOI: 10.1109/ICSM.2015.7332471.
83. Itsykson V., Zozulya A. Automated program transformation for migration to new libraries, 2011 7th Central and Eastern European Software Engineering Conference (CEE-SECR), Moscow, Russia, 2011, pp. 1-7, DOI: 10.1109/CEE-SECR.2011.6188463.
84. Brito A., Xavier L., Hora A., Valente M. T. Why and how Java developers break APIs, 2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER), Campobasso, Italy, 2018, pp. 255-265, DOI: 10.1109/SANER.2018.8330214.
85. McDonnell T., Ray B., Kim M. An Empirical Study of API Stability and Adoption in the Android Ecosystem. 2013 IEEE International Conference on Software Maintenance, Eindhoven, Netherlands, 2013, pp. 70-79, DOI: 10.1109/ICSM.2013.18.
86. Pandita R., Jetley R. P., Sudarsan S. D., Williams L. Discovering likely mappings between APIs using text mining. 2015 IEEE 15th International Working Conference on Source Code Analysis and Manipulation (SCAM), Bremen, Germany, 2015, pp. 231-240, DOI: 10.1109/SCAM.2015.7335419.
87. Li Y., Wang S., Nguyen T. N. DLFix: Context-based code transformation learning for automated program repair. ICSE '20: Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering, pp. 602 – 614, DOI: 10.1145/3377811.3380345.
88. Thongtanunam P., Pornprasit C., Tantithamthavorn C. Autotransform: Automated Code Transformation to Support Modern Code Review Process. ICSE '22: Proceedings of the 44th International Conference on Software Engineering, pp. 237 – 248, DOI: 10.1145/3510003.3510067.
Review
For citations:
CHURKIN Ya.A., MELNIK D.M., BUCHATSKIY R.A. Survey of Application Program Interface Migration Methods for object-oriented languages. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2025;37(4):111-146. (In Russ.) https://doi.org/10.15514/ISPRAS-2025-37(4)-7