Skip to main content

Improving Process of Source Code Modification Focusing on Repeated Code

  • Conference paper
Product-Focused Software Process Improvement (PROFES 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7983))

Abstract

There are various kinds of repeated code such as consecutive if-else statements or case entries in program source code. Such repeated code sometimes require simultaneous modifications on all of its elements. Applying the same modifications to many places on source code is a burdensome work and introduces new bugs if some places to be modified are overlooked. For these reasons, it is necessary to support modifications on repeated code. Appropriate supports for repeated code can improve process of source code modification. In this paper, as a first step for supporting modifications on repeated code, we investigate how repeated code are modified during software evolution. As a result, we revealed that, 73-89% of repeated code were modified at least once in their life and 31-58% of modifications on repeated code were simultaneous ones for all of their elements.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aversano, L., Cerulo, L., Di Penta, M.: How clones are maintained: An empirical study. In: Proceedings of the 11th European Conference on Software Maintenance and Reengineering, CSMR 2007, pp. 81–90. IEEE Computer Society, Washington, DC (2007)

    Google Scholar 

  2. Baker, B.S.: On finding duplication and near-duplication in large software systems. In: Proceedings of the Second Working Conference on Reverse Engineering, WCRE 1995, pp. 86–95. IEEE Computer Society, Washington, DC (1995)

    Chapter  Google Scholar 

  3. Canfora, G., Cerulo, L., Penta, M.D.: Identifying changed source code lines from version repositories. In: Proceedings of the Fourth International Workshop on Mining Software Repositories, MSR 2007, p. 14. IEEE Computer Society, Washington, DC (2007)

    Google Scholar 

  4. Ducasse, S., Demeyer, S., Nierstrasz, O.: Transform conditionals to polymorphism. In: Proceedings EUROPLOP 2000 (5th European Conference on Pattern Languages of Programming and Computing, 1999), pp. 219–252. UVK Universitätsverlag Konstanz GmbH, Konstanz (2000)

    Google Scholar 

  5. Fowler, M.: Refactoring: improving the design of existing code. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)

    Google Scholar 

  6. Higo, Y., Kamiya, T., Kusumoto, S., Inoue, K.: Method and implementation for investigating code clones in a software system. Inf. Softw. Technol. 49(9-10), 985–998 (2007)

    Article  Google Scholar 

  7. Higo, Y., Kusumoto, S.: How often do unintended incosistencies happend? –deriving modification patterns and detecting overlooked code fragments–. In: Proceedings of the 2012 28th IEEE International Conference on Software Maintenance, ICSM 2012, pp. 222–231. IEEE Computer Society, Washington, DC (2012)

    Google Scholar 

  8. Kamiya, T., Kusumoto, S., Inoue, K.: Ccfinder: A multilinguistic token-based code clone detection system fo r large scale source code. IEEE Transactions on Software Engineering 28, 654–670 (2002)

    Article  Google Scholar 

  9. Kapser, C.J., Godfrey, M.W.: ”Cloning considered harmful” considered harmful: patterns of cloning in software. Empirical Softw. Engg. 13(6), 645–692 (2008)

    Article  Google Scholar 

  10. Kim, M., Bergman, L., Lau, T., Notkin, D.: An ethnographic study of copy and paste programming practices in oopl. In: Proceedings of the 2004 International Symposium on Empirical Software Engineering, ISESE 2004, pp. 83–92. IEEE Computer Society, Washington, DC (2004)

    Google Scholar 

  11. Kim, M., Sazawal, V., Notkin, D., Murphy, G.: An empirical study of code clone genealogies. In: Proceedings of the 10th European Software Engineering Conference Held Jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, ESEC/FSE-13, pp. 187–196. ACM, New York (2005)

    Google Scholar 

  12. Li, Z., Lu, S., Myagmar, S., Zhou, Y.: Cp-miner: Finding copy-paste and related bugs in large-scale software code. IEEE Trans. Softw. Eng. 32(3), 176–192 (2006)

    Article  Google Scholar 

  13. Murakami, H., Hotta, K., Higo, Y., Igaki, H., Kusumoto, S.: Folding repeated instructions for improving token-based code clone detection. In: Proceedings of the 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation, SCAM 2012, pp. 64–73. IEEE Computer Society, Washington, DC (2012)

    Chapter  Google Scholar 

  14. Roy, C.K., Cordy, J.R.: An empirical study of function clones in open source software. In: Proceedings of the 2008 15th Working Conference on Reverse Engineering, WCRE 2008, pp. 81–90. IEEE Computer Society, Washington, DC (2008)

    Chapter  Google Scholar 

  15. Roy, C.K., Cordy, J.R., Koschke, R.: Comparison and evaluation of code clone detection techniques and tools: A qualitative approach. Sci. Comput. Program. 74(7), 470–495 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  16. Sasaki, Y., Ishihara, T., Hotta, K., Hata, H., Higo, Y., Igaki, H., Kusumoto, S.: Preprocessing of metrics measurement based on simplifying program structures. In: International Workshop on Software Analysis, Testing and Applications, pp. 120–127 (December 2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Imazato, A., Sasaki, Y., Higo, Y., Kusumoto, S. (2013). Improving Process of Source Code Modification Focusing on Repeated Code. In: Heidrich, J., Oivo, M., Jedlitschka, A., Baldassarre, M.T. (eds) Product-Focused Software Process Improvement. PROFES 2013. Lecture Notes in Computer Science, vol 7983. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39259-7_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-39259-7_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-39258-0

  • Online ISBN: 978-3-642-39259-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics