# FACOS: Finding API Relevant Contents on Stack Overflow with Semantic and Syntactic Analysis

arXiv: https://arxiv.org/abs/2111.07238 · HTML: https://mlsanity.com/paper/2111.07238/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 13 of its 58 references that are in the map.
- First posted on arXiv 14 Nov 2021.

## Builds on (most cited first, 13 of 13)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://mlsanity.com/paper/1907.11692/) (2019)
- [CodeBERT: A Pre-Trained Model for Programming and Natural Languages](https://mlsanity.com/paper/2002.08155/) (2020)
- [Deep API Learning](https://mlsanity.com/paper/1605.08535/) (2016)
- [An Empirical Study on the Usage of Transformer Models for Code Completion](https://mlsanity.com/paper/2108.01585/) (2021)
- [Categorizing the Content of GitHub README Files](https://mlsanity.com/paper/1802.06997/) (2018)
- [RACK: Automatic API Recommendation using Crowdsourced Knowledge](https://mlsanity.com/paper/1807.02953/) (2018)
- [TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Search](https://mlsanity.com/paper/2003.03238/) (2020)
- [API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentations](https://mlsanity.com/paper/2103.10668/) (2021)
- [NeuralQA: A Usable Library for Question Answering (Contextual Query Expansion + BERT) on Large Datasets](https://mlsanity.com/paper/2007.15211/) (2020)
- [Contextual Documentation Referencing on Stack Overflow](https://mlsanity.com/paper/1906.04357/) (2019)
- [Towards a question answering assistant for software development using a transformer-based language model](https://mlsanity.com/paper/2103.09423/) (2021)

## Built on by (most cited first, 1 of 1)

- [On the Effectiveness of Pretrained Models for API Learning](https://mlsanity.com/paper/2204.03498/) (2022)

## Abstract (arXiv)

Collecting API examples, usages, and mentions relevant to a specific API method over discussions on venues such as Stack Overflow is not a trivial problem. It requires efforts to correctly recognize whether the discussion refers to the API method that developers/tools are searching for. The content of the thread, which consists of both text paragraphs describing the involvement of the API method in the discussion and the code snippets containing the API invocation, may refer to the given API method. Leveraging this observation, we develop FACOS, a context-specific algorithm to capture the semantic and syntactic information of the paragraphs and code snippets in a discussion. FACOS combines a syntactic word-based score with a score from a predictive model fine-tuned from CodeBERT. FACOS beats the state-of-the-art approach by 13.9% in terms of F1-score.
