skip to main content
10.1145/1985793.1985835acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

MeCC: memory comparison-based clone detector

Authors Info & Claims
Published:21 May 2011Publication History

ABSTRACT

In this paper, we propose a new semantic clone detection technique by comparing programs' abstract memory states, which are computed by a semantic-based static analyzer.

Our experimental study using three large-scale open source projects shows that our technique can detect semantic clones that existing syntactic- or semantic-based clone detectors miss. Our technique can help developers identify inconsistent clone changes, find refactoring candidates, and understand software evolution related to semantic clones.

References

  1. S. Bellon, R. Koschke, G. Antoniol, J. Krinke, and E. Merlo. Comparison and evaluation of clone detection tools. IEEE Transactions on Software Engineering, 33(9), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. A static analyzer for large safety-critical software. In PLDI, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. I. Dillig, T. Dillig, and A. Aiken. Sound, complete and scalable path-sensitive analysis. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. I. Dillig, T. Dillig, and A. Aiken. Small formulas for large programs: On-line constraint simplification in scalable static analysis. In SAS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Duala-Ekoko and M. P. Robillard. Tracking code clones in evolving software. In ICSE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. B. Dutertre and L. D. Moura. A fast linear-arithmetic solver for DPLL(T). In CAV. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. E. G. Cousineau. Program equivalence and provability. In MFCS, 1979.Google ScholarGoogle ScholarCross RefCross Ref
  9. M. Gabel, L. Jiang, and Z. Su. Scalable detection of semantic clones. In ICSE, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Gabel, J. Yang, Y. Yu, M. Goldszmidt, and Z. Su. Scalable and systematic detection of buggy inconsistencies in source code. In OOPSLA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Y. Higo, T. Kamiya, S. Kusumoto, K. Inoue, and K. Words. Aries: Refactoring support environment based on code clone analysis. In SEA, 2004.Google ScholarGoogle Scholar
  12. L. Jiang, G. Misherghi, and Z. Su. Deckard: Scalable and accurate tree-based detection of code clones. In ICSE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. L. Jiang and Z. Su. Automatic mining of functionally equivalent code fragments via random testing. In ISSTA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. L. Jiang, Z. Su, and E. Chiu. Context-based detection of clone-related bugs. In ESEC/FSE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. E. Juergens, F. Deissenboeck, B. Hummel, and S. Wagner. Do code clones matter? In ICSE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Y. Jung, J. Kim, J. Shin, and K. Yi. Taming false alarms from a domain-unaware c analyzer by a bayesian statistical post analysis. In SAS, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Y. Jung and K. Yi. Practical memory leak detector based on parameterized procedural summaries. In ISMM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Kamiya, S. Kusumoto, and K. Inoue. Ccfinder: A multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering, 28, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Kim, V. Sazawal, D. Notkin, and G. Murphy. An empirical study of code clone genealogies. SIGSOFT Softw. Eng. Notes, 30(5), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Kim, K. Pan, and E. E. J. Whitehead, Jr. Memories of bug fixes. In SIGSOFT FSE, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. R. Komondoor and S. Horwitz. Using slicing to identify duplication in source code. In SAS, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. H. W. Kuhn. The hungarian method for the assignment problem. In 50 Years of Integer Programming 1958--2008, 2009.Google ScholarGoogle Scholar
  23. Z. Li, S. Lu, S. Myagmar, and Y. Zhou. Cp-miner: Finding copy-paste and related bugs in large-scale software code. IEEE Trans. Softw. Eng., 32(3), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. C. Liu, C. Chen, J. Han, and P. S. Yu. Gplag: detection of software plagiarism by program dependence graph analysis. In KDD, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17, 1978.Google ScholarGoogle Scholar
  26. C. Pacheco, S. K. Lahiri, and T. Ball. Finding errors in .net with feedback-directed random testing. In ISSTA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. Pacheco, S. K. Lahiri, M. D. Ernst, and T. Ball. Feedback-directed random test generation. In ICSE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. L. Prechelt, G. Malpohl, and M. Philippsen. Finding plagiarisms among a set of programs with jplag. Journal of Universal Computer Science, 8, 2001.Google ScholarGoogle Scholar
  29. C. K. Roy and J. R. Cordy. A survey on software clone detection research. SCHOOL OF COMPUTING TR 2007-541, QUEEN'S UNIVERSITY, 115, 2007.Google ScholarGoogle Scholar
  30. C. K. Roy and J. R. Cordy. Nicad: Accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization. In ICPC, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. C. K. Roy, J. R. Cordy, and R. Koschke. Comparison and evaluation of code clone detection techniques and tools: A qualitative approach. Sci. Comput. Program., 74(7), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. B. S.Baker. A program for identifying duplicated code. In Computer Science and Statistics: Proc. Symp. on the Interface, 1992.Google ScholarGoogle Scholar
  33. S. Schleimer, D. S. Wilkerson, and A. Aiken. Winnowing: local algorithms for document fingerprinting. In SIGMOD, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. S. Thummalapenta, T. Xie, N. Tillmann, J. de Halleux, and W. Schulte. Mseqgen: object-oriented unit-test generation via mining source code. In ESEC/FSE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Y. Xie and A. Aiken. Context- and path-sensitive memory leak detection. In ESEC/FSE, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. MeCC: memory comparison-based clone detector

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          ICSE '11: Proceedings of the 33rd International Conference on Software Engineering
          May 2011
          1258 pages
          ISBN:9781450304450
          DOI:10.1145/1985793

          Copyright © 2011 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 21 May 2011

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate276of1,856submissions,15%

          Upcoming Conference

          ICSE 2025

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader