Automatic Control and Computer Sciences

, Volume 47, Issue 7, pp 427–432 | Cite as

Tree slicing: Finding intertwined and gapped clones in one simple step

Article

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.

Keywords

clone detection tree slicing tree patterns software maintenance 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Deshpande, A. and Riehle, D., The total growth of open source, in Conference on Open Source Systems, Springer Verlag, 2008.Google Scholar
  2. 2.
    Roy, C.K. and Cordy, J.R., A Survey on Software Clone Detection Research, TR 2007541, Queen’s University: School of Computing, 2007.Google Scholar
  3. 3.
    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.Google Scholar
  4. 4.
    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.Google Scholar
  5. 5.
    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.Google Scholar
  6. 6.
    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.Google Scholar
  7. 7.
    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.Google Scholar
  8. 8.
    Krinke, J., Identifying similar code with program dependence graphs, on Working Conference on Reverse Engineering, Washington, DC: IEEE Computer Society, 2001.Google Scholar
  9. 9.
    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.Google Scholar
  10. 10.
    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.Google Scholar
  11. 11.
    Evans, W., Fraser, C., and Ma, F., Clone detection via structural abstraction, Software Quality J., 2009, vol. 17, no. 4, pp. 309–330.CrossRefGoogle Scholar
  12. 12.
    Bulychev, P. and Minea, M., Duplicate code detection using anti-unification, in Spring Young Researchers Colloquium on Software Engineering, 2008, pp. 51–54.Google Scholar
  13. 13.
    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.CrossRefGoogle Scholar

Copyright information

© Allerton Press, Inc. 2013

Authors and Affiliations

  1. 1.Saint-Petersburg State Polytechnical UniversitySaint-PetersburgRussia

Personalised recommendations