Predicting the Programming Language of Questions and Snippets of StackOverflow Using Natural Language Processing
Stack Overflow is the most popular Q&A website among software developers. As a platform for knowledge sharing and acquisition, the questions posted in Stack Overflow usually contain a code snippet. Stack Overflow relies on users to properly tag the programming language of a question and it simply assumes that the programming language of the snippets inside a question is the same as the tag of the question itself. In this paper, we propose a classifier to predict the programming language of questions posted in Stack Overflow using Natural Language Processing (NLP) and Machine Learning (ML). The classifier achieves an accuracy of 91.1% in predicting the 24 most popular programming languages by combining features from the title, body and the code snippets of the question. We also propose a classifier that only uses the title and body of the question and has an accuracy of 81.1%. Finally, we propose a classifier of code snippets only that achieves an accuracy of 77.7%. These results show that deploying Machine Learning techniques on the combination of text and the code snippets of a question provides the best performance. These results demonstrate also that it is possible to identify the programming language of a snippet of few lines of source code. We visualize the feature space of two programming languages Java and SQL in order to identify some special properties of information inside the questions in Stack Overflow corresponding to these languages.
Code (0)
등록된 구현이 없습니다.
Tasks
BIG-bench Machine LearningTAGSimilar Papers 제목 키워드 기반
Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answers
Sonatype's 2023 report found that 97% of developers and security leads integrate generative Artificial Intelligence (AI), particularly Large Language Models (LLMs), into their development process. Concerns about the secu…
Code and Named Entity Recognition in StackOverflow
There is an increasing interest in studying natural language and computer code together, as large corpora of programming texts become readily available on the Internet. For example, StackOverflow currently has over 15 mi…
named-entity-recognitionNamed Entity RecognitionNamed Entity Recognition (NER)NERStackOverflowVQA: Stack Overflow Visual Question Answering Dataset
In recent years, people have increasingly used AI to help them with their problems by asking questions on different topics. One of these topics can be software-related and programming questions. In this work, we focus on…
Question AnsweringSentenceVisual Question AnsweringVisual Question Answering (VQA)Predicting the quality of questions on Stackoverflow
Text Classification for Task-based Source Code Related Questions
There is a key demand to automatically generate code for small tasks for developers. Websites such as StackOverflow provide a simplistic way by offering solutions in small snippets which provide a complete answer to what…
ClassificationQuestion Answeringtext-classificationText Classification