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.
- Compiled 300,000+ StackOverflow Java snippets. Designed and implemented automatic repair heuristics to improve their parse rate from 6.22% to 19.24%.
- Accepted in 13th International Conference on Mining Software Repositories (MSR) 2016, Austin, Texas.
Download:
Paper