Skip to main content

How Often Is Necessary Code Missing? — A Controlled Experiment —

  • Conference paper
Software Reuse for Dynamic Systems in the Cloud and Beyond (ICSR 2015)

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

Included in the following conference series:

Abstract

Code completion is one of the techniques used for realizing efficient code implementations. Code completion means adding the lacking code required for finishing a given task. Recently, some researchers have proposed code completion techniques that are intended to support code reuse. However, these existing techniques are designed to support the following programming steps. They cannot add necessary code in already-implemented code lines. In this research, we first investigate how often developers forget to write the necessary code in their programming tasks. We also investigate the extent to which opportunities of code reuse are increased by considering middle code completion. To investigate middle code completion, we propose a new technique that leverages type-3 clone detection techniques. We conducted a controlled experiment with nine research participants. As a result, we found that the participants had forgotten to write the necessary code in 41 of 51 (80%) programming tasks. We also found that the proposed technique was able to suggest useful code by middle code completion in 10 of 41 (24%) programming tasks for which the participants had forgotten to write the necessary code.

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. Eclipse, http://www.eclipse.org

  2. Intellij idea, http://www.jetbrains.com/idea/

  3. Intellisense, http://msdn.microsoft.com/en-us/library/hcw1s69b.aspx

  4. Bellon, S., Koschke, R., Antoniol, G., Krinke, J., Merlo, E.: Comparison and Evaluation of Clone Detection Tools. IEEE TSE 33(9), 577–591 (2007)

    Google Scholar 

  5. Göde, N., Koschke, R.: Frequency and risks of changes to clones. In: Proc. of ICSE, pp. 311–320 (2011)

    Google Scholar 

  6. Higo, Y., Kusumoto, S.: How Often Do Unintended Inconsistencies Happened? –Deriving Modification Patterns and Detecting Overlooked Code Fragments–. In: Proc. of ICSM, pp. 222–231 (2012)

    Google Scholar 

  7. Hill, R., Rideout, J.: Automatic method completion. In: Proc. of ASE, pp. 228–235 (2004)

    Google Scholar 

  8. Holmes, R., Walker, R.J.: Systematizing pragmatic software reuse. ACM TOSEM 21(4), 1–44 (2012)

    Article  Google Scholar 

  9. Hotta, K., Sano, Y., Higo, Y., Kusumoto, S.: Is duplicate code more frequently modified than non-duplicate code in software evolution?: An empirical study on open source software. In: Proc. of ERCIM/IWPSE, pp. 73–82 (2010)

    Google Scholar 

  10. Inoue, K., Higo, Y., Yoshida, N., Choi, E., Kusumoto, S., Kim, K., Park, W., Lee, E.: Experience of finding inconsistently-changed bugs in code clones of mobile software. In: Proc. of IWSC, pp. 94–95 (2012)

    Google Scholar 

  11. Kapser, C.J., Godfrey, M.W.: “cloning considered harmful” considered harmful: Patterns of cloning in software. ESE 13(6), 645–692 (2008)

    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 TSE, 176–192 (2006)

    Google Scholar 

  13. Murphy, G.C., Kersten, M., Findlater, L.: How Are Java Software Developers Using the Eclipse IDE? IEEE Software 23(4), 76–83 (2006)

    Article  Google Scholar 

  14. Nguyen, A.T., Nguyen, T.T., Nguyen, H.A., Tamrawi, A., Nguyen, H.V., Al-Kofahi, J., Nguyen, T.N.: Graph-based pattern-oriented, context-sensitive source code completion. In: Proc. of ICSE, pp. 69–79 (2012)

    Google Scholar 

  15. Yamamoto, T., Yoshida, N., Higo, Y.: Seamless Code Reuse Using Source Code Corpus. In: Proc. of IWESEP, pp. 31–36 (2013)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Ishihara, T., Higo, Y., Kusumoto, S. (2014). How Often Is Necessary Code Missing? — A Controlled Experiment —. In: Schaefer, I., Stamelos, I. (eds) Software Reuse for Dynamic Systems in the Cloud and Beyond. ICSR 2015. Lecture Notes in Computer Science, vol 8919. Springer, Cham. https://doi.org/10.1007/978-3-319-14130-5_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-14130-5_11

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-14129-9

  • Online ISBN: 978-3-319-14130-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics