Effects of an Apriori-based Data-mining Algorithm for Detecting Type 3 Clones
Effects of an Apriori-based Data-mining Algorithm for Detecting Type 3 Clones
复制标题
DOI:
--
复制
发表时间:
2018
影响因子:
2.4
通讯作者:
Yoshihisa Udagawa
中科院分区:
文献类型:
--
作者:
Yoshihisa Udagawa
—A code clone is a fragment of source code that appears at least twice in software source code. Code clones introduce difficulties in software maintenance because an error in one fragment is reproduced in code clones. It is significant to detect every code clones for making software maintenance easy and reliable. This paper describes software clone detection techniques using an Apriori -based sequential data mining algorithm. The Apriori -based algorithm is used because it is designed to find all frequent items that occur no less than a user-specified threshold named the minimum support (minSup). Since clones are slightly modified by adding, removing, or changing source code in general, the algorithm for detecting code clones has to deal with both match and mismatch portions of source code. The essential idea of the proposed approach is a combination of a partial string match using the longest-common-subsequence (LCS) and an Apriori -based algorithm for finding frequent sequences. Generally, Apriori -based algorithms extract vast numbers of frequent sequences especially when the minSup is small, creating an obstacle to the detection of code clones. The novelties of our approach include pruning processes that depend on characteristics of a programming language, techniques to reduce the number of frequent sequences, and functions to control repetitive subsequences. We evaluate the effectiveness of the proposed algorithm based on experimental results using the source code of the Java SDK SWING graphics package. The results show that the proposed sequential data mining algorithm maintains the performance at a practical level until the minSup reaches two. This paper also shows some mined sequences and source code to demonstrate that the proposed algorithm works from short sequences to long ones.