On the Design of a Code-to-Code Search Engine

This thesis focuses on the task of code search, aiming to address the challenge of locating all (or only the top-k) code snippets within a repository that are syntactically or semantically similar to a given query. Traditional code search methods often rely on syntactic matching, which is useful but limited in capturing deeper semantic relationships between code fragments. The goal is to develop a search engine that leverages machine learning models to tackle the similarity search problem. The benefits of this implementation can significantly improve developers' productivity by reducing the time and effort needed to find similar code snippets. More accurate and relevant results allow programmers to identify reusable components and integrate solutions into their projects. This also enhances code quality, as developers can learn from well-structured, tested, and documented snippets. This work is part of a larger project involving three key partners: HuggingFace, Software Heritage, and the University of Bologna, aiming to design an advanced code-to-code search engine based on code embedding techniques capable of efficiently retrieving similar code snippets from various repositories and programming languages.

Publication Details

Journal
Electronic Theses and Dissertations Repository (University of Pisa)
Published
2025-02-23
Primary Topic
Magnetic confinement fusion research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

On the Design of a Code-to-Code Search Engine

Electronic Theses and Dissertations Repository (University of Pisa)
Magnetic confinement fusion research
article

On the Design of a Code-to-Code Search Engine

article en

Abstract

This thesis focuses on the task of code search, aiming to address the challenge of locating all (or only the top-k) code snippets within a repository that are syntactically or semantically similar to a given query. Traditional code search methods often rely on syntactic matching, which is useful but limited in capturing deeper semantic relationships between code fragments. The goal is to develop a search engine that leverages machine learning models to tackle the similarity search problem. The benefits of this implementation can significantly improve developers' productivity by reducing the time and effort needed to find similar code snippets. More accurate and relevant results allow programmers to identify reusable components and integrate solutions into their projects. This also enhances code quality, as developers can learn from well-structured, tested, and documented snippets. This work is part of a larger project involving three key partners: HuggingFace, Software Heritage, and the University of Bologna, aiming to design an advanced code-to-code search engine based on code embedding techniques capable of efficiently retrieving similar code snippets from various repositories and programming languages.

Electronic Theses and Dissertations Repository (University of Pisa)
Openalex Percentile: Top 34%
Magnetic confinement fusion research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.