Journal Title
Title of Journal: Empir Software Eng
|
Abbravation: Empirical Software Engineering
|
|
|
|
|
Authors: Haoran Niu Iman Keivanloo Ying Zou
Publish Date: 2016/01/21
Volume: 22, Issue: 1, Pages: 259-291
Abstract
Source code examples are used by developers to implement unfamiliar tasks by learning from existing solutions To better support developers in finding existing solutions code search engines are designed to locate and rank code examples relevant to user’s queries Essentially a code search engine provides a ranking schema which combines a set of ranking features to calculate the relevance between a query and candidate code examples Consequently the ranking schema places relevant code examples at the top of the result list However it is difficult to determine the configurations of the ranking schemas subjectively In this paper we propose a code example search approach that applies a machine learning technique to automatically train a ranking schema We use the trained ranking schema to rank candidate code examples for new queries at runtime We evaluate the ranking performance of our approach using a corpus of over 360000 code snippets crawled from 586 opensource Android projects The performance evaluation study shows that the learningtorank approach can effectively rank code examples and outperform the existing ranking schemas by about 3565 and 4842 in terms of normalized discounted cumulative gain NDCG and expected reciprocal rank ERR measures respectively
Keywords:
.
|
Other Papers In This Journal:
|