A Similarity-Based Method Retrieval Technique to Improve Effectiveness in Code Search

Abdus Satter, Kazi Muheymin Sakib · 2017

The effectiveness of a code search engine is reduced if semantically similar code fragments are not indexed under common and proper terms. In this paper, a technique named Feature-Wise Similar Method Finder (FWSMF) is proposed which checks functional similarity among codes by executing and matching outputs against the same set of inputs. It then determines appropriate index terms by finding keywords that are found in most of the code snippets. As a result, code fragments that contain different keywords but implement the same feature, can be retrieved all together. Experimental analysis shows that on an average, FWSMF produces 61% and 29% more precision than two existing techniques named Keyword Based Code Search (KBCS) and Interface Driven Code Search (IDCS) respectively. It also shows 34% and 55% more recall than KBCS and IDCS correspondingly. It retrieves self executable code snippets which can be easily pluggable in the intended development context and thus reduces time and effort while reusing code.

Read the paper · More papers on PaperTik