Aroma: code recommendation via structural code search

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,...

Full description

Saved in:
Bibliographic Details
Published in:Proceedings of ACM on programming languages Vol. 3; no. OOPSLA; pp. 1 - 28
Main Authors: Luan, Sifei, Yang, Di, Barnaby, Celeste, Sen, Koushik, Chandra, Satish
Format: Journal Article
Language:English
Published: 10.10.2019
ISSN:2475-1421, 2475-1421
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Abstract 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.
AbstractList 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.
Author Yang, Di
Chandra, Satish
Sen, Koushik
Barnaby, Celeste
Luan, Sifei
Author_xml – sequence: 1
  givenname: Sifei
  surname: Luan
  fullname: Luan, Sifei
  organization: Facebook, USA
– sequence: 2
  givenname: Di
  surname: Yang
  fullname: Yang, Di
  organization: University of California at Irvine, USA
– sequence: 3
  givenname: Celeste
  surname: Barnaby
  fullname: Barnaby, Celeste
  organization: Facebook, USA
– sequence: 4
  givenname: Koushik
  surname: Sen
  fullname: Sen, Koushik
  organization: University of California at Berkeley, USA
– sequence: 5
  givenname: Satish
  surname: Chandra
  fullname: Chandra, Satish
  organization: Facebook, USA
