一句话:提出 FOCUS,用协同过滤推荐 API 方法调用和使用模式,提升成功率、准确率并降低运行时间。
开发者日常需要学习新 API,但现有使用模式推荐方法存在冗余高、运行时性能差的问题。本文将使用模式推荐重构为协同过滤推荐问题,实现工具 FOCUS:它挖掘开源项目仓库,分析与当前项目相似的项目的 API 使用方式,进而推荐 API 方法调用及使用模式。作者在从 GitHub 和 Maven Central 提取的大量 Java 项目上评估,与当前最优方法 PAM 相比,FOCUS 在成功率、准确率和执行时间上均更优,表明上下文感知的协同过滤推荐系统适合提供 API 使用模式。
Software developers interact with APIs on a daily basis and, therefore, often face the need to learn how to use new APIs suitable for their purposes. Previous work has shown that recommending usage patterns to developers facilitates the learning process. Current approaches to usage pattern recommendation, however, still suffer from high redundancy and poor run-time performance. In this paper, we reformulate the problem of usage pattern recommendation in terms of a collaborative-filtering recommender system. We present a new tool, FOCUS, which mines open-source project repositories to recommend API method invocations and usage patterns by analyzing how APIs are used in projects similar to the current project. We evaluate FOCUS on a large number of Java projects extracted from GitHub and Maven Central and find that it outperforms the state-of-the-art approach PAM with regards to success rate, accuracy, and execution time. Results indicate the suitability of context-aware collaborative-filtering recommender systems to provide API usage patterns.
@inproceedings{NguyenRRODP19,
title = {FOCUS: A Recommender System for Mining API Function Calls and Usage Patterns},
author = {Phuong T. Nguyen and Juri Di Rocco and Davide Di Ruscio and Lina Ochoa and Thomas Degueule and Massimiliano Di Penta},
booktitle = {ICSE},
year = {2019},
doi = {10.1109/icse.2019.00109}
}