Cookbook: In Situ Code Completion using Edit Recipes Learned from Examples

被引:4
|
作者
Jacobellis, John [1 ]
Meng, Na [1 ]
Kim, Miryung [1 ]
机构
[1] Univ Texas Austin, Austin, TX 78712 USA
关键词
code completion; edit recipe;
D O I
10.1145/2591062.2591076
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Existing code completion engines leverage only pre-defined templates or match a set of user-defined APIs to complete the rest of changes. We propose a new code completion technique, called COOKBOOK, where developers can define custom edit recipes a reusable template of complex edit operations by specifying change examples. It generates an abstract edit recipe that describes the most specific generalization of the demonstrated example program transformations. Given a library of edit recipes, it matches a developer's edit stream to recommend a suitable recipe that is capable of filling out the rest of change customized to the target. We evaluate COOKBOOK using 68 systematic changed methods drawn from the version history of Eclipse SWT. COOKBOOK is able to narrow down to the most suitable recipe in 75% of the cases. It takes 120 milliseconds to find the correct suitable recipe on average, and the edits produced by the selected recipe are on average 82% similar to developers' hand edit. This shows CooKBooK's potential to speed up manual editing and to minimize developers' errors. Our demo video is available at https : //www. youtube. com/watch?y=y4BNc8FT4RU.
引用
收藏
页码:584 / 587
页数:4
相关论文
共 12 条
  • [1] Learning from Examples to Improve Code Completion Systems
    Bruch, Marcel
    Monperrus, Martin
    Mezini, Mira
    7TH JOINT MEETING OF THE EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND THE ACM SIGSOFT SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2009, : 213 - 222
  • [2] The Gourmet Garage cookbook: 185 recipes using fresh and exciting ingredients from around the world.
    Sutton, JC
    LIBRARY JOURNAL, 2000, 125 (05) : 121 - 121
  • [3] Pose synthesis using the inverse of Jacobian matrix learned from examples
    Li, Chunpeng
    Ma, Shihong
    Wang, Zhaoqi
    IEEE VIRTUAL REALITY 2007, PROCEEDINGS, 2007, : 99 - +
  • [4] Selfie image super-resolution using an implicit prior learned from self-examples
    Hans, W. Jino
    Venkateswaran, N.
    CLUSTER COMPUTING-THE JOURNAL OF NETWORKS SOFTWARE TOOLS AND APPLICATIONS, 2019, 22 (Suppl 4): : S9505 - S9513
  • [5] Selfie image super-resolution using an implicit prior learned from self-examples
    W. Jino Hans
    N. Venkateswaran
    Cluster Computing, 2019, 22 : 9505 - 9513
  • [6] HIV, Aging, and Comorbidities Research in Clinical Cohorts: 3 Lessons Learned Using Examples From the CNICS Cohort
    Crane, Heidi M.
    Drumright, Lydia
    JAIDS-JOURNAL OF ACQUIRED IMMUNE DEFICIENCY SYNDROMES, 2022, 89 : S10 - S14
  • [7] Software Defect Prediction Using a Hybrid Model Based on Semantic Features Learned from the Source Code
    Miholca, Diana-Lucia
    Czibula, Gabriela
    KNOWLEDGE SCIENCE, ENGINEERING AND MANAGEMENT, KSEM 2019, PT I, 2019, 11775 : 262 - 274
  • [8] Rapid quantification of cryoconite: granule geometry and in situ supraglacial extents, using examples from Svalbard and Greenland
    Irvine-Fynn, Tristram D. L.
    Bridge, Jonathan W.
    Hodson, Andrew J.
    JOURNAL OF GLACIOLOGY, 2010, 56 (196) : 297 - 308
  • [9] Lessons learned from using the MiTeGen In Situ-1™ Crystallization Plate for microgravity protein crystallization
    Gonzalez-DeWhitt, K.
    Spinale, A.
    ACTA CRYSTALLOGRAPHICA A-FOUNDATION AND ADVANCES, 2020, 76 : A89 - A89
  • [10] Stone Masonry Arch Bridges: In situ Testing and Stability Analyses by Using Numerical Methods; Examples from Hungary
    Gyula, Bogoly
    Peter, Gorog
    Akos, Torok
    ENGINEERING GEOLOGY FOR SOCIETY AND TERRITORY, VOL 8: PRESERVATION OF CULTURAL HERITAGE, 2015, : 503 - 506