BookMark eNplj0tLxDAUhYOM4DgO_oXuXFWT3Nw2cTcMvmDAja5L5uYWK20jSUfw3_uYWYiuzll8HM53KmZjHFmIcyUvlTJ4BVBJrO2RmGtTY6mMVrNf_UQsc36VUioHxoKbC1ylOPjrgmLgIjHFYeAx-KmLY_He-SJPaUfTLvl-j2T2iV7OxHHr-8zLQy7E8-3N0_q-3DzePaxXm5JUDbZUELbM1GobgLEm0LpFx1twtqoskNISsZYafUDSBhyHSpKGgMab1ilYiHK_SynmnLhtqJt-zk3Jd32jZPOt3Ry0v_iLP_xb6gafPv6Rn5f_VqM
CitedBy_id crossref_primary_10_1109_ACCESS_2024_3488904
crossref_primary_10_1109_TSE_2022_3218859
crossref_primary_10_1162_qss_a_00167
crossref_primary_10_1145_3418463
crossref_primary_10_1145_3622815
crossref_primary_10_1007_s10664_025_10612_6
crossref_primary_10_1007_s11432_021_3665_1
crossref_primary_10_1145_3604905
crossref_primary_10_1016_j_eswa_2022_119477
crossref_primary_10_1109_TSE_2021_3074309
crossref_primary_10_1016_j_jss_2025_112481
crossref_primary_10_1145_3715108
crossref_primary_10_1007_s11432_023_4127_5
crossref_primary_10_1016_j_jss_2024_112204
crossref_primary_10_1145_3635439_3635446
crossref_primary_10_1007_s10664_022_10122_9
crossref_primary_10_25209_2079_3316_2022_13_1_3_33
crossref_primary_10_1016_j_infsof_2025_107837
crossref_primary_10_1145_3582569
crossref_primary_10_3390_a15010025
crossref_primary_10_1016_j_procs_2021_10_024
crossref_primary_10_1016_j_infsof_2021_106805
crossref_primary_10_1109_ACCESS_2025_3574462
crossref_primary_10_1007_s10515_025_00560_2
crossref_primary_10_1109_MS_2021_3061664
crossref_primary_10_1016_j_cola_2020_100998
crossref_primary_10_1007_s11219_025_09728_1
crossref_primary_10_25209_2079_3316_2022_13_1_35_62
crossref_primary_10_1109_TSE_2023_3338728
crossref_primary_10_7717_peerj_cs_737
crossref_primary_10_1007_s10664_024_10514_z
crossref_primary_10_1007_s10664_021_10000_w
crossref_primary_10_1145_3715774
crossref_primary_10_1109_TSE_2021_3053111
crossref_primary_10_1007_s10664_021_10040_2
crossref_primary_10_1109_TSE_2022_3192755
Cites_doi 10.1109/ASE.2004.1342740
10.1145/2884781.2884808
10.1145/1595696.1595728
10.1145/1321631.1321726
10.1145/2884781.2884877
10.1109/ASE.2008.42
10.1145/3211346.3211353
10.1145/2786805.2786855
10.1145/3133908
10.1145/1985793.1985809
10.1145/3236024.3236036
10.1007/s10664-017-9544-y
10.5555/2818754.2818860
10.1145/1985793.1985835
10.1145/2950290.2950333
10.1109/ASE.2015.51
10.1109/ICSE.2005.1553554
10.1145/2884781.2884873
10.1109/ASE.2015.42
10.1109/TSE.2011.84
10.1145/3236024.3236026
10.1109/APSEC.2002.1183002
10.1109/SANER.2018.8330216
10.1145/2393596.2393606
10.1145/3180155.3180187
10.1145/3180155.3180179
10.1145/1176617.1176671
10.1145/2970276.2970326
10.1145/1595696.1595767
10.1109/ICSE.2007.30
10.1109/TSE.2002.1019480
10.1109/ICPC.2011.26
10.1145/2568225.2568313
10.1007/978-1-4614-6596-6_6
10.1145/2884781.2884800
ContentType Journal Article
DBID AAYXX
CITATION
DOI 10.1145/3360578
DatabaseName CrossRef
DatabaseTitle CrossRef
DatabaseTitleList CrossRef
DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
EISSN 2475-1421
EndPage 28
ExternalDocumentID 10_1145_3360578
GroupedDBID AAKMM
AAYFX
AAYXX
ACM
AEFXT
AEJOY
AIKLT
AKRVB
ALMA_UNASSIGNED_HOLDINGS
CITATION
EBS
GUFHI
LHSKQ
M~E
OK1
ROL
ID FETCH-LOGICAL-c1738-13dbeecf28d3e57c322f59eb3986683c120557025ad5c2439ed60c23d54a4f913
ISSN 2475-1421
IngestDate Sat Nov 29 07:48:57 EST 2025
Tue Nov 18 21:09:17 EST 2025
IsDoiOpenAccess false
IsOpenAccess true
IsPeerReviewed true
IsScholarly true
Issue OOPSLA
Language English
LinkModel OpenURL
MergedId FETCHMERGED-LOGICAL-c1738-13dbeecf28d3e57c322f59eb3986683c120557025ad5c2439ed60c23d54a4f913
OpenAccessLink https://dl.acm.org/doi/pdf/10.1145/3360578
PageCount 28
ParticipantIDs crossref_citationtrail_10_1145_3360578
crossref_primary_10_1145_3360578
PublicationCentury 2000
PublicationDate 2019-10-10
PublicationDateYYYYMMDD 2019-10-10
PublicationDate_xml – month: 10
  year: 2019
  text: 2019-10-10
  day: 10
PublicationDecade 2010
PublicationTitle Proceedings of ACM on programming languages
PublicationYear 2019
References e_1_2_2_4_1
e_1_2_2_25_1
e_1_2_2_24_1
e_1_2_2_6_1
e_1_2_2_7_1
e_1_2_2_22_1
e_1_2_2_21_1
e_1_2_2_1_1
e_1_2_2_20_1
e_1_2_2_2_1
e_1_2_2_40_1
e_1_2_2_41_1
e_1_2_2_42_1
e_1_2_2_9_1
e_1_2_2_29_1
e_1_2_2_8_1
e_1_2_2_27_1
Salton Gerard (e_1_2_2_35_1) 1986
e_1_2_2_26_1
e_1_2_2_14_1
e_1_2_2_37_1
e_1_2_2_13_1
e_1_2_2_38_1
Raymond P. (e_1_2_2_3_1)
e_1_2_2_12_1
e_1_2_2_39_1
e_1_2_2_11_1
e_1_2_2_10_1
e_1_2_2_30_1
e_1_2_2_31_1
e_1_2_2_19_1
e_1_2_2_32_1
e_1_2_2_18_1
e_1_2_2_33_1
Zhong Hao (e_1_2_2_43_1) 2009
e_1_2_2_17_1
e_1_2_2_34_1
e_1_2_2_16_1
e_1_2_2_15_1
e_1_2_2_36_1
Nguyen Anh Tuan (e_1_2_2_23_1)
Porter M. F. (e_1_2_2_28_1)
Chatterjee Shaunak (e_1_2_2_5_1) 2009
References_xml – ident: e_1_2_2_7_1
  doi: 10.1109/ASE.2004.1342740
