Table of Contents
Advances in Software Engineering
Volume 2015 (2015), Article ID 829389, 18 pages
http://dx.doi.org/10.1155/2015/829389
Research Article

Classifying Obstructive and Nonobstructive Code Clones of Type I Using Simplified Classification Scheme: A Case Study

1Computer Science and Engineering, University of Gothenburg, 412 96 Gothenburg, Sweden
2Ericsson SW Research, Ericsson AB, 412 96 Gothenburg, Sweden
3Ericsson AB, 412 96 Gothenburg, Sweden
4Business Region Göteborg AB, 412 96 Gothenburg, Sweden

Received 4 September 2015; Revised 13 November 2015; Accepted 18 November 2015

Academic Editor: Nicholas A. Kraft

Copyright © 2015 Miroslaw Staron et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Linked References

  1. M. Kim, V. Sazawal, D. Notkin, and G. Murphy, “An empirical study of code clone genealogies,” ACM SIGSOFT Software Engineering Notes, vol. 30, pp. 187–196, 2005. View at Google Scholar
  2. C. K. Roy and J. R. Cordy, “A survey on software clone detection research,” Tech. Rep. 2007-541, School of Computing, Queen's University, 2007. View at Google Scholar
  3. D. Rattan, R. Bhatia, and M. Singh, “Software clone detection: a systematic review,” Information and Software Technology, vol. 55, no. 7, pp. 1165–1199, 2013. View at Publisher · View at Google Scholar · View at Scopus
  4. L. Zhao and S. Elbaum, “Quality assurance under the open source development model,” Journal of Systems and Software, vol. 66, no. 1, pp. 65–75, 2003. View at Publisher · View at Google Scholar · View at Scopus
  5. E. Kodhai, S. Kanmani, A. Kamatchi, R. Radhika, and B. V. Saranya, “Detection of type-1 and type-2 code clones using textual analysis and metrics,” in Proceedings of the International Conference on Recent Trends in Information, Telecommunication, and Computing (ITC '10), pp. 241–243, IEEE, Kerala, India, March 2010. View at Publisher · View at Google Scholar · View at Scopus
  6. M. Staron, W. Meding, C. Hoglund, P. Eriksson, J. Nilsson, and J. Hansson, “Identifying implicit architectural dependencies using measures of source code change waves,” in Proceedings of the 39th Euromicro Conference Series on Software Engineering and Advanced Applications, pp. 325–332, IEEE, Santander, Spain, September 2013. View at Publisher · View at Google Scholar · View at Scopus
  7. M. Staron, J. Hansson, R. Feldt et al., “Measuring and visualizing code stability—a case study at three companies,” in Proceedings of the Joint Conference of the 23rd International Workshop on Software Measurement and the 2013 8th International Conference on Software Process and Product Measurement (IWSM-MENSURA '13), pp. 191–200, Ankara, Turkey, October 2013. View at Publisher · View at Google Scholar · View at Scopus
  8. M. Staron and W. Meding, “Monitoring bottlenecks in agile and lean software development projects—a method and its industrial use,” in Product-Focused Software Process Improvement: 12th International Conference, PROFES 2011, Torre Canne, Italy, June 20–22, 2011. Proceedings, vol. 6759 of Lecture Notes in Computer Science, pp. 3–16, Springer, Berlin, Germany, 2011. View at Publisher · View at Google Scholar
  9. M. Staron and W. Meding, “Using models to develop measurement systems: a method and its industrial use,” in Software Process and Product Measurement: International Conferences IWSM 2009 and Mensura 2009 Amsterdam, The Netherlands, November 4–6, 2009. Proceedings, vol. 5891 of Lecture Notes in Computer Science, pp. 212–226, Springer, Berlin, Germany, 2009. View at Publisher · View at Google Scholar
  10. B. S. Baker, “On finding duplication and near-duplication in large software systems,” in Proceedings of the 2nd Working Conference on Reverse Engineering, pp. 86–95, Toronto, Canada, July 1995. View at Publisher · View at Google Scholar
  11. J. R. Pate, R. Tairas, and N. A. Kraft, “Clone evolution: a systematic review,” Journal of software: Evolution and Process, vol. 25, no. 3, pp. 261–283, 2013. View at Publisher · View at Google Scholar · View at Scopus
  12. E. Juergens, F. Deissenboeck, B. Hummel, and S. Wagner, “Do code clones matter?” in Proceedings of the 31st International Conference on Software Engineering (ICSE '09), pp. 485–495, Vancouver, Canada, May 2009. View at Publisher · View at Google Scholar · View at Scopus
  13. M. Toomim, A. Begel, and S. L. Graham, “Managing duplicated code with linked editing,” in Proceedings of the IEEE Symposium on Visual Languages and Human Centric Computing, pp. 173–180, IEEE, Rome, Italy, September 2004. View at Publisher · View at Google Scholar · View at Scopus
  14. J. Krinke, “Is cloned code more stable than non-cloned code?” in Proceedings of the 8th IEEE International Working Conference on Source Code Analysis and Manipulation, pp. 57–66, IEEE, Beijing, China, September 2008. View at Publisher · View at Google Scholar · View at Scopus
  15. A. Monden, D. Nakae, T. Kamiya, S. Sato, and K. Matsumoto, “Software quality analysis by code clones in industrial legacy software,” in Proceedings of the 18th IEEE Symposium on Software Metrics, pp. 87–94, Ottawa, Canada, 2002. View at Publisher · View at Google Scholar
  16. C. J. Kapser, Toward an Understanding of Software Code Cloning as a Development Practice, University of Waterloo, 2009.
  17. C. Kapser and M. W. Godfrey, “Aiding comprehension of cloning through categorization,” in Proceedings of the 7th International Workshop on Principles of Software Evolution (IWPSE '04), pp. 85–94, IEEE Computer Society, 2004. View at Publisher · View at Google Scholar
  18. G. M. K. Selim, L. Barbour, W. Shang, B. Adams, A. E. Hassan, and Y. Zou, “Studying the impact of clones on software defects,” in Proceedings of the 17th Working Conference on Reverse Engineering (WCRE '10), pp. 13–21, IEEE, Beverly, Mass, USA, October 2010. View at Publisher · View at Google Scholar · View at Scopus
  19. C. Kapser and M. W. Godfrey, “‘Cloning considered harmful’ considered harmful,” in Proceedings of the 13th Working Conference on Reverse Engineering (WCRE '06), pp. 19–28, IEEE, Benevento, Italy, October 2006. View at Publisher · View at Google Scholar · View at Scopus
  20. M. Kim, L. Bergman, T. Lau, and D. Notkin, “An ethnographic study of copy and paste programming practices in OOPL,” in Proceedings of the International Symposium on Empirical Software Engineering (ISESE '04), pp. 83–92, August 2004. View at Scopus
  21. S. Livieri, Y. Higo, M. Matushita, and K. Inoue, “Very-large scale code clone analysis and visualization of open source programs using distributed CCFinder: D-CCFinder,” in Proceedings of the 29th International Conference on Software Engineering (ICSE '07), pp. 106–115, Minneapolis, Minn, USA, May 2007. View at Publisher · View at Google Scholar · View at Scopus
  22. Y. Ueda, T. Kamiya, S. Kusumoto, and K. Inoue, “Gemini: maintenance support environment based on code clone analysis,” in Proceedings of the 8th IEEE Symposium on Software Metrics, pp. 67–76, 2002. View at Publisher · View at Google Scholar
  23. E. Duala-Ekoko and M. P. Robillard, “Clone tracker: tool support for code clone management,” in Proceedings of the 30th International Conference on Software Engineering (ICSE '08), pp. 843–846, Leipzig, Germany, May 2008. View at Publisher · View at Google Scholar · View at Scopus
  24. H. Li and S. Thompson, “Clone detection and removal for erlang/OTP within a refactoring environment,” in Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Program Manipulation, pp. 169–178, ACM, January 2009. View at Publisher · View at Google Scholar · View at Scopus
  25. H. Li and S. Thompson, “Similar code detection and elimination for erlang programs,” in Practical Aspects of Declarative Languages, vol. 5937 of Lecture Notes in Computer Science, pp. 104–118, Springer, Berlin, Germany, 2010. View at Publisher · View at Google Scholar
  26. H. Li and S. Thompson, “Incremental clone detection and elimination for erlang programs,” in Fundamental Approaches to Software Engineering: 14th International Conference, FASE 2011, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2011, Saarbrücken, Germany, March 26–April 3, 2011. Proceedings, vol. 6603 of Lecture Notes in Computer Science, pp. 356–370, Springer, Berlin, Germany, 2011. View at Publisher · View at Google Scholar
  27. C. Brown and S. Thompson, “Clone detection and elimination for Haskell,” in Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM '10), pp. 111–120, Madrid, Spain, January 2010. View at Publisher · View at Google Scholar · View at Scopus
  28. T. D. LaToza, G. Venolia, and R. DeLine, “Maintaining mental models: a study of developer work habits,” in Proceedings of the 28th International Conference on Software Engineering (ICSE '06), pp. 492–501, ACM, Shanghai, China, May 2006. View at Publisher · View at Google Scholar
  29. S. Thummalapenta, L. Cerulo, L. Aversano, and M. Di Penta, “An empirical study on the maintenance of source code clones,” Empirical Software Engineering, vol. 15, no. 1, pp. 1–34, 2010. View at Publisher · View at Google Scholar · View at Scopus
  30. Y. Yamanaka, E. Choi, N. Yoshida, K. Inoue, and T. Sano, “Applying clone change notification system into an industrial development process,” in Proceedings of the 21st International Conference on Program Comprehension (ICPC '13), pp. 199–206, IEEE, San Francisco, Calif, USA, May 2013. View at Publisher · View at Google Scholar · View at Scopus
  31. Y. Dang, S. Ge, R. Huang, and D. Zhang, “Code clone detection experience at Microsoft,” in Proceedings of the 5th International Workshop on Software Clones (IWSC '11), pp. 63–64, Honolulu, Hawaii, USA, May 2011. View at Publisher · View at Google Scholar
  32. B. Hummel, E. Juergens, L. Heinemann, and M. Conradt, “Index-based code clone detection: incremental, distributed, scalable,” in Proceedings of the IEEE International Conference on Software Maintenance (ICSM '10), pp. 1–9, IEEE, Timișoara, Romania, September 2010. View at Publisher · View at Google Scholar · View at Scopus
  33. C. J. Kapser and M. W. Godfrey, “Supporting the analysis of clones in software systems: a case study,” Journal of Software Maintenance and Evolution, vol. 18, no. 2, pp. 61–82, 2006. View at Publisher · View at Google Scholar · View at Scopus
  34. S. Grant and J. R. Cordy, “Vector space analysis of software clones,” in Proceedings of the IEEE 17th International Conference on Program Comprehension (ICPC '09), pp. 233–237, Vancouver, Canada, May 2009. View at Publisher · View at Google Scholar · View at Scopus
  35. Y. Higo, S. Kusumoto, and K. Inoue, “A metricbased approach to identifying refactoring opportunities for merging code clones in a Java software system,” Journal of Software Maintenance and Evolution, vol. 20, no. 6, pp. 435–461, 2008. View at Publisher · View at Google Scholar · View at Scopus
  36. L. Aversano, L. Cerulo, and M. Di Penta, “How clones are maintained: an empirical study,” in Proceedings of the 11th European Conference on Software Maintenance and Reengineering (CSMR '07), pp. 81–90, IEEE, Amsterdam, The Netherlands, March 2007. View at Publisher · View at Google Scholar · View at Scopus
  37. L. Yujian and L. Bo, “A normalized Levenshtein distance metric,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 29, no. 6, pp. 1091–1095, 2007. View at Publisher · View at Google Scholar · View at Scopus
  38. C. Robson, Real World Research, Blackwell Publishing, Oxford, UK, 2nd edition, 2002.
  39. P. Tomaszewski, P. Berander, and L.-O. Damm, “From traditional to streamline development—opportunities and challenges,” Software Process Improvement and Practice, vol. 13, no. 2, pp. 195–212, 2008. View at Publisher · View at Google Scholar · View at Scopus
  40. E. Richardson, “What an agile architect can learn from a hurricane meteorologist,” IEEE Software, vol. 28, no. 6, pp. 9–12, 2011. View at Publisher · View at Google Scholar · View at Scopus
  41. H. Sharp, N. Baddoo, S. Beecham, T. Hall, and H. Robinson, “Models of motivation in software engineering,” Information and Software Technology, vol. 51, no. 1, pp. 219–233, 2009. View at Publisher · View at Google Scholar · View at Scopus
  42. D. E. Perry and A. L. Wolf, “Foundations for the study of software architecture,” ACM SIGSOFT Software Engineering Notes, vol. 17, no. 4, pp. 40–52, 1992. View at Publisher · View at Google Scholar
  43. R. Feldt, M. Staron, E. Hult, and T. Liljegren, “Supporting software decision meetings: heatmaps for visualising test and code measurements,” in Proceedings of the 39th Euromicro Conference on Software Engineering and Advanced Applications (SEAA '13), pp. 62–69, IEEE, Santander, Spain, September 2013. View at Publisher · View at Google Scholar · View at Scopus
  44. 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, vol. 28, no. 7, pp. 654–670, 2002. View at Publisher · View at Google Scholar · View at Scopus
  45. N. Gode, “Evolution of type-1 clones,” in Proceedings of the 9th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM '09), pp. 77–86, IEEE, Edmonton, Canada, September 2009. View at Publisher · View at Google Scholar
  46. M. F. Zibran, R. K. Saha, C. K. Roy, and K. A. Schneider, “Evaluating the conventional wisdom in clone removal: a genealogy-based empirical study,” in Proceedings of the 28th Annual ACM Symposium on Applied Computing (SAC '13), pp. 1123–1130, ACM, Coimbra, Portugal, March 2013. View at Publisher · View at Google Scholar · View at Scopus
  47. N. Mellegård, M. Staron, and F. Törner, “A light-weight defect classification scheme for embedded automotive software and its initial evaluation,” in Proceedings of the IEEE 23rd International Symposium on Software Reliability Engineering (ISSRE '12), pp. 261–270, Dallas, Tex, USA, November 2012. View at Publisher · View at Google Scholar · View at Scopus
  48. M. Staron and C. Wohlin, “An industrial case study on the choice between language customization mechanisms,” in Product-Focused Software Process Improvement: 7th International Conference, PROFES 2006, Amsterdam, The Netherlands, June 12–14, 2006. Proceedings, vol. 4034 of Lecture Notes in Computer Science, pp. 177–191, Springer, Berlin, Germany, 2006. View at Publisher · View at Google Scholar
  49. M. Staron, W. Meding, and K. Palm, “Release readiness indicator for mature agile and lean software development projects,” in Agile Processes in Software Engineering and Extreme Programming, vol. 111 of Lecture Notes in Business Information Processing, pp. 93–107, Springer, Berlin, Germany, 2012. View at Publisher · View at Google Scholar
  50. C. Kapser and M. W. Godfrey, “Improved tool support for the investigation of duplication in software,” in Proceedings of the 21st IEEE International Conference on Software Maintenance (ICSM '05), pp. 305–314, Budapest, Hungary, September 2005. View at Publisher · View at Google Scholar · View at Scopus
  51. C. K. Roy and 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, Amsterdam, The Netherlands, June 2008. View at Publisher · View at Google Scholar · View at Scopus
  52. C. K. Roy and J. R. Cordy, “Near-miss function clones in open source software: an empirical study,” Journal of Software Maintenance and Evolution: Research and Practice, vol. 22, no. 3, pp. 165–189, 2010. View at Publisher · View at Google Scholar · View at Scopus
  53. K. Kontogiannis, “Evaluation experiments on the detection of programming patterns using software metrics,” in Proceedings of the 4th Working Conference on Reverse Engineering, pp. 44–54, IEEE, Amsterdam, The Netherlands, October 1997. View at Publisher · View at Google Scholar
  54. V. Antinyan, M. Staron, W. Meding et al., “Identifying risky areas of software code in Agile/Lean software development: an industrial experience report,” in Proceedings of the IEEE Conference on Software Maintenance, Reengineering and Reverse Engineering, Software Evolution Week (CSMR-WCRE '14), pp. 154–163, IEEE, Antwerp, Belgium, February 2014. View at Publisher · View at Google Scholar
  55. V. Antinyan, M. Staron, W. Meding et al., “Monitoring evolution of code complexity in Agile/Lean software development—a case study at two companies,” in Proceedings of the 13th Symposium on Programming Languages and Software Tools (SPLST '13), pp. 1–15, Szeged, Hungary, August 2013.
  56. C. Wohlin, P. Runeson, M. Höst, M. C. Ohlsson, B. Regnell, and A. Wesslèn, Experimentation in Software Engineering: An Introduction, Kluwer Academic Publishers, Boston, Mass, USA, 2000.
  57. E. Duala-Ekoko and M. P. Robillard, “Tracking code clones in evolving software,” in Proceedings of the 29th International Conference on Software Engineering (ICSE '07), pp. 158–167, Minneapolis, Minn, USA, May 2007. View at Publisher · View at Google Scholar · View at Scopus
  58. M. Staron, W. Meding, and C. Nilsson, “A framework for developing measurement systems and its industrial evaluation,” Information and Software Technology, vol. 51, no. 4, pp. 721–737, 2009. View at Publisher · View at Google Scholar · View at Scopus
  59. M. Staron, W. Meding, G. Karlsson, and C. Nilsson, “Developing measurement systems: an industrial case study,” Journal of Software Maintenance and Evolution, vol. 23, no. 2, pp. 89–107, 2011. View at Publisher · View at Google Scholar · View at Scopus
  60. G. Canfora, L. Cerulo, and M. Di Penta, “Identifying changed source code lines from version repositories,” in Proceedings of the IEEE 4th International Workshop in Mining Software Repositories (MSR '07), p. 14, Minneapolis, Minn, USA, May 2007. View at Publisher · View at Google Scholar