mlsanityData to 14 Oct 2026

Learning Deep Semantics for Test Completion

arXiv 2302.10166 ↗First posted 20 Feb 2023cs.SE cs.CL cs.LGcited by 31

Not on the map. Why?

Abstract (arXiv)

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 18, which is 29% 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% of the cases compared to 18% obtained by the best baseline. Moreover, TeCo is significantly better than prior work on test oracle generation.

Key facts. Cited by 31 papers in the map (data through 14 Oct 2026). Builds on 43 of its 101 references that are in the map. First posted on arXiv 20 Feb 2023.

Builds on

43 of 101 references.

References · 43

  1. 2017Attention Is All You Needcited by 60,361
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
  5. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  6. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  7. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  8. 2022Competition-Level Code Generation with AlphaCodecited by 1,462
  9. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  10. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  11. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
  12. 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 762
31 more
  1. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  2. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  3. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  4. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  5. 2020IntelliCode Compose: Code Generation Using Transformercited by 227
  6. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 194
  7. 2020A Transformer-based Approach for Source Code Summarizationcited by 133
  8. 2022Natural Language to Code Translation with Executioncited by 124
  9. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  10. 2018NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating Systemcited by 98
  11. 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 77
  12. 2019Code Generation as a Dual Task of Code Summarizationcited by 62
  13. 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
  14. 2019Pythia: AI-assisted Code Completion Systemcited by 55
  15. 2017Code Completion with Neural Attention and Pointer Networkscited by 49
  16. 2022Reasoning Like Program Executorscited by 45
  17. 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
  18. 2020On Learning Meaningful Assert Statements for Unit Test Casescited by 42
  19. 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
  20. 2020Learning to Update Natural Language Comments Based on Code Changescited by 31
  21. 2021On Multi-Modal Learning of Editing Source Codecited by 25
  22. 2017Dynamic Neural Program Embedding for Program Repaircited by 23
  23. 2020Deep Just-In-Time Inconsistency Detection Between Comments and Source Codecited by 20
  24. 2018Automatic Generation of Text Descriptive Comments for Code Blockscited by 18
  25. 2021Impact of Evaluation Methodologies on Code Summarizationcited by 11
  26. 2019Associating Natural Language Comment and Source Code Entitiescited by 6
  27. 2020Deep Generation of Coq Lemma Names Using Elaborated Termscited by 6
  28. 2021Learning to Describe Solutions for Bug Reports Based on Developer Discussionscited by 5
  29. 2021Using Relative Lines of Code to Guide Automated Test Generation for Pythoncited by 3
  30. 2022Using Developer Discussions to Guide Fixing Bugs in Softwarecited by 3
  31. 2022Compiler Testing using Template Java Programscited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 8; 2024: 6; 2025: 11; 2026: 6.

31 papers.

Sort:

By area:

  1. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  2. 2024Can LLMs Replace Manual Annotation of Software Engineering Artifacts?cited by 42
  3. 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
  4. 2023CAT-LM: Training Language Models on Aligned Code And Testscited by 28
  5. 2023KernelGPT: Enhanced Kernel Fuzzing via Large Language Modelscited by 17
  6. 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
  7. 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 9
  8. 2024A System for Automated Unit Test Generation Using Large Language Models and Assessment of Generated Test Suitescited by 8
  9. 2025CLOVER: A Test Case Generation Benchmark with Coverage, Long-Context, and Verificationcited by 8
  10. 2023Domain Adaptation for Code Model-based Unit Test Case Generationcited by 7
  11. 2023Assessing Evaluation Metrics for Neural Test Oracle Generationcited by 7
  12. 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolutioncited by 7
19 more
  1. 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 7
  2. 2025Combining Large Language Models with Static Analyzers for Code Review Generationcited by 6
  3. 2024UniTSyn: A Large-Scale Dataset Capable of Enhancing the Prowess of Large Language Models for Program Testingcited by 5
  4. 2023An Empirical Study of AI-based Smart Contract Creationcited by 4
  5. 2023LLM4TDD: Best Practices for Test Driven Development Using Large Language Modelscited by 4
  6. 2024exLong: Generating Exceptional Behavior Tests with Large Language Modelscited by 4
  7. 2024FuzzAug: Data Augmentation by Coverage-guided Fuzzing for Neural Test Generationcited by 3
  8. 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
  9. 2025A Tool for Generating Exceptional Behavior Tests With Large Language Modelscited by 2
  10. 2025Large Language Models for Software Testing: A Research Roadmapcited by 2
  11. 2025Navigating the Labyrinth: Path-Sensitive Unit Test Generation with Large Language Modelscited by 1
  12. 2025LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Frameworkcited by 1
  13. 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspectivecited by 1
  14. 2025AutoTestForge: A Multidimensional Automated Testing Framework for Natural Language Processing Modelscited by 0
  15. 2025SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMscited by 0
  16. 2026Improving MPI Error Detection and Repair with Large Language Models and Bug Referencescited by 0
  17. 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregationcited by 0
  18. 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generationcited by 0
  19. 2026Retrofitting Code Using LLMs to Support Exceptional Behaviorcited by 0