– ident: e_1_2_2_29_1
  doi: 10.1145/2884781.2884808
– ident: e_1_2_2_40_1
– volume-title: Readings in Information Retrieval
  ident: e_1_2_2_28_1
– volume-title: MAPO: Mining and Recommending API Usage Patterns. In ECOOP 2009 – Object-Oriented Programming , Sophia Drossopoulou (Ed.). Springer Berlin Heidelberg
  year: 2009
  ident: e_1_2_2_43_1
– volume-title: SNIFF: A Search Engine for Java Using Free-Form Queries. In Fundamental Approaches to Software Engineering
  year: 2009
  ident: e_1_2_2_5_1
– ident: e_1_2_2_2_1
  doi: 10.1145/1595696.1595728
– ident: e_1_2_2_27_1
– ident: e_1_2_2_14_1
  doi: 10.1145/1321631.1321726
– ident: e_1_2_2_34_1
  doi: 10.1145/2884781.2884877
– ident: e_1_2_2_30_1
  doi: 10.1109/ASE.2008.42
– ident: e_1_2_2_31_1
  doi: 10.1145/3211346.3211353
– ident: e_1_2_2_32_1
  doi: 10.1145/2786805.2786855
– volume-title: Proceedings of the 34th International Conference on Software Engineering (ICSE ’12)
  ident: e_1_2_2_3_1
– ident: e_1_2_2_15_1
  doi: 10.1145/3133908
– ident: e_1_2_2_19_1
  doi: 10.1145/1985793.1985809
– ident: e_1_2_2_24_1
  doi: 10.1145/3236024.3236036
– ident: e_1_2_2_36_1
  doi: 10.1007/s10664-017-9544-y
– ident: e_1_2_2_20_1
  doi: 10.5555/2818754.2818860
– ident: e_1_2_2_11_1
  doi: 10.1145/1985793.1985835
– volume-title: Proceedings of the 34th International Conference on Software Engineering (ICSE ’12)
  ident: e_1_2_2_23_1
– volume-title: McGill
  year: 1986
  ident: e_1_2_2_35_1
– ident: e_1_2_2_22_1
  doi: 10.1145/2950290.2950333
– ident: e_1_2_2_17_1
  doi: 10.1109/ASE.2015.51
– ident: e_1_2_2_8_1
  doi: 10.1109/ICSE.2005.1553554
– ident: e_1_2_2_26_1
  doi: 10.1145/2884781.2884873
– ident: e_1_2_2_16_1
  doi: 10.1109/ASE.2015.42
– ident: e_1_2_2_18_1
  doi: 10.1109/TSE.2011.84
– ident: e_1_2_2_33_1
  doi: 10.1145/3236024.3236026
– ident: e_1_2_2_39_1
  doi: 10.1109/APSEC.2002.1183002
– ident: e_1_2_2_21_1
  doi: 10.1109/SANER.2018.8330216
– ident: e_1_2_2_4_1
  doi: 10.1145/2393596.2393606
– ident: e_1_2_2_12_1
  doi: 10.1145/3180155.3180187
– ident: e_1_2_2_41_1
  doi: 10.1145/3180155.3180179
