LANGUAGE-AGNOSTIC SOURCE CODE RETRIEVAL USING KEYWORD & IDENTIFIER LEXICAL PATTERN
Oscar Karnalim · International Journal of Computer Systems & Software Engineering · 2018
Despite the fact that source code retrieval is a promising mechanism to support software reuse, it suffers an emerging issue along with programming language development.Most of them rely on programming-language-dependent features to extract source code lexicons.Thus, each time a new programming language is developed, such retrieval system should be updated manually to handle that language.Such action may take a considerable amount of time, especially when parsing mechanism of such language is uncommon (e.g.Python parsing mechanism).To handle given issue, this paper proposes a source code retrieval approach which does not rely on programming-languagedependent features.Instead, it relies on Keyword & Identifier lexical pattern which is typically similar across various programming languages.Such pattern is adapted to four components namely tokenization, retrieval model, query expansion, and document enrichment.According to our evaluation, these components are effective to retrieve relevant source codes agnostically, even though the improvement for each component varies.