Aroma: code recommendation via structural code search
By Sifei Luan, Di Yang, Koushik Sen, Satish Chandra. 2018
171 citations recorded by the source corpus.
Programmers often write code that has similarity to existing code written somewhere. A tool that could help programmers to search such similar code would be immensely useful. Such a tool could help programmers to extend partially written code snippets to completely implement necessary functionality, help to discover extensions to the partial code which are commonly included by other programmers, help to cross-check against similar code written by other programmers, or help to add extra code which would fix common mistakes and errors. We propose Aroma, a tool and technique for code recommendation via structural code search. Aroma indexes a huge code corpus including thousands of open-source projects, takes a partial code snippet as input, searches the corpus for method bodies containing the partial code snippet, and clusters and intersects the results of the search to recommend a small set of succinct code snippets which both contain the query snippet and appear as part of several methods in the corpus. We evaluated Aroma on 2000 randomly selected queries created from the corpus, as well as 64 queries derived from code snippets obtained from Stack Overflow, a popular website for discussing code. We implemented Aroma for 4 different languages, and developed an IDE plugin for Aroma. Furthermore, we conducted a study where we asked 12 programmers to complete programming tasks using Aroma, and collected their feedback. Our results indicate that Aroma is capable of retrieving and recommending relevant code snippets efficiently.
Subfields: Computer Science Applications, Information Systems, Software, Code Generation & Program Synthesis, Software Engineering
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Computer Science Applications
In Information Systems
- Sarah Nadi
- Hongyu Li
- Satish Chandra
- Seohyun Kim
- Saurabh Pujar
- Pradeep K. Dubey
- Koushik Sen
- Ulrich Finkler
In Software
- Sarah Nadi
- Satish Chandra
- Seohyun Kim
- Hongyu Li
- Saurabh Pujar
- Koushik Sen
- Ulrich Finkler
- Mihir R. Choudhury
In Code Generation & Program Synthesis
In Software Engineering
Citations in the corpus
- TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Search (2020, unknown): “[60] proposed Aroma, which takes a code snippet as input, assembles a list of method bodies that contain the snippet, clusters and inter-”
- An Empirical Evaluation of GitHub Copilot's Code Suggestions (2022, background): “There has been lots of research dedicated to improving developer productivity through code synthesis, code search, or other types of code recommender systems [2, 4, 20, 25].”
- MISIM: An End-to-End Neural Code Similarity System (2020, methodology): “Although research in the space of code similarity is still in the early stages, there is a growing body of exploratory work in this area [5,10,23,26,29].”
- Project CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Tasks (2021, methodology): “Finally, we adopt Aroma’s [23] naming convention: leaf nodes are named by their literal strings and internal nodes are named by a concatenation of their children’s names (only reserved words are kept while others are replaced by a hash mark # ).”
- CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Tasks (2021, methodology): “Finally, we adopt Aroma’s [27] naming convention: leaf nodes are named by”
- When deep learning met code search (2019, methodology): “Our pipeline employs a similarity metric [22] between search results and a ground truth code snippet to assess whether a query was correctly answered.”