– ident: e_1_2_2_1_1
  doi: 10.1145/1176617.1176671
– ident: e_1_2_2_42_1
  doi: 10.1145/2970276.2970326
– ident: e_1_2_2_25_1
  doi: 10.1145/1595696.1595767
– ident: e_1_2_2_9_1
  doi: 10.1109/ICSE.2007.30
– ident: e_1_2_2_10_1
  doi: 10.1109/TSE.2002.1019480
– ident: e_1_2_2_6_1
  doi: 10.1109/ICPC.2011.26
– ident: e_1_2_2_37_1
  doi: 10.1145/2568225.2568313
– ident: e_1_2_2_13_1
  doi: 10.1007/978-1-4614-6596-6_6
– ident: e_1_2_2_38_1
  doi: 10.1145/2884781.2884800
SSID ssj0001934839
Score 2.4960797
Snippet 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...
SourceID crossref
SourceType Enrichment Source
Index Database
StartPage 1
Title Aroma: code recommendation via structural code search
Volume 3
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
journalDatabaseRights – providerCode: PRVHPJ
  databaseName: ROAD: Directory of Open Access Scholarly Resources
  customDbUrl:
  eissn: 2475-1421
  dateEnd: 99991231
  omitProxy: false
  ssIdentifier: ssj0001934839
  issn: 2475-1421
  databaseCode: M~E
  dateStart: 20170101
  isFulltext: true
  titleUrlDefault: https://road.issn.org
  providerName: ISSN International Centre
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV1LT9tAEF6lwKGXtvSh0lLkQ9VLZMi-bG9vIS1CApJIUCm3yNldCwviIPIQp_72zj6ycUIl6KEXK1rNRrHn8zezk3kg9DXBmVScFXGe0yJmMiHwSjEcC7CeUik4UOjCDptIu91sMBD9RmOxrIVZ3KZVlT08iLv_qmpYA2Wb0tl_UHf4UliAz6B0uILa4fosxbfvJ2M7cMdUqzfNgXc81n50UnNR5k3XMta227AitXiW91L7warZRI9258L8p-BTucYmuLAMcwaP_HzuI6lloctAJT4Y_SOsHOdwA76ZJxi86Szg6tLx39lkPr0ub-rBCCwMi_u0VMtZhKU8xswVPR_qv6x50qU1bPV6_cvzdo1Fcc0cu9Lxx0TPTE8MSuE05kYArbfS3jBxIfHQlWHzod_4Am2TlAuTCnjxuxabE5Rldghd-O2u3trsPfJ7a45MzSO5eoNe-aNE1HYQ2EUNXb1Fr5djOiLP2u8Qt4j4HhllR-t4iAAP0QoPTsTh4T36dfLzqnMa-2kZscQpWC1M1UhrWZBMUc1TCUxdcKFHVGRJklGJiW23RniuuCTgh2qVtCSh8KbmrBCYfkBb1aTSH1FECk1VK8-zRBMGe0ZMMqZbWAnaGgkq99C35a0PpW8lbyaa3A43nu8eioLgneuesiny6WmRz-jlCmv7aAueiv6CduRiVk7vD6zq_gCPwl_e
linkProvider ISSN International Centre
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Aroma%3A+code+recommendation+via+structural+code+search&rft.jtitle=Proceedings+of+ACM+on+programming+languages&rft.au=Luan%2C+Sifei&rft.au=Yang%2C+Di&rft.au=Barnaby%2C+Celeste&rft.au=Sen%2C+Koushik&rft.date=2019-10-10&rft.issn=2475-1421&rft.eissn=2475-1421&rft.volume=3&rft.issue=OOPSLA&rft.spage=1&rft.epage=28&rft_id=info:doi/10.1145%2F3360578&rft.externalDBID=n%2Fa&rft.externalDocID=10_1145_3360578
thumbnail_l http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=2475-1421&client=summon
thumbnail_m http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=2475-1421&client=summon
thumbnail_s http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=2475-1421&client=summon