全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

An Empirical Study on the Impact of Duplicate Code

DOI: 10.1155/2012/938296

Full-Text   Cite this paper   Add to My Lib

Abstract:

It is said that the presence of duplicate code is one of the factors that make software maintenance more difficult. Many research efforts have been performed on detecting, removing, or managing duplicate code on this basis. However, some researchers doubt this basis in recent years and have conducted empirical studies to investigate the influence of the presence of duplicate code. In this study, we conduct an empirical study to investigate this matter from a different standpoint from previous studies. In this study, we define a new indicator “modification frequency” to measure the impact of duplicate code and compare the values between duplicate code and nonduplicate code. The features of this study are as follows the indicator used in this study is based on modification places instead of the ratio of modified lines; we use multiple duplicate code detection tools to reduce biases of detection tools; and we compare the result of the proposed method with other two investigation methods. The result shows that duplicate code tends to be less frequently modified than nonduplicate code, and we found some instances that the proposed method can evaluate the influence of duplicate code more accurately than the existing investigation methods. 1. Introduction Recently, duplicate code has received much attention. Duplicate code is also called as “code clone.” Duplicate code is defined as identical or similar code fragments to each other in the source code, and they are generated by various reasons such as copy-and-paste programming. It is said that the presence of duplicate code has negative impacts on software development and maintenance. For example, they increase bug occurrences: if an instance of duplicate code is changed for fixing bugs or adding new features, its correspondents have to be changed simultaneously; if the correspondents are not changed inadvertently, bugs are newly introduced to them. Various kinds of research efforts have been performed for resolving or improving the problems caused by the presence of duplicate code. For example, there are currently a variety of techniques available to detect duplicate code [1]. In addition, there are many research efforts for merging duplicate code as a single module like function or method, or for preventing duplications from being overlooked in modification [2, 3]. However, there are precisely the opposite opinions that code cloning is a good choice for design of the source code [4]. In order to answer the question whether duplicate code is harmful or not, several efforts have proposed comparison methods

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, vol. 32, no. 10, pp. 804–818, 2007.
[2]  M. D. Wit, A. Zaidman, and A. V. Deursen, “Managing code clones using dynamic change tracking and resolution?” in Proceedings of the 25th IEEE International Conference on Software Maintenance (ICSM '09), pp. 169–178, September 2009.
[3]  M. P. Robillard, W. Coelho, and G. C. Murphy, “How effective developers investigate source code: an exploratory study,” IEEE Transactions on Software Engineering, vol. 30, no. 12, pp. 889–903, 2004.
[4]  C. J. Kapser and M. W. Godfrey, “‘cloning considered harmful’ considered harmful: patterns of cloning in software,” Empirical Software Engineering, vol. 13, no. 6, pp. 645–692, 2008.
[5]  M. Kim, V. Sazawal, D. Notkin, and G. C. Murphy, “An empirical study of code clone genealogies,” in Proceedings of the 13th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 187–196, September 2005.
[6]  N. Bettenburg, W. Shang, W. M. Ibrahim, B. Adams, Y. Zou, and A. E. Hassan, “An empirical study on inconsistent changes to code clones at the release level,” Science of Computer Programming, vol. 77, no. 6, pp. 760–776, 2012.
[7]  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 8th IEEE International Software Metrics Symposium, pp. 87–94, June 2002.
[8]  A. Lozano, M. Wermelinger, and B. Nuseibeh, “Evaluating the harmfulness of cloning: a change based experiment,” in Proceedings of the 4th International Workshop on Mining Software Repositories (MSR '07), May 2007.
[9]  A. Lozano and M. Wermelinger, “Assessing the effect of clones on changeability,” in Proceedings of the 24th International Conference on Software Maintenance, pp. 227–236, September 2008.
[10]  A. Lozano, M. Wermelinger, and B. Nuseibeh, “Evaluating the relation between changeability decay and the characteristics of clones and methods,” in Proceedings of the 23rd IEEE/ACM International Conference on Automated Software Engineering, pp. 100–109, September 2008.
[11]  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, SCAM 2008, pp. 57–66, September 2008.
[12]  N. G?de and J. Harder, “Clone stability,” in Proceedings of the 15th European Conference on Software Maintenance and Reengineering (CSMR '11), pp. 65–74, March 2011.
[13]  J. Krinke, “Is cloned code older than non-cloned code?” in Proceedings of the 5th International Workshop on Software Clones (IWSC '11), pp. 28–33, May 2011.
[14]  F. Rahman, C. Bird, and P. Devanbu, “Clones: what is that smell?” in Proceedings of the 7th IEEE Working Conference on Mining Software Repositories, pp. 72–81, May 2010.
[15]  N. G?de and R. Koschke, “Frequency and risks of changes to clones,” in 33rd International Conference on Software Engineering (ICSE '11), pp. 311–320, May 2011.
[16]  S. G. Eick, T. L. Graves, A. F. Karr, U. S. Marron, and A. Mockus, “Does code decay? Assessing the evidence from change management data,” IEEE Transactions on Software Engineering, vol. 27, no. 1, pp. 1–12, 2001.
[17]  N. G?de, “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, September 2009.
[18]  E. Burd and J. Bailey, “Evaluating clone detection tools for use during preventative maintenance,” in Proceedings of the 2nd IEEE International Workshop on Source Code Analysis and Manipulation, pp. 36–43, October 2002.
[19]  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.
[20]  CCFinderX, http://www.ccfinder.net/ccfinderx.html/.
[21]  Simian, http://www.harukizaemon.com/simian/.
[22]  Y. Higo and S. Kusumoto, “Code clone detection on specialized PDGs with heuristics,” in Proceedings of the 15th European Conference on Software Maintenance and Reengineering (CSMR '11), pp. 75–84, March 2011.
[23]  Scorpio, http://sdl.ist.osaka-u.ac.jp/~higo/cgi-bin/moin.cgi/Scorpio/.
[24]  S. Ducasse, M. Rieger, and S. Demeyer, “Language independent approach for detecting duplicated code,” in Proceedings of the 15th IEEE International Conference on Software Maintenance (ICSM '99), pp. 109–118, September 1999.
[25]  S. Uchida, A. Monden, N. Ohsugi, T. Kamiya, K. I. Matsumoto, and H. Kudo, “Software analysis by code clones in open source software,” Journal of Computer Information Systems, vol. 45, no. 3, pp. 1–11, 2005.
[26]  K. Hotta, Y. Sano, Y. Higo, and S. Kusumoto, “Is duplicate code more frequently modified than non-duplicate code in software evolution?: an empirical study on open source software,” in Proceedings of the 4th the International Joint ERCIM Workshop on Software Evolution and International Workshop on Principles of Software Evolution, September 2010.
[27]  Y. Sasaki, K. Hotta, Y. Higo, and S. Kusumoto, “Is duplicate code good or bad? an empirical study with multiple investigation methods and multiple detection tools,” in Proceedings of the 22nd International Symposium on Software Reliability Engineering (ISSRE '11), Hiroshima, Japan, November 2011.

Full-Text

comments powered by Disqus

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133

WeChat 1538708413