Journal of Computer Applications ›› 2022, Vol. 42 ›› Issue (11): 3520-3526.DOI: 10.11772/j.issn.1001-9081.2021122070

• ChinaService 2021 • Previous Articles    

Recommendation service for API use cases based on open source community analysis

Jiaqi ZHANG1,2, Yanchun SUN1,2(), Gang HUANG1,2   

  1. 1.Department of Computer Science and Technology,Peking University,Beijing 100871,China
    2.Key Laboratory of High Confidence Software Technologies of Ministry of Education (Peking University),Beijing 100871,China
  • Received:2021-12-07 Revised:2022-01-02 Accepted:2022-01-13 Online:2022-03-02 Published:2022-11-10
  • Contact: Yanchun SUN
  • About author:ZHANG Jiaqi, born in 1999, M. S. candidate. Her research interests include service computing, big data analysis.
    SUN Yanchun, born in 1970, Ph. D., associate professor. Her research interests include service computing, big data analysis.
    HUANG Gang, born in 1975, Ph. D., professor. His research interests include system software, self‑adaption.
  • Supported by:
    Beijing Outstanding Young Scientist Program(BJJWZYJH01201910001004)

基于开源社区分析的API使用案例推荐服务

张佳琪1,2, 孙艳春1,2(), 黄罡1,2   

  1. 1.北京大学 信息科学技术学院,北京 100871
    2.高可信软件技术教育部重点实验室(北京大学),北京 100871
  • 通讯作者: 孙艳春
  • 作者简介:张佳琪(1999—),女,河北石家庄人,硕士研究生,主要研究方向:服务计算、大数据分析
    孙艳春(1970—),女,辽宁沈阳人,副教授,博士,CCF高级会员,主要研究方向:服务计算、大数据分析 sunyc@pku.edu.cn
    黄罡(1975—),男,湖南株洲人,教授,博士,CCF会员,主要研究方向:系统软件、自适应。
  • 基金资助:
    北京高等学校卓越青年科学家项目(BJJWZYJH01201910001004)

Abstract:

Current research on Application Program Interface (API) learning and code reuse focuses on mining frequent API usage patterns, extracting component information, and recommending personalized API services based on user requirements and target functions. However, as beginners in software development who lack professional knowledge, experience and skills to implement specific use cases, they often need real code use cases as a reference except reading official documents. Most of the existing research about code recommendation is in single fragment mode. The lack of cross function case in case selection is not conducive for beginners to learn to build a complete use scenario or a functional module. At the same time, the semantic description extracted from a single function annotation is not enough for learners to understand the complete function implementation method of the project. To solve the above problems, an API use case recommendation service based on open source community analysis was proposed. Taking the software development back?end framework Spring Boot as an example, a cross function case recommendation assistant learning service was constructed. Then, the feasibility and effectiveness of the proposed API use case recommendation service was verified through questionnaires and expert verification.

Key words: code reuse, Application Program Interface (API), open source community analysis, recommendation service, use case

摘要:

目前有关API学习和代码复用的研究主要集中在对于API调用频繁模式的挖掘、组件化信息的提取以及根据用户的需求和目标功能进行的个性化应用程序接口(API)推荐服务等方面。然而,作为缺少专业知识和经验技能来完成特定使用案例的软件开发初学者,在阅读官方文档之外,往往需要真实的使用案例作为参考。现有代码推荐研究大多为单片段式代码,缺少跨函数的案例选择,这不利于初学者学习构建完整的使用场景或功能模块;同时,从单个函数注释中提取的语义描述也不足以构建学习者对项目中完整功能实现方法的认识。为了解决上述问题,提出了一种基于开源社区分析的API使用案例推荐服务,并以软件开发后端框架Spring Boot为例,构建了跨函数的案例推荐辅助学习服务。随后,通过调查问卷、专家验证等方式验证了所提出的API使用案例推荐服务的可行性和有效性。

关键词: 代码复用, 应用程序界面, 开源社区分析, 推荐服务, 使用案例

CLC Number: