How Close Is ChatGPT to Developer Judgment? A Study on Stack Overflow Java Questions - Reis, Felipe Augusto Guimarães; Maia, Marcelo A.; Dantas, Carlos Eduardo C. (Anais Estendidos do Congresso Brasileiro de Software: Teoria e Prática (CBSoft); 2025: Anais Estendidos do XVI Congresso Brasileiro de Software: Teoria e PráticaDO - 10.5753/cbsoft_estendido.2025.14164, 2025)
Software developers often seek assistance on platforms such as Stack Overflow. However, with the emergence of Large Language Models (LLMs) such as ChatGPT, the way developers seek help online is gradually changing. This shift does not necessarily guarantee the accuracy of the information provided, as LLMs can have a limitation to accurately understand complex domain-specific content leading to incorrect responses. This study aims to evaluate how closely ChatGPT’s choices align with those of the Stack Overflow users in accurately addressing technical questions. For this purpose, 776 Java-related questions were selected from Stack Overflow. ChatGPT was asked to analyze five provided answers from Stack Overflow users for each question and identify the one it considered most accurate. The results show that ChatGPT identifies the accepted answer by the Stack Overflow users in 56% of the cases. In the 44% of cases where ChatGPT diverged from the accepted answer, manual analysis revealed that its selected answer was still technically accurate in many instances, although it was not marked as accepted on Stack Overflow. In particular, 31% of these divergent choices were posted after Stack Overflow users had already chosen the accepted one. This suggests that some questions on Stack Overflow may have multiple valid answers, including more recent ones that are as accurate as the accepted answer displayed at the top of the page.