Code Completion with Code Clones

Code completion is one of the techniques that raise efficiency of implementation. Code completion techniques make up for code lacking in half-written code. Recently, some researchers have proposed techniques using code completion for helping code reuse. However, existing code completion techniques, which complete only code following the half-written code, cannot complete code in the middle of the half-written code. In this research, we investigate the situation where developers forget to write some code and examine whether it is useful to complete the middle code. Also, we propose a new code completion technique with code clone detection techniques in order to complete the middle code. The proposed technique can complete both the middle code and following code by detecting Type-3 code clones of the half-written method. In this research, we have conducted an experiment with subjects to investigate the code that subjects forgot to write. As a result, we have confirmed that most of the subjects forgot to write some code in their given tasks and that it was useful to complete the middle code.

[1]  Shinji Kusumoto,et al.  An Empirical Study on the Impact of Duplicate Code , 2012, Adv. Softw. Eng..

[2]  Thomas D. LaToza,et al.  Active code completion , 2011, 2012 34th International Conference on Software Engineering (ICSE).

[3]  Rainer Koschke,et al.  Frequency and risks of changes to clones , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[4]  Hung Viet Nguyen,et al.  Graph-based pattern-oriented, context-sensitive source code completion , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[5]  Mik Kersten,et al.  How are lava software developers using the eclipse IDE , 2006 .

[6]  R. Hill,et al.  Automatic method completion , 2004 .

[7]  Mira Mezini,et al.  Learning from examples to improve code completion systems , 2009, ESEC/SIGSOFT FSE.

[8]  Yoshiki Higo,et al.  Seamless Code Reuse with Source Code Corpus , 2013, 2013 20th Asia-Pacific Software Engineering Conference (APSEC).

[9]  Robert J. Walker,et al.  Systematizing pragmatic software reuse , 2012, TSEM.