Code Similarity Search in a Latent Space
dc.contributor.advisor | Jermaine, Christopher | en_US |
dc.creator | Qi, Letao | en_US |
dc.date.accessioned | 2017-08-01T16:39:58Z | en_US |
dc.date.available | 2017-08-01T16:39:58Z | en_US |
dc.date.created | 2017-05 | en_US |
dc.date.issued | 2017-04-21 | en_US |
dc.date.submitted | May 2017 | en_US |
dc.date.updated | 2017-08-01T16:39:58Z | en_US |
dc.description.abstract | A huge database of program source codes that supports fast search via code similarity would be useful for several applications, including automated program synthesis and debugging, and user-facing code search in an integrated development environment. Here, "similar" is defined with respect to a set of application-defined similarity functions. The key difficulty in realizing this goal is that standard database indexing techniques cannot be applied to the problem of querying based on arbitrary similarity functions. To address this difficulty, I propose a dictionary-based approach where I represent each piece of code by a vector of similarities to a set of example database codes. Cosine similarity between the vector representing a query code and the vector representing a database code can be used to measure closeness. However, the dictionary may need to be very high dimensional if the goal is to accurately index a wide variety of database codes. Hence, I explore the idea of using projection matrix to the reduce dimensionality of the problem. One approach is to use random projection. The other approach that I explore is learning the projection matrix by developing a machine learning algorithm that is supervised using the text/code pairs provided by StackOverflow, a question-answering website for programmers. | en_US |
dc.format.mimetype | application/pdf | en_US |
dc.identifier.citation | Qi, Letao. "Code Similarity Search in a Latent Space." (2017) Master’s Thesis, Rice University. <a href="https://hdl.handle.net/1911/96022">https://hdl.handle.net/1911/96022</a>. | en_US |
dc.identifier.uri | https://hdl.handle.net/1911/96022 | en_US |
dc.language.iso | eng | en_US |
dc.rights | Copyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder. | en_US |
dc.subject | code similarity search | en_US |
dc.subject | latent space | en_US |
dc.title | Code Similarity Search in a Latent Space | en_US |
dc.type | Thesis | en_US |
dc.type.material | Text | en_US |
thesis.degree.department | Computer Science | en_US |
thesis.degree.discipline | Engineering | en_US |
thesis.degree.grantor | Rice University | en_US |
thesis.degree.level | Masters | en_US |
thesis.degree.name | Master of Science | en_US |
Files
Original bundle
1 - 1 of 1