Learning API Usages from Bytecode: A Statistical Approach
By Tam The Nguyen, Hung Viet Pham, Phong Minh Vu, Tung Thanh Nguyen. 2015
80 citations recorded by the source corpus.
Mobile app developers rely heavily on standard API frameworks and libraries. However, learning API usages is often challenging due to the fast-changing nature of API frameworks for mobile systems and the insufficiency of API documentation and source code examples. In this paper, we propose a novel approach to learn API usages from bytecode of Android mobile apps. Our core contributions include HAPI, a statistical model of API usages and three algorithms to extract method call sequences from apps’ bytecode, to train HAPI based on those sequences, and to recommend method calls in code completion using the trained HAPIs. Our empirical evaluation shows that our prototype tool can effectively learn API usages from 200 thousand apps containing 350 million method sequences. It recommends next method calls with top-3 accuracy of 90% and outperforms baseline approaches on average 10-20%.
Subfields: Information Systems, Code Generation & Program Synthesis, Program Analysis & Verification, Signal Processing
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Information Systems
- Bogdan Vasilescu
- Casey Casalnuovo
- Premkumar T. Devanbu
- Miltiadis Allamanis
- Michael Pradel
- Charles Sutton
- Earl T. Barr
- Koushik Sen
In Code Generation & Program Synthesis
- Bogdan Vasilescu
- Casey Casalnuovo
- Premkumar T. Devanbu
- Charles Sutton
- Miltiadis Allamanis
- Tien Nhut Nguyen
- Anh Tuan Nguyen
- Earl T. Barr
In Program Analysis & Verification
- Bogdan Vasilescu
- Premkumar T. Devanbu
- Casey Casalnuovo
- Michael Pradel
- Koushik Sen
- Miltiadis Allamanis
- Earl T. Barr
- Charles Sutton
In Signal Processing
Citations in the corpus
- Recovering clear, natural identifiers from obfuscated JS names (2017, background): “There have been substantial further applications of statistical models for code, in areas such as coding standards mining and checking [1], code summarization [17], idiom mining [3, 37], and bug localization [41].”