Semantics-Driven Migration of Java Programs: A Practical Application


The development of a procedure supporting automated migration of Java programs to a new set of libraries is explored. Code migration is a common task in modern software projects. For example, it may arise when a project must be ported to a more secure or feature-rich library, a new platform, or a new version of an existing library. This paper presents a procedure for semantics-driven automated migration. A metamodel that applies the formalism earlier proposed by the authors and intended to describe libraries in object-oriented languages was developed for the migration procedure. The formalism specifies a library behaviour by using a system of extended finite state machines (EFSMs). The migration is split into five steps and each step is described in the paper. The procedure applies an algorithm of an equivalent path based on a breadth-first search extended for the needs of the migration task. The proposed procedure is implemented in a prototype of the migration tool. The tool includes modules for extraction of the software execution path, visualization of library models, user interaction, and migration. A library description language was developed for the tool. The prototype was tested by both artificial code and a real-world open source project. The article describes the experiments performed, the difficulties that have arisen in the process of migration of test samples, and how they are solved in the proposed procedure. The HTTP protocol and log library are used as libraries in the experiment. The results of the experiments indicate that code migration can be successfully automated through the developed procedures.

This is a preview of subscription content, log in to check access.


  1. 1.

    It should be noted that the formalism is currently being refined and should not be considered final in this paper.

  2. 2.

    The original code of the tool can be accessed at

  3. 3.

  4. 4.

  5. 5.

  6. 6.

  7. 7.

  8. 8.

  9. 9.


  1. 1

    Itsykson, V.M., Formalism and language tools for specification of the semantics of software libraries, Autom. Control Comput. Sci., 2017, vol. 51, no. 7, pp. 531–538.

    Article  Google Scholar 

  2. 2

    Baxter, I.D., Pidgeon, C., and Mehlich, M., DMS/spl reg: Program transformations for practical scalable software evolution, Proceedings of the 26th International Conference on Software Engineering, 2004, pp. 625–634.

  3. 3

    Bravenboer, M., et al., Stratego/XT 0.17. A language and toolset for program transformation, Sci. Comput. Program., 2008, vol. 72, no. 1, pp. 52–70.

    MathSciNet  Article  Google Scholar 

  4. 4

    Broeksema, B. and Telea, A., Visual support for porting large code bases, Visualizing Software for Understanding and Analysis (VISSOFT), 2011 6th IEEE International Workshop on, 2011, pp. 1–8.

  5. 5

    Christoph, A. and Müller, M.M., GREAT: UML transformation tool for porting middleware applications, International Conference on the Unified Modeling Language, 2003, pp. 18–30.

  6. 6

    Cordy, J.R., The TXL source transformation language, Sci. Comput. Program., 2006, vol. 61, no. 3, pp. 190–210.

    MathSciNet  Article  MATH  Google Scholar 

  7. 7

    Eisenbarth, T., Koschke, R., and Vogel, G., Static trace extraction, Reverse Engineering, 2002. Proceedings. Ninth Working Conference on, 2002, pp. 128–137.

  8. 8

    Filman, R.E. and Havelund, K., Source-code instrumentation and quantification of events, Workshop on Foundations of Aspect-Oriented Languages (FOAL) at AOSD Conference, Twente, 2002, pp. 45–49.

  9. 9

    Jemerov, D., Implementing refactorings in IntelliJ IDEA, Proceedings of the 2nd Workshop on Refactoring Tools, 2008, p. 13.

  10. 10

    Marosi, A.C., Balaton, Z. and Kacsuk, P., GenWrapper: A generic wrapper for running legacy applications on desktop grids, 2009 IEEE International Symposium on Parallel Distributed Processing, 2009, p. 1–6.

  11. 11

    Wu, L., et al., Transforming code with compositional mappings for API-library switching, 2015 IEEE 39th Annual Computer Software and Applications Conference, 2015, vol. 2, pp. 316–325.

  12. 12

    A conformant OpenGL ES implementation for Windows, Mac and Linux. Accessed September 3, 2017.

  13. 13

    Simple Logging Facade for Java (SLF4J). Accessed September 3, 2017.

  14. 14

    JetBrains, Statically typed programming language for the JVM, Android and the browser. Accessed September 3, 2017.

Download references

Author information



Corresponding authors

Correspondence to A. O. Aleksyuk or V. M. Itsykson.

Additional information

Translated by V. Kupriyanova-Ashina

About this article

Verify currency and authenticity via CrossMark

Cite this article

Aleksyuk, A.O., Itsykson, V.M. Semantics-Driven Migration of Java Programs: A Practical Application. Aut. Control Comp. Sci. 52, 581–588 (2018).

Download citation


  • software library
  • code migration
  • behavioral description
  • program transformation