Font Size: a A A

Research On Search Based Code Recommendation Techniques

Posted on:2016-06-05Degree:MasterType:Thesis
Country:ChinaCandidate:F LvFull Text:PDF
GTID:2308330476953475Subject:Software engineering
Abstract/Summary:PDF Full Text Request
A crucial problem in software engineering is how to improve the efficiency of software development. Software and code reuse become more and more important with the popularity of Web and open source software on improving the efficiency of software development. According to the research, developers spend many time on searching software or code on the web for reusing. So code search techniques get more and more attentions from researchers recently.There are many research achievements in code search. Some of them have ability to search large-scale codebase in a relatively high efficiency by using information retrieval technique. Though previous researches have attempted all kinds of method to improve the accuracy of code search results, the effect is not good enough. This thesis proposes an effective code search algorithm which aims at the shortage of the previous work, and implements a code recommendation tool based on the proposed algorithm. At the same time, the thesis approves the effective of the algorithm by doing the compare experiments.At first, aiming at the problem of low accuracy of existing method, the thesis proposes a query analysis and Extended Boolean model based code search algorithm, and introduces it in three main aspects. For the presentation of the source code, this thesis first distinguishes the features of source code, and then parses the source code and indexes the features. And for the queries, the thesis proposes a kind of analysis method to analyze the relationship between the queries and the APIs. After getting the relevant APIs, the thesis constructs the query expression which can improve the code search results by combining them and the query words. In rank stage, the thesis applies the Extended Boolean model to calculate the similarity between the queries and the code snippets. Then rank the results by using the similar score.Then the thesis implements a C# code recommendation tool which is called CodeHow and based on the proposed code search algorithm. In order to solve the code clone problem, a SimHash based code clone detection method is proposed. At the same time, the thesis uses slicing technique to simplify the code. It removes the redundant part of the code.At last, the thesis designs multiple in-house experiments and user study to evaluate the effectiveness of the CodeHow. The experiment results indicate that CodeHow can achieve a relatively high accuracy which approves the effective of the algorithm. And in user study experiment, the thesis lets the participants to complete the three real programming tasks by using CodeHow. After completing the programming tasks the participants need to fill a questionnaire. The questionnaire shows that CodeHow can help developers programming.
Keywords/Search Tags:code search, code recommendation, information retrieval model, code clone, program slicing
PDF Full Text Request
Related items