mlsanityData to 7 Oct 2026

SkCoder: A Sketch-based Approach for Automatic Code Generation

arXiv 2302.06144 ↗First posted 13 Feb 2023cs.SEcited by 40

Not on the map. Why?

Abstract (arXiv)

Recently, deep learning techniques have shown great success in automatic code generation. Inspired by the code reuse, some researchers propose copy-based approaches that can copy the content from similar code snippets to obtain better performance. Practically, human developers recognize the content in the similar code that is relevant to their needs, which can be viewed as a code sketch. The sketch is further edited to the desired code. However, existing copy-based approaches ignore the code sketches and tend to repeat the similar code without necessary modifications, which leads to generating wrong results. In this paper, we propose a sketch-based code generation approach named SkCoder to mimic developers' code reuse behavior. Given a natural language requirement, SkCoder retrieves a similar code snippet, extracts relevant parts as a code sketch, and edits the sketch into the desired code. Our motivations are that the extracted sketch provides a well-formed pattern for telling models "how to write". The post-editing further adds requirement-specific details to the sketch and outputs the complete code. We conduct experiments on two public datasets and a new dataset collected by this work. We compare our approach to 20 baselines using 5 widely used metrics. Experimental results show that (1) SkCoder can generate more correct programs, and outperforms the state-of-the-art - CodeT5-base by 30.30%, 35.39%, and 29.62% on three datasets. (2) Our approach is effective to multiple code generation models and improves them by up to 120.1% in Pass@1. (3) We investigate three plausible code sketches and discuss the importance of sketches. (4) We manually evaluate the generated code and prove the superiority of our SkCoder in three aspects.

Key facts. Cited by 40 papers in the map (data through 7 Oct 2026). First posted on arXiv 13 Feb 2023.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 13; 2024: 15; 2025: 9; 2026: 3.

40 papers.

Sort:

By area:

  1. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  2. 2023Structured Chain-of-Thought Prompting for Code Generationcited by 136
  3. 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
  4. 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  5. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  6. 2023Large Language Models for Supply Chain Optimizationcited by 61
  7. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
  8. 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 42
  9. 2023Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Modelscited by 37
  10. 2024EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluationscited by 33
  11. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  12. 2024CodeS: Natural Language to Code Repository via Multi-Layer Sketchcited by 28
28 more
  1. 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
  2. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunitiescited by 17
  3. 2025Exploring the Potential of Diffusion Large Language Models in Code Generationcited by 16
  4. 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
  5. 2023FRANC: A Lightweight Framework for High-Quality Code Generationcited by 14
  6. 2023Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?cited by 13
  7. 2024Collu-Bench: A Benchmark for Predicting Language Model Hallucinations in Codecited by 13
  8. 2023De-fine: Decomposing and Refining Visual Programs with Auto-Feedbackcited by 10
  9. 2024DevEval: Evaluating Code Generation in Practical Software Projectscited by 9
  10. 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systemscited by 7
  11. 2024Building A Coding Assistant via the Retrieval-Augmented Language Modelcited by 5
  12. 2025Impact-driven Context Filtering For Cross-file Code Completioncited by 5
  13. 2025Multi-Agent GraphRAG: A Text-to-Cypher Framework for Labeled Property Graphscited by 5
  14. 2024A Study on Training and Developing Large Language Models for Behavior Tree Generationcited by 4
  15. 2024Showing LLM-Generated Code Selectively Based on Confidence of LLMscited by 4
  16. 2023Neural Machine Translation for Code Generationcited by 3
  17. 2023ZC3: Zero-Shot Cross-Language Code Clone Detectioncited by 3
  18. 2024NLP4PBM: A Systematic Review on Process Extraction using Natural Language Processing with Rule-based, Machine and Deep Learning Methodscited by 3
  19. 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
  20. 2024SketchFill: Sketch-Guided Code Generation for Imputing Derived Missing Valuescited by 2
  21. 2026EvoSci: A Bio-Inspired Multi-Agent Framework for the Evolution of Scientific Discoverycited by 2
  22. 2023Implant Global and Local Hierarchy Information to Sequence based Code Representation Modelscited by 1
  23. 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capabilitycited by 1
  24. 2025Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Studycited by 1
  25. 2025Integrating Artificial Intelligence with Human Expertise: An In-depth Analysis of ChatGPT's Capabilities in Generating Metamorphic Relationscited by 0
  26. 2025A Systematic Evaluation of Parameter-Efficient Fine-Tuning Methods for the Security of Code LLMscited by 0
  27. 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
  28. 2026From Guessing to Placeholding: A Cost-Theoretic Framework for Uncertainty-Aware Code Completioncited by 0