Skip to main content

NiCad: A Modern Clone Detector

  • Chapter
  • First Online:
Code Clone Analysis
  • The original version of this chapter was revised. The affiliation of author “J. R. Cordy” has been changed as “Queen’s University, Kingston, Canada”. An erratum to this chapter can be found at https://doi.org/10.1007/978-981-16-1927-4_17

Abstract

Code clones are exactly or nearly similar code fragments in the code-base of a software system. Studies have revealed that such code fragments can have mixed impact (both positive and negative) on software evolution and maintenance. In order to reduce the negative impact of code clones and benifit from their advantages, researchers have suggested a number of different clone management techniques. Clone management begins with clone detection. Clone detection has thus been a hot research topic, resulting in many different clone detectors [26, 32] that have been used in a range of applications, including clone analysis, refactoring, and tracking. One of those that has been widely used and investigated is NiCad [3, 27]. What follows is a brief overview of the NiCad detection mechanism and its application in various studies of code clones.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 139.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 179.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 179.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Change history

  • 11 October 2021

    In the original version of the book, the following belated correction is to be incorporated: In chapter “NiCad: A Modern Clone Detector”, the affiliation “Queen’s University, Belfast, Northern Ireland” of author “J. R. Cordy” is to be changed to “Queen's University, Kingston, Canada”. The author’s affiliation is corrected in the chapter. The erratum chapter have been updated with the change.

