Font Size: a A A

Code Query Platform Based On MongoDB

Posted on:2016-12-13Degree:MasterType:Thesis
Country:ChinaCandidate:J Z ZhaoFull Text:PDF
GTID:2348330461457760Subject:Computer technology
Abstract/Summary:PDF Full Text Request
In the past decade,code-hosting repositories are growing prosperity.Github,SourceForge and BitBucket are the representatives.In order to reuse or analyze the open source code from these repositories,programmers have to do code query online first.However,most of these code-hosting repositories only provide keyword-matching code query.How to do code query at a semantic level becomes a problem which is badly in need of solution.Moreover,repositories are already heterogeneous because of the different version control systemsthey used,let alone the various programming languages.An efficient method is needed to make the semantic query effectively perform on these heterogeneous repositories.A typical solution is to store all the code from repositories into a database.MongoDB is a NoSQL database based on document data model.It has no schema so that data can be stored in a flexable structure.MongoDB is also easy to extend.It is particular suitable for the storage of heterogeneous source code,which usually has a complex structure and a changeable format.We select MongoDB as the storage platform and construct a sulation for query of heterogeneous open source code.First,we use FreeTXL and JDOM to transfer source code into JSON,which is the format that MongoDB stores data.Second,we define a general query language for object-oriented source code,named JINS+.It has good performance in attribute query and relation query of semantic code element.Third,we design an engine that parses the JINS+ statements into the queries that can be run on MongoDB,then return the results to users.
Keywords/Search Tags:Code Query, Code Query Language, MongoDB, Code Transformation, TXL
PDF Full Text Request
Related items