What’s Spain’s Paris? Mining analogical libraries from Q&A discussions

Chunyang Chen, Zhenchang Xing, Yang Liu

Research output: Contribution to journalArticleResearchpeer-review

4 Citations (Scopus)


Third-party libraries are an integral part of many software projects. It often happens that developers need to find analogical libraries that can provide comparable features to the libraries they are already familiar with for different programming languages or different mobile platforms. Existing methods to find analogical libraries are limited by the community-curated list of libraries, blogs, or Q&A posts, which often contain overwhelming or out-of-date information. In this paper, we present a new approach to recommend analogical libraries based on a knowledge base of analogical libraries mined from tags of millions of Stack Overflow questions. The novelty of our approach is to solve analogical-library questions by combining state-of-the-art word embedding technique and domain-specific relational and categorical knowledge mined from Stack Overflow. Given a library and a recommended analogical library, our approach further extracts questions and answer snippets in Stack Overflow about comparison of analogical libraries, which can potentially offer useful information scents for developers to further their investigation of the recommended analogical libraries. We implement our approach in a proof-of-concept web application and more than 34.8 thousands of users visited our website from November 2015 to August 2017. Our evaluation shows that our approach can make accurate recommendation of analogical libraries. We also demonstrate the usefulness of our analogical-library recommendations by using them to answer analogical-library questions in Stack Overflow. Google Analytics of our website traffic and analysis of the visitors’ interaction with website contents provide the insights into the usage patterns and the system design of our web application.

Original languageEnglish
Pages (from-to)1155-1194
Number of pages40
JournalEmpirical Software Engineering
Issue number3
Publication statusPublished - Jun 2019


  • Analogical libraries
  • Categorical knowledge
  • Knowledge graph
  • Relational knowledge
  • Word embedding

Cite this