Loading…
Clone-Seeker: Effective Code Clone Search Using Annotations
Source code search plays an important role in software development, e.g. for exploratory development or opportunistic reuse of existing code from a code base. Often, exploration of different implementations with the same functionality is needed for tasks like automated software transplantation, soft...
Saved in:
Published in: | arXiv.org 2021-06 |
---|---|
Main Authors: | , , , |
Format: | Article |
Language: | English |
Subjects: | |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
cited_by | |
---|---|
cites | |
container_end_page | |
container_issue | |
container_start_page | |
container_title | arXiv.org |
container_volume | |
creator | Hammad, Muhammad Babur, Önder Hamid Abdul Basit van den Brand, Mark |
description | Source code search plays an important role in software development, e.g. for exploratory development or opportunistic reuse of existing code from a code base. Often, exploration of different implementations with the same functionality is needed for tasks like automated software transplantation, software diversification, and software repair. Code clones, which are syntactically or semantically similar code fragments, are perfect candidates for such tasks. Searching for code clones involves a given search query to retrieve the relevant code fragments. We propose a novel approach called Clone-Seeker that focuses on utilizing clone class features in retrieving code clones. For this purpose, we generate metadata for each code clone in the form of a natural language document. The metadata includes a pre-processed list of identifiers from the code clones augmented with a list of keywords indicating the semantics of the code clone. This keyword list can be extracted from a manually annotated general description of the clone class, or automatically generated from the source code of the entire clone class. This approach helps developers to perform code clone search based on a search query written either as source code terms, or as natural language. In our quantitative evaluation, we show that (1) Clone-Seeker has a higher recall when searching for semantic code clones (i.e., Type-4) in BigCloneBench than the state-of-the-art; and (2) Clone-Seeker can accurately search for relevant code clones by applying natural language queries. |
format | article |
fullrecord | <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_2538880896</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2538880896</sourcerecordid><originalsourceid>FETCH-proquest_journals_25388808963</originalsourceid><addsrcrecordid>eNqNirEKwjAUAIMgWLT_EHAOxMTUqJOUint1LqG-aGp50ST1-63gB7jcDXcTkgkpV0yvhZiRPMaOcy6KjVBKZmRf9h6B1QAPCDtaWQttcm-gpb-O-EZagwntnV6iwxs9IPpkkvMYF2RqTR8h_3lOlsfqXJ7YM_jXADE1nR8CjqkRSmqtud4W8r_rA5iQNpA</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2538880896</pqid></control><display><type>article</type><title>Clone-Seeker: Effective Code Clone Search Using Annotations</title><source>ProQuest - Publicly Available Content Database</source><creator>Hammad, Muhammad ; Babur, Önder ; Hamid Abdul Basit ; van den Brand, Mark</creator><creatorcontrib>Hammad, Muhammad ; Babur, Önder ; Hamid Abdul Basit ; van den Brand, Mark</creatorcontrib><description>Source code search plays an important role in software development, e.g. for exploratory development or opportunistic reuse of existing code from a code base. Often, exploration of different implementations with the same functionality is needed for tasks like automated software transplantation, software diversification, and software repair. Code clones, which are syntactically or semantically similar code fragments, are perfect candidates for such tasks. Searching for code clones involves a given search query to retrieve the relevant code fragments. We propose a novel approach called Clone-Seeker that focuses on utilizing clone class features in retrieving code clones. For this purpose, we generate metadata for each code clone in the form of a natural language document. The metadata includes a pre-processed list of identifiers from the code clones augmented with a list of keywords indicating the semantics of the code clone. This keyword list can be extracted from a manually annotated general description of the clone class, or automatically generated from the source code of the entire clone class. This approach helps developers to perform code clone search based on a search query written either as source code terms, or as natural language. In our quantitative evaluation, we show that (1) Clone-Seeker has a higher recall when searching for semantic code clones (i.e., Type-4) in BigCloneBench than the state-of-the-art; and (2) Clone-Seeker can accurately search for relevant code clones by applying natural language queries.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Annotations ; Fragments ; Metadata ; Natural language ; Searching ; Semantics ; Software development ; Source code ; Transplantation</subject><ispartof>arXiv.org, 2021-06</ispartof><rights>2021. This work is published under http://creativecommons.org/licenses/by-nc-sa/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktohtml>$$Uhttps://www.proquest.com/docview/2538880896?pq-origsite=primo$$EHTML$$P50$$Gproquest$$Hfree_for_read</linktohtml><link.rule.ids>780,784,25752,37011,44589</link.rule.ids></links><search><creatorcontrib>Hammad, Muhammad</creatorcontrib><creatorcontrib>Babur, Önder</creatorcontrib><creatorcontrib>Hamid Abdul Basit</creatorcontrib><creatorcontrib>van den Brand, Mark</creatorcontrib><title>Clone-Seeker: Effective Code Clone Search Using Annotations</title><title>arXiv.org</title><description>Source code search plays an important role in software development, e.g. for exploratory development or opportunistic reuse of existing code from a code base. Often, exploration of different implementations with the same functionality is needed for tasks like automated software transplantation, software diversification, and software repair. Code clones, which are syntactically or semantically similar code fragments, are perfect candidates for such tasks. Searching for code clones involves a given search query to retrieve the relevant code fragments. We propose a novel approach called Clone-Seeker that focuses on utilizing clone class features in retrieving code clones. For this purpose, we generate metadata for each code clone in the form of a natural language document. The metadata includes a pre-processed list of identifiers from the code clones augmented with a list of keywords indicating the semantics of the code clone. This keyword list can be extracted from a manually annotated general description of the clone class, or automatically generated from the source code of the entire clone class. This approach helps developers to perform code clone search based on a search query written either as source code terms, or as natural language. In our quantitative evaluation, we show that (1) Clone-Seeker has a higher recall when searching for semantic code clones (i.e., Type-4) in BigCloneBench than the state-of-the-art; and (2) Clone-Seeker can accurately search for relevant code clones by applying natural language queries.</description><subject>Annotations</subject><subject>Fragments</subject><subject>Metadata</subject><subject>Natural language</subject><subject>Searching</subject><subject>Semantics</subject><subject>Software development</subject><subject>Source code</subject><subject>Transplantation</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2021</creationdate><recordtype>article</recordtype><sourceid>PIMPY</sourceid><recordid>eNqNirEKwjAUAIMgWLT_EHAOxMTUqJOUint1LqG-aGp50ST1-63gB7jcDXcTkgkpV0yvhZiRPMaOcy6KjVBKZmRf9h6B1QAPCDtaWQttcm-gpb-O-EZagwntnV6iwxs9IPpkkvMYF2RqTR8h_3lOlsfqXJ7YM_jXADE1nR8CjqkRSmqtud4W8r_rA5iQNpA</recordid><startdate>20210606</startdate><enddate>20210606</enddate><creator>Hammad, Muhammad</creator><creator>Babur, Önder</creator><creator>Hamid Abdul Basit</creator><creator>van den Brand, Mark</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope></search><sort><creationdate>20210606</creationdate><title>Clone-Seeker: Effective Code Clone Search Using Annotations</title><author>Hammad, Muhammad ; Babur, Önder ; Hamid Abdul Basit ; van den Brand, Mark</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_25388808963</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2021</creationdate><topic>Annotations</topic><topic>Fragments</topic><topic>Metadata</topic><topic>Natural language</topic><topic>Searching</topic><topic>Semantics</topic><topic>Software development</topic><topic>Source code</topic><topic>Transplantation</topic><toplevel>online_resources</toplevel><creatorcontrib>Hammad, Muhammad</creatorcontrib><creatorcontrib>Babur, Önder</creatorcontrib><creatorcontrib>Hamid Abdul Basit</creatorcontrib><creatorcontrib>van den Brand, Mark</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science & Engineering Collection</collection><collection>ProQuest Central (Alumni)</collection><collection>ProQuest Central</collection><collection>ProQuest Central Essentials</collection><collection>AUTh Library subscriptions: ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>ProQuest - Publicly Available Content Database</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering Collection</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Hammad, Muhammad</au><au>Babur, Önder</au><au>Hamid Abdul Basit</au><au>van den Brand, Mark</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>Clone-Seeker: Effective Code Clone Search Using Annotations</atitle><jtitle>arXiv.org</jtitle><date>2021-06-06</date><risdate>2021</risdate><eissn>2331-8422</eissn><abstract>Source code search plays an important role in software development, e.g. for exploratory development or opportunistic reuse of existing code from a code base. Often, exploration of different implementations with the same functionality is needed for tasks like automated software transplantation, software diversification, and software repair. Code clones, which are syntactically or semantically similar code fragments, are perfect candidates for such tasks. Searching for code clones involves a given search query to retrieve the relevant code fragments. We propose a novel approach called Clone-Seeker that focuses on utilizing clone class features in retrieving code clones. For this purpose, we generate metadata for each code clone in the form of a natural language document. The metadata includes a pre-processed list of identifiers from the code clones augmented with a list of keywords indicating the semantics of the code clone. This keyword list can be extracted from a manually annotated general description of the clone class, or automatically generated from the source code of the entire clone class. This approach helps developers to perform code clone search based on a search query written either as source code terms, or as natural language. In our quantitative evaluation, we show that (1) Clone-Seeker has a higher recall when searching for semantic code clones (i.e., Type-4) in BigCloneBench than the state-of-the-art; and (2) Clone-Seeker can accurately search for relevant code clones by applying natural language queries.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | EISSN: 2331-8422 |
ispartof | arXiv.org, 2021-06 |
issn | 2331-8422 |
language | eng |
recordid | cdi_proquest_journals_2538880896 |
source | ProQuest - Publicly Available Content Database |
subjects | Annotations Fragments Metadata Natural language Searching Semantics Software development Source code Transplantation |
title | Clone-Seeker: Effective Code Clone Search Using Annotations |
url | http://sfxeu10.hosted.exlibrisgroup.com/loughborough?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-09T07%3A43%3A42IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=document&rft.atitle=Clone-Seeker:%20Effective%20Code%20Clone%20Search%20Using%20Annotations&rft.jtitle=arXiv.org&rft.au=Hammad,%20Muhammad&rft.date=2021-06-06&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E2538880896%3C/proquest%3E%3Cgrp_id%3Ecdi_FETCH-proquest_journals_25388808963%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_pqid=2538880896&rft_id=info:pmid/&rfr_iscdi=true |