References

  1. M. Asaduzzaman, C.K. Roy, K.A. Schneider, Viscad: flexible code clone analysis support for nicad, in IWSC, pp. 77–78 (2011)

    Google Scholar 

  2. J.R. Cordy, The TXL source transformation language. Sci. Comput. Program. 61(3), 190–210 (2006)

    Article  MathSciNet  Google Scholar 

  3. J.R. Cordy, C.K. Roy, The NiCad clone detector, in Proceedings of the 2011 IEEE 19th International Conference on Program Comprehension (ICPC’ 11), pp. 219–220 (2011)

    Google Scholar 

  4. F.A. Fontana, M. Zanoni, F. Zanoni, A duplicated code refactoring advisor, in Agile Processes, in Software Engineering, and Extreme Programming, LNBIP(212), pp. 3–14 (2015)

    Google Scholar 

  5. J.F. Islam, M. Mondal, C.K. Roy, Bug replication in code clones: an empirical study, in Proceedings of the 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER’16), pp. 68–78 (2016)

    Google Scholar 

  6. J.F. Islam, M. Mondal, C.K. Roy, A comparative study of software bugs in micro-clones and regular code clones, in SANER, pp. 1–11 (2019)

    Google Scholar 

  7. J.F. Islam, M. Mondal, C.K. Roy, K.A. Schneider, Comparing bug replication in regular and micro code clones, in ICPC, pp. 1–11 (2019)

    Google Scholar 

  8. D. Mondal, M. Mondal, C.K. Roy, K.A. Schneider, Y. Li, S. Wang, Clone-world: a visual analytic system for large scale software clones. Vis. Inform. 3(1), 18–26 (2019)

    Article  Google Scholar 

  9. M. Mondal, M.S. Rahman, C.K. Roy, K.A. Schneider, Is cloned code really stable? Empir. Softw. Eng. 23(2), 693–770 (2018)

    Article  Google Scholar 

  10. M. Mondal, B. Roy, C.K. Roy, K.A. Schneider, An empirical study on bug propagation through code cloning. J. Syst. Softw. (2019)

    Google Scholar 

  11. M. Mondal, B. Roy, C.K. Roy, K.A. Schneider, Investigating context adaptation bugs in code clones, in ICSME, pp. 157–168 (2019)

    Google Scholar 

  12. M. Mondal, B. Roy, C.K. Roy, K.A. Schneider, Associating code clones with association rules for change impact analysis, in SANER, pp. 93–103 (2020)

    Google Scholar 

  13. M. Mondal, B. Roy, C.K. Roy, K.A. Schneider, Investigating near-miss micro-clones in evolving software, in ICPC, p. 11 (2020)

    Google Scholar 

  14. M. Mondal, C.K. Roy, M.S. Rahman, R.K. Saha, J. Krinke, K.A. Schneider, Comparative stability of cloned and non-cloned code: an empirical study, in Proceedings of the 27th Annual ACM Symposium on Applied Computing (SAC’12), pp. 1227–1234 (2012)

    Google Scholar 

  15. M. Mondal, C.K. Roy, K.A. Schneider, An insight into the dispersion of changes in cloned and non-cloned code: a genealogy based empirical study. Sci. Comput. Program. J. 95(4), 445–468 (2013)

    Google Scholar 

  16. M. Mondal, C.K. Roy, K.A. Schneider, Automatic identification of important clones for refactoring and tracking, in Proceedings of the IEEE 14th International Working Conference on Source Code Analysis and Manipulation (SCAM’14), pp. 11–20 (2014)

    Google Scholar 

  17. M. Mondal, C.K. Roy, K.A. Schneider, Automatic ranking of clones for refactoring through mining association rules, in Proceedings of the IEEE Conference on Software Maintenance, Reengineering and Reverse Engineering (CSMR-WCRE’14), Software Evolution Week, pp. 114–123 (2014)

    Google Scholar 

  18. M. Mondal, C.K. Roy, K.A. Schneider, A fine-grained analysis on the evolutionary coupling of cloned code, in Proceedings of the 30th IEEE International Conference on Software Maintenance and Evolution (ICSME’14), pp. 51–60 (2014)

    Google Scholar 

  19. M. Mondal, C.K. Roy, K.A. Schneider, Late propagation in near-miss clones: an empirical study, in Proceedings of the 8th International Workshop on Software Clones (IWSC’14), pp. 1–15 (2014)

    Google Scholar 

  20. M. Mondal, C.K. Roy, K.A. Schneider, Prediction and ranking of co-change candidates for clones, in Proceedings of the 11th Working Conference on Mining Software (MSR’14), pp. 32–41 (2014)

    Google Scholar 

  21. M. Mondal, C.K. Roy, K.A. Schneider, A comparative study on the bug-proneness of different types of code clones, in Proceedings of the 31st IEEE International Conference on Software Maintenance and Evolution (ICSME’15), pp. 91–100 (2015)

    Google Scholar 

  22. M. Mondal, C.K. Roy, K.A. Schneider, An empirical study on change recommendation, in Proceedings of the 25th Annual International Conference on Computer Science and Software Engineering (CASCON’15), pp. 141–150 (2015)

    Google Scholar 

  23. M. Mondal, C.K. Roy, K.A. Schneider, SPCP-Miner: a tool for mining code clones that are important for refactoring or tracking, in Proceedings of the 22nd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER’15), pp. 482–486 (2015)

    Google Scholar 

  24. M. Mondal, C.K. Roy, K.A. Schneider, A comparative study on the intensity and harmfulness of late propagation in near-miss code clones. Softw. Qual. J. 24(4), 883–915 (2016)

    Article  Google Scholar 

  25. M. Mondal, C.K. Roy, K.A. Schneider, Micro-clones in evolving software, in SANER, pp. 50–60 (2018)

    Google Scholar 

  26. C.K. Roy, J.R. Cordy, A survey on software clone detection research, in Tech Report TR 2007-541, School of Computing, Queens University, Canada, pp. 1–115 (2007)

    Google Scholar 

  27. C.K. Roy, J.R. Cordy, NICAD: accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization, in Proceedings of the 16th IEEE International Conference on Program Comprehension (ICPC’08), pp. 172–181 (2008)

    Google Scholar 

  28. C.K. Roy, J.R. Cordy, Adventuures in NICAD: a ten-year retrospective. In ICPC, p. 19 (2018) (MIP Abstract)

    Google Scholar 

  29. C.K. Roy, J.R. Cordy, Benchmarks for software clone detection: a ten-year retrospective. In SANER, pp. 26–37 (2018)

    Google Scholar 

  30. R.K. Saha, C.K. Roy, K.A. Schneider, An automatic framework for extracting and classifying near-miss clone genealogies, in Proceedings of the 27th IEEE International Conference on Software Maintenance (ICSM’11), pp. 293–302 (2011)

    Google Scholar 

  31. K.A. Schneider, M. Mondal, C.K. Roy, A fine-grained analysis on the inconsistent changes in code clones, in ICSME, pp. 220–231 (2020)

    Google Scholar 

  32. A. Sheneamer, J. Kalita, Article: a survey of software clone detection techniques. Int. J. Comput. Appl. 137(10), 1–21 (2016)

    Google Scholar 

  33. J. Svajlenko, C.K. Roy, Evaluating modern clone detection tools, in Proceedings of the 2014 IEEE International Conference on Software Maintenance and Evolution (ICSME’14), pp. 321–330 (2014)

    Google Scholar 

  34. N. Tsantalis, D. Mazinanian, G.P. Krishnan, Assessing the refactorability of software clones. IEEE Trans. Softw. Eng. 41(11), 1055–1090 (2015)

    Article  Google Scholar 

  35. S. Uddin, C.K. Roy, K.A. Schneider, SimCad: an extensible and faster clone detection tool for large scale software systems, in Proceedings of the IEEE 21st International Conference on Program Comprehension (ICPC’13), pp. 236–238 (2013)

    Google Scholar 

  36. S. Uddin, C.K. Roy, K.A. Schneider, A. Hindle, On the effectiveness of simhash for detecting near-miss clones in large scale software systems, in WCRE, pp. 13–22 (2011)

    Google Scholar 

  37. S. Uddin, C.K. Roy, K.A. Schneider, A. Hindle, Simcad: a ten-year retrospective, in SANER (2021) (oral presentation)

    Google Scholar 

  38. T. Wang, M. Harman, Y. Jia, J. Krinke, Searching for better configurations: a rigorous approach to clone evaluation, in Proceedings of the 9th Joint Meeting on Foundations of Software Engineering (ESEC/FSE’13), pp. 455–465 (2013)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Manishankar Mondal .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Mondal, M., Roy, C.K., Cordy, J.R. (2021). NiCad: A Modern Clone Detector. In: Inoue, K., Roy, C.K. (eds) Code Clone Analysis. Springer, Singapore. https://doi.org/10.1007/978-981-16-1927-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-981-16-1927-4_3

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-16-1926-7

  • Online ISBN: 978-981-16-1927-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics