Skip to main content
Erschienen in: Software Quality Journal 4/2016

22.01.2016

A comparative study on the intensity and harmfulness of late propagation in near-miss code clones

verfasst von: Manishankar Mondal, Chanchal K. Roy, Kevin A. Schneider

Erschienen in: Software Quality Journal | Ausgabe 4/2016

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Exact or nearly similar code fragments in a software system’s source code are referred to as code clones. It is often the case that updates (i.e., changes) to a code clone will need to be propagated to its related code clones to preserve their similarity and to maintain source code consistency. When there is a delay in propagating the changes (possibly because the developer is unaware of the related cloned code), the system might behave incorrectly. A delay in propagating a change is referred to as ‘late propagation,’ and a number of studies have investigated this phenomenon. However, these studies did not investigate the intensity of late propagation nor how late propagation differs by clone type. In this research, we investigate late propagation separately for each of the three clone types (Type 1, Type 2, and Type 3). According to our experimental results on thousands of revisions of eight diverse subject systems written in two programming languages, late propagation occurs more frequently in Type 3 clones compared with the other two clone types. More importantly, there is a higher probability that Type 3 clones will experience buggy late propagations compared with the other two clone types. Also, we discovered that block clones are more involved in late propagation than method clones. Refactoring and tracking of Similarity Preserving Change Pattern (SPCP) clones (i.e., the clone fragments that evolve following a SPCP) can help us minimize the occurrences of late propagation in clones.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Fußnoten
3
Source code file for Clone Fragment 1: trunk/org/gjt/sp/jedit/buffer/OffsetManager.java.
 
4
Source code file for Clone Fragment 2: trunk/org/gjt/sp/jedit/textarea/ChunkCache.java.
 
