Aug 23, 2019

Stack Overflow introduces CROKAGE, also known as the Crowd Knowledge Answer Generator, to experiment with search

Stack Overflow introduced a new experimental tool, developed by a group of computer science researchers at the University of Saskatchewan and University of Uberlandia, that helps users find answers to their coding questions more easily. Dubbed CROKAGE (Crowd Knowledge Answer Generator), the new tool takes the description of a programming task and provides relevant programming solutions generated from Stack Overflow that include both code snippets and explanations.

Developers often have to browse dozens of answers on Stack Overflow to synthesize a full solution to their coding problem. The process of finding answers to coding questions is only growing more complex: Stack Overflow is home to a staggering 27 million answers generated by roughly 100 million users. Despite the large amount of knowledge available, developers are impaired by a lexical gap between their searches, which are task descriptions written in English or another spoken language, and actual lines of code. CROKAGE seeks to find the fastest path from a quick search to implementable code.

CROKAGE search results are ranked by relevance and structure: answers with code snippets and code explanations are heavily favored by the search algorithm. Better natural language skills, too, achieved by including function terms from open source libraries in the search engine’s corpus, ensures questions are more clearly and thoroughly understood.

CROKAGE, however, is more than a search tool; it is a knowledge generator. CROKAGE not only understands developers’ questions better, its algorithms actually piece together a coherent and concise answer. CROKAGE collects programming functions that (potentially) implement the requested programming task and includes short explanations, discarding trivial and valueless sentences from answers on Stack Overflow. While better search capabilities remedy only half of the developer knowledge gap, better answers is the key to making knowledge on Stack Overflow more accessible and powerful.

Whereas other tools, like code suggestions, are most useful for boilerplate, repetitive coding, Stack Overflow offers a richer data set that bridges the gap between English (or another spoken language) and code. CROKAGE, however, is still in its early stages of development. The tool is limited to Java queries, with the goal of expanding language coverage in the future. And, if a query is poorly formulated, CROKAGE offers no suggestions on how to improve it. CROKAGE, however, offers a glimpse into the future where artificial intelligence can better parse and present programming knowledge.

Want to get more of these in your inbox?

Subscribe for weekly updates from the Software team.