Abstract
Most of software nowadays contain code duplication that leads to serious problems in software maintenance. A lot of different clone detection approaches have been proposed over the years to deal with this problem, but almost all of them do not consider semantic properties of the source code.
We propose to reinforce traditional tree-based clone detection algorithm by using additional information about variable slices. This allows to find intertwined/gapped clones on variables; preliminary evaluation confirms applicability of our approach to real-world software.
Similar content being viewed by others
References
Deshpande, A. and Riehle, D., The total growth of open source, in Conference on Open Source Systems, Springer Verlag, 2008.
Roy, C.K. and Cordy, J.R., A Survey on Software Clone Detection Research, TR 2007541, Queen’s University: School of Computing, 2007.
Li, Z., Lu, S., Myagmar, S., and Zhou, Y., CP-miner: a tool for finding copy-paste and related bugs in operating system code, in Conference on Symposium on Operating Systems Design and Implementation, USENIX Association, Berkeley, 2004, pp. 20–20.
Kontogiannis, K., Evaluation experiments on the detection of programming patterns using software metrics, in Working Conference on Reverse Engineering, Washington, DC: IEEE Computer Society, 1997, pp. 44–44.
Koschke, R., Falke, R., and Frenzel, P., Clone detection using abstract syntax suffix trees, in Working Conference on Reverse Engineering, Washington, DC: IEEE Computer Society, 2006, pp. 253–262.
Hummel, B., Juergens, E., Heinemann, L., and Conradt, M., Index-based code clone detection: incremental, distributed, scalable, in International Conference on Software Maintenance, Washington, DC: IEEE Computer Society, 2010, pp. 1–9.
Gabel, M., Jiang, L., and Su, S., Scalable detection of semantic clones, in International Conference on Software Engineering, Washington, DC: IEEE Computer Society, 2008, pp. 321–330.
Krinke, J., Identifying similar code with program dependence graphs, on Working Conference on Reverse Engineering, Washington, DC: IEEE Computer Society, 2001.
Jiang, L., Misherghi, G., Su, S., and Glondu, S., DECKARD: scalable and accurate tree-based detection of code clones, in International Conference on Software Engineering, Washington, DC: IEEE Computer Society, 2007, pp. 96–105.
Andoni, A. and Indyk, P., Near-optimal hashing algorithms for approximate Nearest Neighbour in high dimensions, Commun. ACM, New York, NY: ACM, 2008, vol. 51, no. 1, pp. 117–122.
Evans, W., Fraser, C., and Ma, F., Clone detection via structural abstraction, Software Quality J., 2009, vol. 17, no. 4, pp. 309–330.
Bulychev, P. and Minea, M., Duplicate code detection using anti-unification, in Spring Young Researchers Colloquium on Software Engineering, 2008, pp. 51–54.
Kamiya, T., Kusumoto, S., and Inoue, K., CCFinder: Multilinguistic token-based code clone detection system for large scale source code, IEEE Trans. Soft. Eng., 2002, vol. 28, no. 7, pp. 654–670; Washington, DC: IEEE Computer Society, 2002.
Author information
Authors and Affiliations
Corresponding author
Additional information
The article is published in the original.
Gapped clones-similar code fragments with some different code portions between the similar fragments; intertwined clones-similar code fragments with intertwined statements.
About this article
Cite this article
Akhin, M., Itsykson, V. Tree slicing: Finding intertwined and gapped clones in one simple step. Aut. Control Comp. Sci. 47, 427–432 (2013). https://doi.org/10.3103/S0146411613070171
Published:
Issue Date:
DOI: https://doi.org/10.3103/S0146411613070171