Write a Blog >>
ICSE 2023
Sun 14 - Sat 20 May 2023 Melbourne, Australia
Fri 19 May 2023 13:45 - 14:00 at Meeting Room 101 - Code generation Chair(s): Iftekhar Ahmed

Writing tests is a time-consuming yet essential task during software development. We propose to leverage recent advances in deep learning for text and code generation to assist developers in writing tests. We formalize the novel task of test completion to automatically complete the next statement in a test method based on the context of prior statements and the code under test. We develop TeCo—a deep learning model using code semantics for test completion. The key insight underlying TeCo is that predicting the next statement in a test method requires reasoning about code execution, which is hard to do with only syntax-level data that existing code completion models use. TeCo extracts and uses six kinds of code semantics data, including the execution result of prior statements and the execution context of the test method. To provide a testbed for this new task, as well as to evaluate TeCo, we collect a corpus of 130,934 test methods from 1,270 open-source Java projects. Our results show that TeCo achieves an exact-match accuracy of 17.47, which is 28% higher than the best baseline using syntax-level data only. When measuring functional correctness of generated next statement, TeCo can generate runnable code in 29.31% of the cases compared to 19.40% obtained by the best baseline. Moreover, TeCo is significantly better than prior work on test oracle generation.

Fri 19 May

Displayed time zone: Hobart change

13:45 - 15:15
Code generationJournal-First Papers / Technical Track at Meeting Room 101
Chair(s): Iftekhar Ahmed University of California at Irvine
13:45
15m
Talk
Learning Deep Semantics for Test Completion
Technical Track
Pengyu Nie University of Texas at Austin, Rahul Banerjee The University of Texas at Austin, Junyi Jessy Li University of Texas at Austin, USA, Raymond Mooney The University of Texas at Austin, Milos Gligoric University of Texas at Austin
14:00
15m
Talk
Dynamic Human-in-the-Loop Assertion Generation
Journal-First Papers
Lucas Zamprogno University of British Columbia, Braxton Hall University of British Columbia, Reid Holmes University of British Columbia, Joanne M. Atlee University of Waterloo
14:15
15m
Talk
SkCoder: A Sketch-based Approach for Automatic Code Generation
Technical Track
Jia Li Peking University, Yongmin Li Peking University, Ge Li Peking University, Zhi Jin Peking University, Xing Hu Zhejiang University
Pre-print
14:30
15m
Talk
An Empirical Comparison of Pre-Trained Models of Source Code
Technical Track
Changan Niu Software Institute, Nanjing University, Chuanyi Li Nanjing University, Vincent Ng Human Language Technology Research Institute, University of Texas at Dallas, Richardson, TX 75083-0688, Dongxiao Chen Software Institute, Nanjing University, Jidong Ge Nanjing University, Bin Luo Nanjing University
Pre-print
14:45
15m
Talk
On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot
Technical Track
Antonio Mastropaolo Università della Svizzera italiana, Luca Pascarella ETH Zurich, Emanuela Guglielmi University of Molise, Matteo Ciniselli Università della Svizzera Italiana, Simone Scalabrino University of Molise, Rocco Oliveto University of Molise, Gabriele Bavota Software Institute, USI Università della Svizzera italiana
15:00
15m
Talk
Source Code Recommender Systems: The Practitioners' Perspective
Technical Track
Matteo Ciniselli Università della Svizzera Italiana, Luca Pascarella ETH Zurich, Emad Aghajani Software Institute, USI Università della Svizzera italiana, Simone Scalabrino University of Molise, Rocco Oliveto University of Molise, Gabriele Bavota Software Institute, USI Università della Svizzera italiana