skip to main content
10.1145/2591062.2591072acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
Article

Migrating code with statistical machine translation

Published: 31 May 2014 Publication History

Abstract

In the era of mobile computing, developers often need to migrate code written for one platform in a programming language to another language for a different platform, e.g., from Java for Android to C# for Windows Phone. The migration process is often performed manually or semi-automatically, in which developers are required to manually define translation rules and API mappings. This paper presents semSMT, an automatic tool to migrate code written in Java to C#. semSMT utilizes statistical machine translation to automatically infer translation rules from existing migrated code, thus, requires no manual defining of rules. The video demonstration on semSMT can be found on YouTube at http://www.youtube.com/watch?v=aRSnl5-7vNo.

References

[1]
P. F. Brown, V. J. D. Pietra, S. A. D. Pietra, and R. L. Mercer. The mathematics of statistical machine translation: parameter estimation. Comput. Linguist., 19(2):263–311, June 1993.
[2]
M. El-Ramly, R. Eltayeb, and H. Alla. An experiment in automatic conversion of legacy Java programs to C#. ACS/IEEE Int. Conference on Computer Systems and Applications, pp. 1037–1045, 2006.
[3]
Google Translate. http://translate.google.com/.
[4]
A. E. Hassan and R. C. Holt. A lightweight approach for migrating web frameworks. Inf. Softw. Technol., 47(8):521–532, June 2005.
[5]
Java2CSharp. http://j2cstranslator.wiki.sourceforge.net/.
[6]
P. Koehn. Statistical Machine Translation. The Cambridge Press, 2010.
[7]
P. Koehn, F. J. Och, and D. Marcu. Statistical phrase-based translation. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology, NAACL ’03, pages 48–54, 2003.
[8]
S. Meng, X. Wang, L. Zhang, and H. Mei. A history-based matching approach to identification of framework evolution. In ICSE’12. IEEE CS, 2012.
[9]
Microsoft Translator. http://www.bing.com/translator
[10]
M. Mossienko. Automated Cobol to Java recycling. In CSMR’03. IEEE CS, 2003.
[11]
A. T. Nguyen, T. T. Nguyen, and T. N. Nguyen. Lexical Statistical Machine Translation for Language Migration. In Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE’13. ACM, 2013.
[12]
T. T. Nguyen, A. T. Nguyen, H. A. Nguyen, and T. N. Nguyen. A Semantic Statistical Language Model for Source Code. In Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE’13. ACM, 2013.
[13]
semSMT. http://home.engineering.iastate.edu/˜anhnt/Research/ StaTran/.
[14]
A. van Deursen and T. Kuipers. Identifying objects using cluster and concept analysis. In ICSE ’99, pages 246–255. ACM, 1999.
[15]
R. C. Waters. Program translation via abstraction and reimplementation. IEEE Trans. Softw. Eng., 14(8):1207–1228, Aug. 1988.
[16]
W. Wu, Y.-G. Guéhéneuc, G. Antoniol, and M. Kim. AURA: a hybrid approach to identify framework evolution. In ICSE ’10, pages 325–334. ACM, 2010.
[17]
K. Yasumatsu and N. Doi. Spice: A system for translating Smalltalk programs into an C environment. IEEE Trans. Softw. Eng., 21(11):902–912, Nov. 1995.
[18]
H. Zhong, S. Thummalapenta, T. Xie, L. Zhang, and Q. Wang. Mining API mapping for language migration. In ICSE ’10, pages 195–204. ACM Press, 2010.

Cited By

View all
  • (2024)Leveraging Statistical Machine Translation for Code SearchProceedings of the 28th International Conference on Evaluation and Assessment in Software Engineering10.1145/3661167.3661233(191-200)Online publication date: 18-Jun-2024
  • (2024)Exploring the Impact of the Output Format on the Evaluation of Large Language Models for Code TranslationProceedings of the 2024 IEEE/ACM First International Conference on AI Foundation Models and Software Engineering10.1145/3650105.3652301(57-68)Online publication date: 14-Apr-2024
  • (2024)Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating CodeProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639226(1-13)Online publication date: 20-May-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE Companion 2014: Companion Proceedings of the 36th International Conference on Software Engineering
May 2014
741 pages
ISBN:9781450327688
DOI:10.1145/2591062
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

  • TCSE: IEEE Computer Society's Tech. Council on Software Engin.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 May 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Language Migration
  2. Statistical Machine Translation

Qualifiers

  • Article

Conference

ICSE '14
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)40
  • Downloads (Last 6 weeks)2
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Leveraging Statistical Machine Translation for Code SearchProceedings of the 28th International Conference on Evaluation and Assessment in Software Engineering10.1145/3661167.3661233(191-200)Online publication date: 18-Jun-2024
  • (2024)Exploring the Impact of the Output Format on the Evaluation of Large Language Models for Code TranslationProceedings of the 2024 IEEE/ACM First International Conference on AI Foundation Models and Software Engineering10.1145/3650105.3652301(57-68)Online publication date: 14-Apr-2024
  • (2024)Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating CodeProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639226(1-13)Online publication date: 20-May-2024
  • (2024)MUT: Human-in-the-Loop Unit Test MigrationProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639124(1-12)Online publication date: 20-May-2024
  • (2024)GlueTest: Testing Code Translation via Language Interoperability2024 IEEE International Conference on Software Maintenance and Evolution (ICSME)10.1109/ICSME58944.2024.00061(612-617)Online publication date: 6-Oct-2024
  • (2024)GraphPyRec: A novel graph-based approach for fine-grained Python code recommendationScience of Computer Programming10.1016/j.scico.2024.103166(103166)Online publication date: Jun-2024
  • (2023)Evaluating and Optimizing the Effectiveness of Neural Machine Translation in Supporting Code Retrieval Models: A Study on the CAT BenchmarkProceedings of the 32nd ACM International Conference on Information and Knowledge Management10.1145/3583780.3614869(2055-2064)Online publication date: 21-Oct-2023
  • (2023)Using Transfer Learning for Code-Related TasksIEEE Transactions on Software Engineering10.1109/TSE.2022.318329749:4(1580-1598)Online publication date: 1-Apr-2023
  • (2022)Unified abstract syntax tree representation learning for cross-language program classificationProceedings of the 30th IEEE/ACM International Conference on Program Comprehension10.1145/3524610.3527915(390-400)Online publication date: 16-May-2022
  • (2022)Better Together? An Evaluation of AI-Supported Code TranslationProceedings of the 27th International Conference on Intelligent User Interfaces10.1145/3490099.3511157(369-391)Online publication date: 22-Mar-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media