Aftab Hussain
University of Houston

From Query to Usable Code in Stack Overflow

Di Yang, Aftab Hussain, Cristina Lopes
Mondego Group
Bren School of Information and Computer Sciences
University of California, Irvine
Supported by National Science Foundation
2013 to 2015

Return to Projects

Besides being useful for software developers, annotated Stack Overflow snippets can potentially serve as the basis for automated tools that provide working code solutions to specific natural language queries. Towards this goal, we investigated the compilability of Stack Overflow code snippets. A total of 3 million code snippets were analyzed across four languages: C#, Java, JavaScript, and Python. Python and JavaScript proved to be the languages for which the most code snippets are usable. Conversely, Java and C# proved to be the languages with the lowest usability rate.


Download:
Paper