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

  • Tomoya Ishihara
  • Yoshiki Higo
  • Shinji Kusumoto
Conference paper

DOI: 10.1007/978-3-319-14130-5_11

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8919)
Cite this paper as:
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

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.

Keywords

Code completion Clone detection Static analysis 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Tomoya Ishihara
    • 1
  • Yoshiki Higo
    • 1
  • Shinji Kusumoto
    • 1
  1. 1.Graduate School of Information Science and TechnologyOsaka UniversitySuitaJapan

Personalised recommendations