Background: Stack Overflow has been the first website developers look for to find their answers. Many questions asked on Stack Overflow has several answers but doesn’t have an accepted answer. This leaves all the answers untrustworthy and makes people doubt their correctness. In these scenarios, mostly the questioner hasn’t found their desired answer. But, in some cases, the questioner either somehow forgets to mark an answer as the accepted answer or just doesn’t know how to do so. This causes people with the same question to lose their trust in the existing unaccepted answers and spend more time searching online for the solution.
Aim: We aim to improve Stack Overflow by detecting the potential solution to questions with no accepted answers. Specifically, our proposed method looks through all submitted answers and marks one as the potential solution. This helps the questioner find and Stack Overflow to suggest the best answer.
Method: In this paper, we used text mining to extract 13 different features from 15464 questions, 37275 answers, and 72025 comments of Stack Overflow posts and then learned them by machine learning models and predicted if an answer is the accepted answer or not. This approach only used English texts from a post.
Results: Our method resulted best with the Adaboost ensemble model with 71% accuracy and 70% F1-score. The results show this problem can be addressed and Stack Overflow posts can be learned by machine learning and lead us to find the best answer.