An Old Problem with a New Therapy: Coupling Topic Modeling and Mining Sequential Patterns in Recommending Source Code

Dinh-Thuan Le, Lam-Son Lê, Nam Thoai, Trung-Viet Nguyen · 2018

With the public repository of software code on the rise, programmers expect to be able to obtain a relevant exemplary source code for speeding up their software development project or bootstrapping their code base. This practice also facilitates the programming learning curve, i.e., programming by examples. Recommending appropriate source code that best matches the programmers' intention is crucial to the success of their project. State-of-the-art in this area ranges from plain techniques of keyword matching, measuring the relevance of source code modules based on their inter-dependency, to customizing the PageRank algorithms for scoring the appropriateness of the targeted source code files. In this paper, we propose a novel search engine for source code modules that takes into account both domain keywords (e.g., healthcare) and API functions (e.g., digitalRead). Our search engine involves ranking a list of selected source code files relative to an ordered list of API functions entered by the programmer. We mine all possible sequential patterns of API functions out of a pre-built repository of source code. Patterns that are relevant to the input API functions would serve as a grid for scoring the appropriateness of source code files being considered. We demonstrate our recommendation system with software code for programming in the Internet of Things, Arduino, in particular.

Read the paper · More papers on PaperTik