IEEE Access (Jan 2019)

Enabling Feature Location for API Method Recommendation and Usage Location

  • Xiaobing Sun,
  • Congying Xu,
  • Bin Li,
  • Yucong Duan,
  • Xintong Lu

DOI
https://doi.org/10.1109/ACCESS.2019.2910732
Journal volume & issue
Vol. 7
pp. 49872 – 49881

Abstract

Read online

Given a new feature request during software evolution, developers are used to employing existing third-party libraries and APIs for implementation. However, it is usually non-trivial to find suitable APIs and to decide where to use these APIs in the original software. In this paper, we develop an approach for recommending API methods and usage locations through mining various software repositories. First, we analyze software repositories and use the feature location technique to localize feature-related files as API usage locations. Then, we utilize the feature-related files and API libraries to identify potential API methods for the implementation of the incoming feature request. We evaluate our approach on 5000 feature requests selected from five Java projects, and the results demonstrate that our approach can achieve 29.7% and 9.6% improvement in terms of Hit@5 and Hit@10 in recommending API methods, compared with the existing approach. For API usage localization, our approach can get MAP, MRR, Hit@1, HIt@5, and Hit@10 values with 0.293, 0.434, 0.303, 0.602, and 0.685, respectively.

Keywords