Invention Application
- Patent Title: SYSTEMS AND METHODS FOR DETECTION OF CODE CLONES
-
Application No.: PCT/CN2021/115181Application Date: 2021-08-28
-
Publication No.: WO2023028721A1Publication Date: 2023-03-09
- Inventor: CHEN, Jinfu , WANG, Yuan , QIU, Dong , XIA, Xin
- Applicant: HUAWEI TECHNOLOGIES CO.,LTD.
- Applicant Address: Huawei Administration Building
- Assignee: HUAWEI TECHNOLOGIES CO.,LTD.
- Current Assignee: HUAWEI TECHNOLOGIES CO.,LTD.
- Current Assignee Address: Huawei Administration Building
- Main IPC: G06F8/75
- IPC: G06F8/75
Abstract:
Methods and devices are described for detecting code clones in a software program. The source code of the software program is processed into a group of n-gram representations. A clone index is generated for each respective code portion defined in the normalized source code, where each clone index includes a feature vector encoding features of the respective code portion based on the n-gram representations corresponding to the respective code portion. Comparison of the clone indexes is used to detect a code clone, based on matching the feature vectors of the clone indexes.
Information query