Detecting similar repositories on GitHub

Yun Zhang, David Lo, Pavneet Singh Kochhar, Xin Xia, Quanlai Li, Jianling Sun

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

31 Citations (Scopus)

Abstract

GitHub contains millions of repositories among which many are similar with one another (i.e., having similar source codes or implementing similar functionalities). Finding similar repositories on GitHub can be helpful for software engineers as it can help them reuse source code, build prototypes, identify alternative implementations, explore related projects, find projects to contribute to, and discover code theft and plagiarism. Previous studies have proposed techniques to detect similar applications by analyzing API usage patterns and software tags. However, these prior studies either only make use of a limited source of information or use information not available for projects on GitHub. 

In this paper, we propose a novel approach that can effectively detect similar repositories on GitHub. Our approach is designed based on three heuristics leveraging two data sources (i.e., GitHub stars and readme files) which are not considered in previous works. The three heuristics are: repositories whose readme files contain similar contents are likely to be similar with one another, repositories starred by users of similar interests are likely to be similar, and repositories starred together within a short period of time by the same user are likely to be similar. Based on these three heuristics, we compute three relevance scores (i.e., readme-based relevance, stargazer-based relevance, and time-based relevance) to assess the similarity between two repositories. By integrating the three relevance scores, we build a recommendation system called RepoPal to detect similar repositories. We compare RepoPal to a prior state-of-the-art approach CLAN using one thousand Java repositories on GitHub. Our empirical evaluation demonstrates that RepoPal achieves a higher success rate, precision and confidence over CLAN.

Original languageEnglish
Title of host publication2017 IEEE 24th International Conference on Software Analysis, Evolution, and Reengineering (SANER) - Proceedings
Subtitle of host publicationFebruary 21-24, 2017 Klagenfurt, Austria
EditorsMartin Pinzger, Gabriele Bavota, Andrian Marcus
Place of PublicationPiscataway NJ USA
PublisherIEEE, Institute of Electrical and Electronics Engineers
Pages13-23
Number of pages11
ISBN (Electronic)9781509055012
ISBN (Print)9781509055029
DOIs
Publication statusPublished - 2017
Externally publishedYes
EventIEEE International Conference on Software Analysis, Evolution, and Reengineering 2017 - Klagenfurt, Austria
Duration: 21 Feb 201724 Feb 2017
Conference number: 24th
https://saner.aau.at/
https://ieeexplore.ieee.org/xpl/conhome/7879528/proceeding (Proceedings)

Conference

ConferenceIEEE International Conference on Software Analysis, Evolution, and Reengineering 2017
Abbreviated titleSANER 2017
CountryAustria
CityKlagenfurt
Period21/02/1724/02/17
Internet address

Keywords

  • GitHub
  • Information Retrieval
  • Recommendation System
  • Similar Repositories

Cite this