Literatur
Zurück zum Zitat Aversano, L., Cerulo, L., & Penta, M. D. (2007). How clones are maintained: An empirical study. In CSMR (pp. 81–90). IEEE Computer Society. Aversano, L., Cerulo, L., & Penta, M. D. (2007). How clones are maintained: An empirical study. In CSMR (pp. 81–90). IEEE Computer Society.
Zurück zum Zitat Bazrafshan, S. (2012). Evolution of near-miss clones. In SCAM (pp. 74–83). Bazrafshan, S. (2012). Evolution of near-miss clones. In SCAM (pp. 74–83).
Zurück zum Zitat Barbour, L., Khomh, F., & Zou, Y. (2013). An empirical study of faults in late propagation clone genealogies. Software: Evolution and Process, 25, 1139–1165. Barbour, L., Khomh, F., & Zou, Y. (2013). An empirical study of faults in late propagation clone genealogies. Software: Evolution and Process, 25, 1139–1165.
Zurück zum Zitat Cordy, J. R., & Roy, C. K. (2011). The NiCad clone detector. In Tool demo track (pp. 219–220). ICPC Cordy, J. R., & Roy, C. K. (2011). The NiCad clone detector. In Tool demo track (pp. 219–220). ICPC
Zurück zum Zitat D’Ambros, M., Lanza, M., & Lungu, M. (2009). Visualizing co-change information with the evolution radar. IEEE Transactions on Software Engineering, 35, 720–735.CrossRef D’Ambros, M., Lanza, M., & Lungu, M. (2009). Visualizing co-change information with the evolution radar. IEEE Transactions on Software Engineering, 35, 720–735.CrossRef
Zurück zum Zitat Duala-Ekoko, E., & Robillard, M.P. (2007). Tracking code clones in evolving software. In ICSE (pp. 158–167). Duala-Ekoko, E., & Robillard, M.P. (2007). Tracking code clones in evolving software. In ICSE (pp. 158–167).
Zurück zum Zitat Duala-Ekoko, E., & Robillard, M.P. (2008). Clonetracker: Tool support for code clone management. In ICSE (pp. 843–846). Duala-Ekoko, E., & Robillard, M.P. (2008). Clonetracker: Tool support for code clone management. In ICSE (pp. 843–846).
Zurück zum Zitat Göde, N., & Harder, J. (2011). Clone stability. In CSMR (pp. 65–74). Göde, N., & Harder, J. (2011). Clone stability. In CSMR (pp. 65–74).
Zurück zum Zitat Göde, N., & Koschke, R. (2011). Frequency and risks of changes to clones. In ICSE (pp. 311–320). Göde, N., & Koschke, R. (2011). Frequency and risks of changes to clones. In ICSE (pp. 311–320).
Zurück zum Zitat Kapser, C., & Godfrey, M. W. (2008). “Cloning considered harmful” considered harmful: Patterns of cloning in software. Empirical Software Engineering, 13, 645–692.CrossRef Kapser, C., & Godfrey, M. W. (2008). “Cloning considered harmful” considered harmful: Patterns of cloning in software. Empirical Software Engineering, 13, 645–692.CrossRef
Zurück zum Zitat Krinke, J. (2007). A study of consistent and inconsistent changes to code clones. In WCRE (pp. 170–178). Krinke, J. (2007). A study of consistent and inconsistent changes to code clones. In WCRE (pp. 170–178).
Zurück zum Zitat Krinke, J. (2008). Is cloned code more stable than non-cloned code? In SCAM (pp. 57–66). Krinke, J. (2008). Is cloned code more stable than non-cloned code? In SCAM (pp. 57–66).
Zurück zum Zitat Kim, M., Sazawal, V., Notkin, D., & Murphy, G.C. (2005). An empirical study of code clone genealogies. In ESEC-FSE (pp. 187–196). Kim, M., Sazawal, V., Notkin, D., & Murphy, G.C. (2005). An empirical study of code clone genealogies. In ESEC-FSE (pp. 187–196).
Zurück zum Zitat Lozano, A., & Wermelinger, M. (2008). Assessing the effect of clones on changeability. In ICSM (pp. 227–236). Lozano, A., & Wermelinger, M. (2008). Assessing the effect of clones on changeability. In ICSM (pp. 227–236).
Zurück zum Zitat Lozano, A., & Wermelinger, M. (2010). Tracking clones’ imprint. In IWSC (pp. 65–72). Lozano, A., & Wermelinger, M. (2010). Tracking clones’ imprint. In IWSC (pp. 65–72).
Zurück zum Zitat Mondal, M., Roy, C. K., Rahman, M. S., Saha, R. K., Krinke, J., & Schneider, K. A. (2012a). Comparative stability of cloned and non-cloned code: an empirical study. In ACM SAC (pp. 1227–1234). ACM. Mondal, M., Roy, C. K., Rahman, M. S., Saha, R. K., Krinke, J., & Schneider, K. A. (2012a). Comparative stability of cloned and non-cloned code: an empirical study. In ACM SAC (pp. 1227–1234). ACM.
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2012b). Connectivity of co-changed method groups: A case study on open source systems. In CASCON (pp. 205–219). Mondal, M., Roy, C. K., & Schneider, K. A. (2012b). Connectivity of co-changed method groups: A case study on open source systems. In CASCON (pp. 205–219).
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2012c). Dispersion of changes in cloned and non-cloned code. In IWSC (pp. 29–35). Mondal, M., Roy, C. K., & Schneider, K. A. (2012c). Dispersion of changes in cloned and non-cloned code. In IWSC (pp. 29–35).
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2012d). An empirical study on clone stability. ACM SIGAPP Applied Computing Review, 12(3), 20–36.CrossRef Mondal, M., Roy, C. K., & Schneider, K. A. (2012d). An empirical study on clone stability. ACM SIGAPP Applied Computing Review, 12(3), 20–36.CrossRef
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2014a). Automatic identification of important clones for refactoring and tracking. In SCAM, 10 pp (to appear). Mondal, M., Roy, C. K., & Schneider, K. A. (2014a). Automatic identification of important clones for refactoring and tracking. In SCAM, 10 pp (to appear).
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2014b). Automatic ranking of clones for refactoring through mining association rules. In CSMR-WCRE (pp. 114–123). Mondal, M., Roy, C. K., & Schneider, K. A. (2014b). Automatic ranking of clones for refactoring through mining association rules. In CSMR-WCRE (pp. 114–123).
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2014c). An insight into the dispersion of changes in cloned and non-cloned code: A genealogy based empirical study. Science of Computer Programming, 95, 445–468.CrossRef Mondal, M., Roy, C. K., & Schneider, K. A. (2014c). An insight into the dispersion of changes in cloned and non-cloned code: A genealogy based empirical study. Science of Computer Programming, 95, 445–468.CrossRef
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2014d). Late propagation in near-miss clones: An empirical study. In IWSC, 17 pp. Mondal, M., Roy, C. K., & Schneider, K. A. (2014d). Late propagation in near-miss clones: An empirical study. In IWSC, 17 pp.
Zurück zum Zitat Mondal, M., Roy, C. K., & Schneider, K. A. (2015). A comparative study on the bug-proneness of different types of code clones. In ICSME (pp. 91–100). Mondal, M., Roy, C. K., & Schneider, K. A. (2015). A comparative study on the bug-proneness of different types of code clones. In ICSME (pp. 91–100).
Zurück zum Zitat Mockus, A., & Votta, L. G. (2000). Identifying reasons for software changes using historic databases. In ICSM (pp. 120–130). Mockus, A., & Votta, L. G. (2000). Identifying reasons for software changes using historic databases. In ICSM (pp. 120–130).
Zurück zum Zitat Roy, C. K., & Cordy, J. R. (2008). NICAD: Accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization. In ICPC (pp. 172–181). IEEE Computer Society. Roy, C. K., & Cordy, J. R. (2008). NICAD: Accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization. In ICPC (pp. 172–181). IEEE Computer Society.
Zurück zum Zitat Roy, C. K., & Cordy, J. R. (2009). A mutation/injection-based automatic framework for evaluating code clone detection tools. In Mutation (pp. 157–166). Roy, C. K., & Cordy, J. R. (2009). A mutation/injection-based automatic framework for evaluating code clone detection tools. In Mutation (pp. 157–166).
Zurück zum Zitat Roy, C. K., Cordy, J. R., & Koschke, R. (2009). Comparison and evaluation of code clone detection techniques and tools: A qualitative approach. Science of Computer Programming, 74, 470–495.MathSciNetCrossRefMATH Roy, C. K., Cordy, J. R., & Koschke, R. (2009). Comparison and evaluation of code clone detection techniques and tools: A qualitative approach. Science of Computer Programming, 74, 470–495.MathSciNetCrossRefMATH
Zurück zum Zitat Roy, C. K. (2009). Detection and analysis of near-miss software clones. In ICSM (pp. 447–450). Roy, C. K. (2009). Detection and analysis of near-miss software clones. In ICSM (pp. 447–450).
Zurück zum Zitat Svajlenko, J., Roy, C. K. (2014). Evaluating modern clone detection tools. In ICSME (pp. 321–330). Svajlenko, J., Roy, C. K. (2014). Evaluating modern clone detection tools. In ICSME (pp. 321–330).
Zurück zum Zitat Thummalapenta, S., Cerulo, L., Aversano, L., & Penta, M. D. (2009). An empirical study on the maintenance of source code clones. Empirical Software Engineering, 15, 1–34.CrossRef Thummalapenta, S., Cerulo, L., Aversano, L., & Penta, M. D. (2009). An empirical study on the maintenance of source code clones. Empirical Software Engineering, 15, 1–34.CrossRef
Zurück zum Zitat Vanya, A., Premraj, R., & Vliet, H. V. (2010). Interactive exploration of co-evolving software entities. In CSMR (pp. 260–263). Vanya, A., Premraj, R., & Vliet, H. V. (2010). Interactive exploration of co-evolving software entities. In CSMR (pp. 260–263).
Zurück zum Zitat Wang, T., Harman, M., Jia, Y., & Krinke, J. (2013). Searching for better configurations: A rigorous approach to clone evaluation. In ESEC/SIGSOFT FSE (pp. 455–465). Wang, T., Harman, M., Jia, Y., & Krinke, J. (2013). Searching for better configurations: A rigorous approach to clone evaluation. In ESEC/SIGSOFT FSE (pp. 455–465).
Zurück zum Zitat Xie, S., & Khomh, Y. Z. F. (2013). An empirical study of the fault-proneness of clone mutation and clone migration. In MSR (pp. 149–158). Xie, S., & Khomh, Y. Z. F. (2013). An empirical study of the fault-proneness of clone mutation and clone migration. In MSR (pp. 149–158).
Metadaten
Titel
A comparative study on the intensity and harmfulness of late propagation in near-miss code clones
verfasst von
Manishankar Mondal
Chanchal K. Roy
Kevin A. Schneider
Publikationsdatum
22.01.2016
Verlag
Springer US
Erschienen in
Software Quality Journal / Ausgabe 4/2016
Print ISSN: 0963-9314
Elektronische ISSN: 1573-1367
DOI
https://doi.org/10.1007/s11219-016-9305-y

Weitere Artikel der Ausgabe 4/2016

Software Quality Journal 4/2016 Zur Ausgabe

EditorialNotes

In this issue

Premium Partner