An API Recommendation Method for Querying Mobile Computing Problems

An API Recommendation Method for Querying Mobile Computing Problems

Wanzhi Wen, Bin Zhang, Yitao Hu, Xingyu Zhu, Zelin Wang
DOI: 10.4018/IJCINI.344422
Article PDF Download
Open access articles are freely available for download

Abstract

Nowadays mobile computing has penetrated into our lives and work. Major companies have invested a lot of material and financial resources in the development of mobile terminals. For developers, querying the right API is extremely important. However, finding the right APIs can be time-consuming and laborious. In this paper, to solve the problems developers may face in the actual development process and improve the development efficiency, we propose RAMC (Recommendation APIs for Mobile Computing), an API recommendation approach leveraging word embedding technique and the information crawling from Stack Overflow posts and Java core packages, to recommend appropriate APIs for developers. Furthermore, RAMC also provides developers with label words, similar questions and relevant code. To evaluate the effectiveness of RAMC, we decided to analyze our system by simulating an instance. By testing a problem encountered during mobile computing development, the RAMC can effectively output the much-related API and tags for developers.
Article Preview
Top

1. Introduction

At present, there are many mobile computing development platforms, and the development of mobile computing has become a hot topic. Researchers proposed a lot of intelligent algorithm algorithms for mobile computing. Kangshun Li et al. proposed a mobile node localization algorithm based on an overlapping self-adjustment mechanism (Kangshun Li, 2019). Meanwhile, they proposed improved gene expression programming to solve the inverse problem for ordinary differential equations (Kangshun Li, 2018), and performance analyses of differential evolution algorithm based on dynamic fitness landscape(Kangshun Li, 2019). Feng Wang et al. proposed a hybrid particle swarm optimization algorithm using adaptive learning strategy(Feng Wang, 2018), and an adaptive weight vector guided evolutionary algorithm for preference-based multi-objective optimization(Feng Wang, 2019). However, there are few researches on API recommendation for mobile computing. In the process of mobile development, you will definitely encounter problems with the query API. For example, in the process of Android development, a large number of APIs are used.

Research shows that software developers spend on average one-fifth of their development time searching the web (Brandt and Guo,2009), mainly to looking for relevant code snippets for their tasks. This is the same work for mobile computing development. Generally speaking, there are three ways to perform API queries. The first method is to use a search engine to query (McMillan and Grechanik, 2011). The second approach is to use API documentation. The last method is to get help from experienced developers, but this method is very subjective and efficient. Therefore, by collecting developer questions and then using a technique to find a set of related API classes or functions for the developer, we can greatly help the developer reduce the time spent searching for code (Kevic and Fritz, 2014).

The above three methods are very common and can solve some problems. But there are still various problems. Many researchers have done related work to solve these problems. Many approaches to API recommendation issues have been developed. These techniques have come up with their unique strategies to varying degrees of improved recommendation content. Portfolio, McMillan et al. (McMillan and Mark, 2011) came up with a method, which implemented a recommended API for a given code search query and demonstrated it in a large codebase. Chan et al. (Wing-Kwan and Hong, 2012) improved the Portfolio approach by adding sophisticated graphics mining and text similarity techniques to develop recommendations. RACK, Rahman et al. (Rahman and Chanchal, 2016) proposed another method which constructs a keyword-API mapping database, extracts keywords questions from Stack Overflow and collects mapping APIs from corresponding high-score answers. Qiao Huang et al. (Qiao and Xin, 2018) proposed a method called BIKER, which used word embedding technology in API recommendation for the first time.

Although all of these technologies perform well in particular problems and their recommendation method does not involve the field of mobile computing, they have some limitations of their factors and hardly solve our research problems. Firstly, these technologies use keyword matching to select the recommended API, so different key matching technologies have a high impact on the recommendation results of an API (Chan and Cheng, 2012). Besides, developers should have rich development experience and understand the meaning of certain specific keywords so that they can use these technologies (Bajracharya and Lopes, 2012). It is not particularly friendly for a novice developer. For example, if you have a question: “How do I read/convert an InputStream into a String in Java?” you may have to understand the role of InputStream. Secondly, the names of API keywords and the keywords used in search queries are very likely to be different. Different developers may use different words to express some concepts. “Read” and “convert” have the same meaning above the question. Different developers may use different words. In fact, the concepts of this term are very similar. It's what we usually call word mismatch problem. And some identifiers in the code can also be a problem for some keyword queries (Haiduc and Marcus, 2012).

Complete Article List

Search this Journal:
Reset
Volume 18: 1 Issue (2024)
Volume 17: 1 Issue (2023)
Volume 16: 1 Issue (2022)
Volume 15: 4 Issues (2021)
Volume 14: 4 Issues (2020)
Volume 13: 4 Issues (2019)
Volume 12: 4 Issues (2018)
Volume 11: 4 Issues (2017)
Volume 10: 4 Issues (2016)
Volume 9: 4 Issues (2015)
Volume 8: 4 Issues (2014)
Volume 7: 4 Issues (2013)
Volume 6: 4 Issues (2012)
Volume 5: 4 Issues (2011)
Volume 4: 4 Issues (2010)
Volume 3: 4 Issues (2009)
Volume 2: 4 Issues (2008)
Volume 1: 4 Issues (2007)
View Complete Journal Contents Listing