/FOCUS

Primary LanguageJava

FOCUS

This repository contains the source code implementation and the datasets used to get the experimental results of the following paper:

FOCUS: A Recommender System for Mining API Function Calls and Usage Patterns

Introduction

FOCUS is a context-aware collaborative-filtering system that exploits cross relationships among OSS projects to suggest the inclusion of additional API invocations and concrete API usage patterns.

Implementing a collaborative filtering recommendation system requires to assess the similarity of two customers, i.e., two projects. Existing approaches consider that any two projects using an API of interest are equally valuable sources of knowl- edge. Instead, we postulate that not all projects are equal when it comes to recommending usage patterns: a project that is highly similar to the project currently being developed should provide higher quality patterns than a highly dissimilar one. Our collaborative filtering recommendation system attempts to narrow down the search scope by only considering the projects that are the most similar to the active project. Therefore, methods that are typically used conjointly by similar projects in similar contexts tend to be recommended first.

We incorporate these ideas in a new context-aware collaborative filtering recommender system that mines OSS repositories to provide developers with API FunctiOn Calls and USage patterns, FOCUS for short. Our approach employs a new model to represent mutual relationships between projects and collaboratively mines API usage from the most similar projects.

Repository Structure

  • tool
    • Focus: API Function calls and usage patterns approach.
    • PAM: utilities supporting PAM evaluation.
    • arffExtractor: Rascal metadata extractors.
  • dataset
    • jars: parsed jar files;
    • MV_L: metadata of the MVL dataset (3,600 JAR files);
    • MH_S: metadata of the MVS dataset (1,600 JAR files);
    • SH_L: metadata of the SHL dataset (610 GitHub projects);
    • SH_S: metadata of the SHS dataset (200 GitHub projects);

Note1: the archive of 5,147 Java projects retrieved from GitHub via the Software Heritage archive is available at anonymized. Note2: to get the results shown in the paper you must run the Focus tool included in this repository.