Code clone detection method and system based on abstract syntax tree optimization and multi-representation

The invention discloses a code clone detection method and system based on abstract syntax tree optimization and multi-representation. The method comprises the following steps: compiling a code text to obtain a corresponding abstract syntax tree; optimizing the abstract syntax tree, including removin...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: ZHONG XINLEI, GUO ZHENJUN, LIN LIANNAN, HE HONGKUI, YU TIANCHEN, JIANG CHE
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator ZHONG XINLEI
GUO ZHENJUN
LIN LIANNAN
HE HONGKUI
YU TIANCHEN
JIANG CHE
description The invention discloses a code clone detection method and system based on abstract syntax tree optimization and multi-representation. The method comprises the following steps: compiling a code text to obtain a corresponding abstract syntax tree; optimizing the abstract syntax tree, including removing nodes generated by a compiler and recovery nodes of compilation errors, removing declaration nodes and constant nodes, refining expression nodes, and respectively converting a selection structure and a loop structure into corresponding unified sub-tree structures; traversing the optimized abstract syntax tree to obtain a front sequence and a rear sequence; inputting the two sequences into a Transform network, and outputting a feature fingerprint corresponding to the code text; obtaining a plurality of corresponding feature fingerprints according to the plurality of code texts; and if the cosine similarity of any two feature fingerprints is greater than a first set threshold, determining that the two text codes co
format Patent
fullrecord <record><control><sourceid>epo_EVB</sourceid><recordid>TN_cdi_epo_espacenet_CN117389616A</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>CN117389616A</sourcerecordid><originalsourceid>FETCH-epo_espacenet_CN117389616A3</originalsourceid><addsrcrecordid>eNqNi70KwkAQBtNYiPoO6wOkCIGopQTFyso-bO4-8ST3w-0K6tObiA9gNcXMzIt7Gy3IDDGALBRGXQzkobdoiYMleYnCU88CS6PiXjSz0VEE5SdpBigmdd69-TtPl38M6sqMlCEYu0ksi9mVB8Hqx0WxPh4u7alEih0ksUGAdu25qjb1dtdUzb7-p_kAzPhB1Q</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>patent</recordtype></control><display><type>patent</type><title>Code clone detection method and system based on abstract syntax tree optimization and multi-representation</title><source>esp@cenet</source><creator>ZHONG XINLEI ; GUO ZHENJUN ; LIN LIANNAN ; HE HONGKUI ; YU TIANCHEN ; JIANG CHE</creator><creatorcontrib>ZHONG XINLEI ; GUO ZHENJUN ; LIN LIANNAN ; HE HONGKUI ; YU TIANCHEN ; JIANG CHE</creatorcontrib><description>The invention discloses a code clone detection method and system based on abstract syntax tree optimization and multi-representation. The method comprises the following steps: compiling a code text to obtain a corresponding abstract syntax tree; optimizing the abstract syntax tree, including removing nodes generated by a compiler and recovery nodes of compilation errors, removing declaration nodes and constant nodes, refining expression nodes, and respectively converting a selection structure and a loop structure into corresponding unified sub-tree structures; traversing the optimized abstract syntax tree to obtain a front sequence and a rear sequence; inputting the two sequences into a Transform network, and outputting a feature fingerprint corresponding to the code text; obtaining a plurality of corresponding feature fingerprints according to the plurality of code texts; and if the cosine similarity of any two feature fingerprints is greater than a first set threshold, determining that the two text codes co</description><language>chi ; eng</language><subject>CALCULATING ; COMPUTER SYSTEMS BASED ON SPECIFIC COMPUTATIONAL MODELS ; COMPUTING ; COUNTING ; ELECTRIC DIGITAL DATA PROCESSING ; PHYSICS</subject><creationdate>2024</creationdate><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://worldwide.espacenet.com/publicationDetails/biblio?FT=D&amp;date=20240112&amp;DB=EPODOC&amp;CC=CN&amp;NR=117389616A$$EHTML$$P50$$Gepo$$Hfree_for_read</linktohtml><link.rule.ids>230,308,776,881,25543,76294</link.rule.ids><linktorsrc>$$Uhttps://worldwide.espacenet.com/publicationDetails/biblio?FT=D&amp;date=20240112&amp;DB=EPODOC&amp;CC=CN&amp;NR=117389616A$$EView_record_in_European_Patent_Office$$FView_record_in_$$GEuropean_Patent_Office$$Hfree_for_read</linktorsrc></links><search><creatorcontrib>ZHONG XINLEI</creatorcontrib><creatorcontrib>GUO ZHENJUN</creatorcontrib><creatorcontrib>LIN LIANNAN</creatorcontrib><creatorcontrib>HE HONGKUI</creatorcontrib><creatorcontrib>YU TIANCHEN</creatorcontrib><creatorcontrib>JIANG CHE</creatorcontrib><title>Code clone detection method and system based on abstract syntax tree optimization and multi-representation</title><description>The invention discloses a code clone detection method and system based on abstract syntax tree optimization and multi-representation. The method comprises the following steps: compiling a code text to obtain a corresponding abstract syntax tree; optimizing the abstract syntax tree, including removing nodes generated by a compiler and recovery nodes of compilation errors, removing declaration nodes and constant nodes, refining expression nodes, and respectively converting a selection structure and a loop structure into corresponding unified sub-tree structures; traversing the optimized abstract syntax tree to obtain a front sequence and a rear sequence; inputting the two sequences into a Transform network, and outputting a feature fingerprint corresponding to the code text; obtaining a plurality of corresponding feature fingerprints according to the plurality of code texts; and if the cosine similarity of any two feature fingerprints is greater than a first set threshold, determining that the two text codes co</description><subject>CALCULATING</subject><subject>COMPUTER SYSTEMS BASED ON SPECIFIC COMPUTATIONAL MODELS</subject><subject>COMPUTING</subject><subject>COUNTING</subject><subject>ELECTRIC DIGITAL DATA PROCESSING</subject><subject>PHYSICS</subject><fulltext>true</fulltext><rsrctype>patent</rsrctype><creationdate>2024</creationdate><recordtype>patent</recordtype><sourceid>EVB</sourceid><recordid>eNqNi70KwkAQBtNYiPoO6wOkCIGopQTFyso-bO4-8ST3w-0K6tObiA9gNcXMzIt7Gy3IDDGALBRGXQzkobdoiYMleYnCU88CS6PiXjSz0VEE5SdpBigmdd69-TtPl38M6sqMlCEYu0ksi9mVB8Hqx0WxPh4u7alEih0ksUGAdu25qjb1dtdUzb7-p_kAzPhB1Q</recordid><startdate>20240112</startdate><enddate>20240112</enddate><creator>ZHONG XINLEI</creator><creator>GUO ZHENJUN</creator><creator>LIN LIANNAN</creator><creator>HE HONGKUI</creator><creator>YU TIANCHEN</creator><creator>JIANG CHE</creator><scope>EVB</scope></search><sort><creationdate>20240112</creationdate><title>Code clone detection method and system based on abstract syntax tree optimization and multi-representation</title><author>ZHONG XINLEI ; GUO ZHENJUN ; LIN LIANNAN ; HE HONGKUI ; YU TIANCHEN ; JIANG CHE</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-epo_espacenet_CN117389616A3</frbrgroupid><rsrctype>patents</rsrctype><prefilter>patents</prefilter><language>chi ; eng</language><creationdate>2024</creationdate><topic>CALCULATING</topic><topic>COMPUTER SYSTEMS BASED ON SPECIFIC COMPUTATIONAL MODELS</topic><topic>COMPUTING</topic><topic>COUNTING</topic><topic>ELECTRIC DIGITAL DATA PROCESSING</topic><topic>PHYSICS</topic><toplevel>online_resources</toplevel><creatorcontrib>ZHONG XINLEI</creatorcontrib><creatorcontrib>GUO ZHENJUN</creatorcontrib><creatorcontrib>LIN LIANNAN</creatorcontrib><creatorcontrib>HE HONGKUI</creatorcontrib><creatorcontrib>YU TIANCHEN</creatorcontrib><creatorcontrib>JIANG CHE</creatorcontrib><collection>esp@cenet</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>ZHONG XINLEI</au><au>GUO ZHENJUN</au><au>LIN LIANNAN</au><au>HE HONGKUI</au><au>YU TIANCHEN</au><au>JIANG CHE</au><format>patent</format><genre>patent</genre><ristype>GEN</ristype><title>Code clone detection method and system based on abstract syntax tree optimization and multi-representation</title><date>2024-01-12</date><risdate>2024</risdate><abstract>The invention discloses a code clone detection method and system based on abstract syntax tree optimization and multi-representation. The method comprises the following steps: compiling a code text to obtain a corresponding abstract syntax tree; optimizing the abstract syntax tree, including removing nodes generated by a compiler and recovery nodes of compilation errors, removing declaration nodes and constant nodes, refining expression nodes, and respectively converting a selection structure and a loop structure into corresponding unified sub-tree structures; traversing the optimized abstract syntax tree to obtain a front sequence and a rear sequence; inputting the two sequences into a Transform network, and outputting a feature fingerprint corresponding to the code text; obtaining a plurality of corresponding feature fingerprints according to the plurality of code texts; and if the cosine similarity of any two feature fingerprints is greater than a first set threshold, determining that the two text codes co</abstract><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier
ispartof
issn
language chi ; eng
recordid cdi_epo_espacenet_CN117389616A
source esp@cenet
subjects CALCULATING
COMPUTER SYSTEMS BASED ON SPECIFIC COMPUTATIONAL MODELS
COMPUTING
COUNTING
ELECTRIC DIGITAL DATA PROCESSING
PHYSICS
title Code clone detection method and system based on abstract syntax tree optimization and multi-representation
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-22T02%3A27%3A45IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-epo_EVB&rft_val_fmt=info:ofi/fmt:kev:mtx:patent&rft.genre=patent&rft.au=ZHONG%20XINLEI&rft.date=2024-01-12&rft_id=info:doi/&rft_dat=%3Cepo_EVB%3ECN117389616A%3C/epo_EVB%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true