Finding relevant API content on Stack Overflow is a critical yet time-consuming task for developers. FACOS (Finding API Contents On Stack Overflow) combines semantic and syntactic analysis to automatically surface Stack Overflow posts most relevant to a given API query, outperforming keyword-based baselines by leveraging both code structure and natural language semantics.
Stack Overflow is the primary resource for developers seeking API usage examples, error explanations, and best practices. However, finding the most relevant posts for a specific API query remains a challenge — keyword search often surfaces too many irrelevant results, while semantic search alone misses syntactically precise matches.
FACOS (Finding API Contents On Stack Overflow) addresses this by combining:
FACOS fuses both signals into a unified ranking model, trained and evaluated on a curated benchmark of API queries paired with their ground-truth relevant Stack Overflow posts. The hybrid approach consistently outperforms pure semantic and pure syntactic baselines.
Published at: arXiv preprint arXiv:2111.07238, 2021 · Citations: 7