SENSORY: Leveraging Code Statement Sequence Information for Code Snippets Recommendation
Authors:
- 1 July 2019
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- Vol. 1, 27-36
Abstract
Software developers often have to implement unfamiliar programming tasks. When faced with these problems, developers often search online for code snippets as references to learn how to solve the unfamiliar tasks. In recent years, some researchers propose several approaches to use programming context to recommend code snippets. Most of these approaches use information retrieval based techniques and treat code snippets as a set of tokens. However, in code, the smallest meaningful unit is code statement, in general, the line of code. Since these studies did not consider this issue, there is still room for improvement in the code snippets recommendation. In this paper, we propose a code Statement sEquence iNformation baSed cOde snippets Recommendation sYstem (SENSORY). Different from existing token based approaches, SENSORY performs code snippets recommendation at code statement granularity. It uses the Burrows Wheeler Transform algorithm to search relevant code snippets, and uses the structure information to re-rank the results. To evaluate the effectiveness of our proposed method, we construct a code database with 1000000 real world code snippets which contain more than 15000000 lines of code. The experimental results show that SENSORY outperforms the two strong baseline work in terms of precision and NDCG.Keywords
This publication has 19 references indexed in Scilit:
- Supporting Software Developers with a Holistic Recommender System2017
- CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)2015
- Clone-based and interactive recommendation for modifying pasted code2015
- Context-Based Search, Recommendation and Browsing in Software Development2014
- On the Use of Context in Recommending Exception Handling Code Examples2014
- Optimizing a search-based code recommendation system2012
- Portfolio2011
- Analyzing and mining a code search engine usage logEmpirical Software Engineering, 2010
- Ultrafast and memory-efficient alignment of short DNA sequences to the human genomeGenome Biology, 2009
- Strathcona example recommendation tool2005