--- category: academic type: academic person: Yanxin Lu date: 2016 source: Nguyen_16_vector.pdf --- # Mapping API Elements for Code Migration with Vector Representations Trong Duc Nguyen, Anh Tuan Nguyen, Tien N. Nguyen (Iowa State University) ICSE Companion 2016 Code migration between languages is challenging because different languages require developers to use different software libraries and frameworks. This paper introduces a statistical approach with vector representations to mine single API mappings between Java JDK and C# .NET. The authors characterize an API element by its usage context consisting of surrounding, co-occurring APIs, and use Word2Vec to project the APIs into continuous vector spaces. The transformation matrix between the two vector spaces is learned from a small set of human-written pairs of mappings, then used to derive other mappings and generate corresponding API sequences in C# via a phrase-based translation model.