What kind of questions do developers ask on Stack Overflow? A comparison of automated approaches to classify posts into question categories
Autor: | Stefanie Beyer, Martin Pinzger, Massimiliano Di Penta, Christian Macho |
---|---|
Rok vydání: | 2019 |
Předmět: |
Computer science
business.industry Stack Overflow Recommender system Classification computer.software_genre Random forest Support vector machine Ask price Question Categories Preprocessor Regular expression Artificial intelligence Precision and recall business Program Understanding computer Classifier (UML) Software Natural language processing |
Zdroj: | Empirical Software Engineering. 25:2258-2301 |
ISSN: | 1573-7616 1382-3256 |
DOI: | 10.1007/s10664-019-09758-x |
Popis: | On question and answer sites, such as Stack Overflow (SO), developers use tags to label the content of a post and to support developers in question searching and browsing. However, these tags mainly refer to technological aspects instead of the purpose of the question. Tagging questions with their purpose can add a new dimension to the identification of discussed topics in posts on SO. In this paper, we aim at automating the classification of SO question posts into seven question categories. As a first step, we harmonized existing taxonomies of question categories and then, we manually classified 1,000 SO questions according to our new taxonomy. Additionally to the question category, we marked the phrases that indicate a question category for each of the posts. We then use this data set to automate the classification of posts using two approaches. For the first approach, we manually analyzed the phrases to find patterns. Based on regular expressions, we implemented a classifier, for each of the categories, that determines whether a post belongs to a category. These regular expressions are derived by analyzing patterns in the phrases. In the second approach, we use the curated data set to train classification models of supervised machine learning algorithms (Random Forest and Support Vector Machines). For the machine learning algorithms, we experimented with 1,312 different configurations regarding the preprocessing of the text and the representation of the input data. Then, we compared the performance of the regex approach with the performance of the best configuration that uses machine learning algorithms on a validation set of 110 posts. The results show that using the regular expression approach, we can classify posts into the correct question category with an average precision and recall of 0.90, and an MCC of 0.68. Additionally, we applied the regex approach on all questions of SO that deal with Android app development and investigated the co-occurrence of question categories in posts. We found that the categories API usage, Conceptual, and Discrepancy are the most frequently assigned question categories and that they also occur together frequently. Our approach can be used to support developers in browsing SO discussions or researchers in building recommender systems based on SO. |
Databáze: | OpenAIRE |
Externí odkaz: |