# Generating Question Titles for Stack Overflow from Mined Code Snippets

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

## Key facts

- Cited by 10 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 20 May 2020.

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

- [A Survey on Machine Learning Techniques for Source Code Analysis](https://mlsanity.com/paper/2110.09610/) (2021)
- [The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation](https://mlsanity.com/paper/2305.06156/) (2023)
- [Empirical Evaluation of ChatGPT on Requirements Information Retrieval Under Zero-Shot Setting](https://mlsanity.com/paper/2304.12562/) (2023)
- [Improving Stack Overflow question title generation with copying enhanced CodeBERT model and bi-modal information](https://mlsanity.com/paper/2109.13073/) (2021)
- [On the Evaluation of NLP-based Models for Software Engineering](https://mlsanity.com/paper/2203.17166/) (2022)
- [Aligning LLMs through Multi-perspective User Preference Ranking-based Feedback for Programming Question Answering](https://mlsanity.com/paper/2406.00037/) (2024)
- [Teamwork makes the dream work: LLMs-Based Agents for GitHub README.MD Summarization](https://mlsanity.com/paper/2503.10876/) (2025)
- [GN-Transformer: Fusing Sequence and Graph Representation for Improved Code Summarization](https://mlsanity.com/paper/2111.08874/) (2021)
- [A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspective](https://mlsanity.com/paper/2202.04847/) (2022)
- [Diverse Title Generation for Stack Overflow Posts with Multiple Sampling Enhanced Transformer](https://mlsanity.com/paper/2208.11523/) (2022)

## Abstract (arXiv)

Stack Overflow has been heavily used by software developers as a popular way to seek programming-related information from peers via the internet. The Stack Overflow community recommends users to provide the related code snippet when they are creating a question to help others better understand it and offer their help. Previous studies have shown that} a significant number of these questions are of low-quality and not attractive to other potential experts in Stack Overflow. These poorly asked questions are less likely to receive useful answers and hinder the overall knowledge generation and sharing process. Considering one of the reasons for introducing low-quality questions in SO is that many developers may not be able to clarify and summarize the key problems behind their presented code snippets due to their lack of knowledge and terminology related to the problem, and/or their poor writing skills, in this study we propose an approach to assist developers in writing high-quality questions by automatically generating question titles for a code snippet using a deep sequence-to-sequence learning approach. Our approach is fully data-driven and uses an attention mechanism to perform better content selection, a copy mechanism to handle the rare-words problem and a coverage mechanism to eliminate word repetition problem. We evaluate our approach on Stack Overflow datasets over a variety of programming languages (e.g., Python, Java, Javascript, C# and SQL) and our experimental results show that our approach significantly outperforms several state-of-the-art baselines in both automatic and human evaluation. We have released our code and datasets to facilitate other researchers to verify their ideas and inspire the follow-up work.
