返回
TPCaps: a framework for code clone detection and localization based on improved CapsNet
DOI:10.1007/s10489-022-03158-3.png)
摘要
En 中文
In this paper, we propose TPCaps, a new code clone detection framework for addressing the inefficiency of semantic clone detection and the difficulty in locating code clones. Based on CapsNet with tokens and Program Dependence Graph (PDG), TPCaps can improve the processing rate and the capability for detecting. Firstly, TPCaps determines tokens by dataset partitioning and semantic signature, filtering out the valid code clone. Then, using the tokens mentioned above, it can detect Type-1 and Type-2 clones effectively. In addition, TPcaps generates PDG that is composed of data dependencies and control dependencies extracted from codes. Using PDG as input, the improved capsule network, we called RCapsNet, is able to detect Type-3 and Type-4 clones. Based on the CapsNet, RCapsNet introduces selective search algorithm combines with the Regional Proposal Network (RPN), where CapsNet handles the clone features to achieve detection and classification, and RPN processes the location information and updates trains the candidate frames to obtain a specific clone location. In the experimental section, we evaluate the recall and precision of the model. TPCaps shows its high accuracy compared to other models.
Keyword:
CapsNet
Program dependence graph
Semantic code clones
Tokens
期刊
IF:
3.5
论文数:
7.6K
被引数:
1.7W
机构
引用论文
Sustainability of the community-based ecotourism development in the Aksu-Zhabagly nature reserve, Kazakhstan
REGION
IF0
Volcanic, Coseismic, and Seasonal Changes Detected at White Island (Whakaari) Volcano, New Zealand, Using Seismic Ambient Noise使用地震环境噪声在新西兰怀特岛 (Whakaari) 火山检测到的火山,同震和季节变化
Controls on Sediment Suspension, Flux, and Marsh Deposition near a Bay-Marsh Boundary控制海湾-沼泽边界附近的沉积物悬浮,通量和沼泽沉积

