skip to main content
10.1145/2745802.2745811acmotherconferencesArticle/Chapter ViewAbstractPublication PageseaseConference Proceedingsconference-collections
research-article

Fault density analysis of object-oriented classes in presence of code clones

Published: 27 April 2015 Publication History

Abstract

Code cloning has been a typical practice during software development, by which code fragments are reused with or without changes by copying and pasting. It has been a questionable issue whether cloning has a destructive impact or not on software development and the quality of the delivered software. This paper empirically investigates the relationship between code clones and fault density of object-oriented classes. More than 3000 classes from five open source software systems were analyzed. The results suggest that classes that have clones were less fault dense on average than the classes that do not have clones. However, there was no association between intra/inter-class clone fragments within a class and its fault density. The results also indicate that among the groups of classes that have only one type of clones, the group of classes with Type III clones was the least fault dense. Minor, although statistically significant, correlations were observed between many code clone metrics and class fault density. Furthermore, the fault density predictive powers of these metrics were found to be almost the same. However, no improvement in the accuracy of fault density prediction models was observed when these metrics were used as inputs.

References

[1]
M. Asaduzzaman, C. Roy, and K. Schneider, "VisCad: flexible code clone analysis support for NiCad," in 5th International Workshop on Software Clones, pp. 77--78, 2011.
[2]
S. Bellon, R. Koschke, G. Antoniol, J. Krinke, and E. Merlo, "Comparison and evaluation of clone detection tools," IEEE Transactions on Software Engineering, vol. 33, no. 9, pp. 577--591, 2007.
[3]
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.
[4]
CCFinderX. http://www.ccfinder.net/ccfinderx.html.
[5]
S. Chidamber and C. Kemerer, "A Metrics Suite for Object Oriented Design," IEEE Transactions on Software Engineering, vol. 20, no. 6, pp. 476--493, 1994.
[6]
N. Gode and J. Harder, "Clone stability," in 15th European Conference on Software Maintenance and Reengineering, pp. 65--74, 2011.
[7]
W. Hopkins, A New View of Statistics. New Zealand: Sport Science, 2013.
[8]
Y. Kamei, H. Sato, A. Monden, S. Kawaguchi, H. Uwano, M. Nagura, K. Matsumoto, and N. Ubayashi, "An Empirical Study of Fault Prediction with Code Clone Metrics," in Joint Conference of the 21st Int'l Workshop on Software Measurement, and 6th Int'l Conference on Software Process and Product Measurement, pp. 55--61, 2011.
[9]
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.
[10]
G. Kapser and M. Godfrey, ""Cloning considered harmful" considered harmful: patterns of cloning in software," Empirical Software Engineering, vol. 13, no. 6, pp. 645--692, 2008.
[11]
M. Kim, L. Bergman, T. Lau, and D. Notkin, "An ethnographic study of copy and paste programming practices in OOPL," in 3rd International ACM-IEEE Symposium on Empirical Software Engineering (ISESE'04), pp. 83--92, 2004.
[12]
D. Kozlov, J. Koskinen, M. Sakkinen, and J. Markkkula, "Exploratory analysis of the relations between code cloning and open source software quality," in Seventh International Conference on the Quality of Information and Communications Technology, pp. 358--363, 2010.
[13]
J. Krinke, "Is cloned code more stable than non-cloned code?," in 8th IEEE International Working Conference on Source Code Analysis and Manipulation, pp. 57--66, 2008.
[14]
J. Krinke, "Is cloned code older than non-cloned code?," in 5th International Workshop on Software Clones, pp. 28--33, 2011.
[15]
A. Lozano and M. Wermelinger, "Assessing the effect of clones on changeability," in IEEE International Conference on Software Maintenance, pp. 227--236, 2008.
[16]
T. Menzies, B. Caglayan, E. Kocaguneli, J. Krall, F. Peters, and B. Turhan. The PROMISE Repository of empirical software engineering data. West Virginia University, Department of Computer Science, 2012.
[17]
M. Mondal, M. Rahman, and R. Saha, "An Empirical Study of the Impacts of Clones in Software Maintenance," in 19th IEEE International Conference on Program Comprehension, pp. 242--245, 2011.
[18]
A. Monden, D. Nakae, T. Kamiya, S. Sato, and K. Matsumoto, "Software quality analysis by code clones in industrial legacy software," in 8th IEEE Symposium on Software Metrics, pp. 87--94, 2002.
[19]
F. Rahman, C. Bird, and P. Devanbu, "Clones: What is that smell?," in 7th IEEE Working Conference on Mining Software Repositories, pp. 72--81, 2010.
[20]
D. Rattan, R. Bhatia, and M. Singh, "Software clone detection: A systematic review," Information and Software Technology, vol. 55, pp. 1165--1199, 2013.
[21]
C. Roy and J. Cordy, "A Survey on Software Clone Detection Research," Technical Report No. 2007-541, School of Computing, Queen's University at Kingston, Ontario, Canada, 2007.
[22]
G. Selim, L. Barbour, W. Shang, B. Adams, A. Hassan, and Y. Zou, "Studying the impact of clones on software defects," in 17th Working Conference on Reverse Engineering, pp. 13--21, 2010.

Cited By

View all
  • (2017)On the association between code cloning and fault-proneness: An empirical investigation2017 Computing Conference10.1109/SAI.2017.8252205(928-935)Online publication date: Jul-2017

Index Terms

  1. Fault density analysis of object-oriented classes in presence of code clones

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Other conferences
      EASE '15: Proceedings of the 19th International Conference on Evaluation and Assessment in Software Engineering
      April 2015
      305 pages
      ISBN:9781450333504
      DOI:10.1145/2745802
      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]

      Sponsors

      • NJU: Nanjing University

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 27 April 2015

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. code cloning
      2. fault density
      3. software metrics
      4. software quality

      Qualifiers

      • Research-article

      Conference

      EASE '15
      Sponsor:
      • NJU

      Acceptance Rates

      EASE '15 Paper Acceptance Rate 20 of 65 submissions, 31%;
      Overall Acceptance Rate 71 of 232 submissions, 31%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)6
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 17 Jan 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2017)On the association between code cloning and fault-proneness: An empirical investigation2017 Computing Conference10.1109/SAI.2017.8252205(928-935)Online publication date: Jul-2017

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media