EUVIMEDEUVIMED entdecken
Crossref

AdaptGen: A Problem-Adaptive Solution Template Generation Technique for Online Programming Platforms

Guowei Zhang, Weiqin Zou, Xiaowei Zhang, Jingxuan Zhang, Jifeng Xuan

IEEE Transactions on Software Engineering · 2026-06 · 52 (6) · 1823-1841

DOI: 10.1109/tse.2026.3692192 ↗

Kurz gefasst

Fachartikel in der Zeitschrift IEEE Transactions on Software Engineering, 2026-06. Verfasst von Guowei Zhang und 4 weiteren Autor:innen. Die Arbeit nennt 46 Literaturangaben. Gefördert von: National Natural Science Foundation of China, Nanjing University, Research and Application of Key Technologies in Foundational Software for Intelligent Construction of Digital Scenarios.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Online programming platforms that offer various programming tasks play a crucial role in helping programmers enhance their coding skills. Programming tasks posted for different application scenarios may follow the same or similar programming patterns in their solutions. This leads programmers to repeatedly write not just the core code of problem-solving, but also the same basic framework and some peripheral code (such as variable declarations and input/output handling) that are needed to make their solutions executable. Repeatedly writing boilerplate or well-mastered algorithmic frameworks wastes time and adds little value for programmers focused on skill-specific practice. Toward this, we propose to develop AdaptGen, a problem-adaptive code template generation method for online programming platforms. AdaptGen analyzes and extracts solution patterns from various programming problem solutions (i.e., code accepted by online programming platforms) and generates templates tailored to each problem. More specifically, AdaptGen is built on genetic programming and uses a linear hashing sequence encoding strategy to represent solutions. It incorporates selection, crossover, and de-duplication operators to maintain diversity in the evolution process, and a fitness function tailored to generate solution templates. These templates are then abstracted and structured with a flexible core-code-hiding mechanism, enabling programmers of different experience levels to practice efficiently. We evaluated AdaptGen using two datasets from LeetCode and NowCoder, containing a total of 997 tasks and over 3,200 solution categories. Results show that AdaptGen successfully generates usable templates for 77%-84% of solution categories, with 80% of the templates performing well in manual evaluations. It also outperforms seven advanced representative large language models (LLMs), achieving the best overall performance in template quality, consistency, and generation efficiency. To validate AdaptGen’s effectiveness in real-world programming environments, we further conduct a user study involving live coding practice by programmers in online programming platforms, which effectively demonstrated its utility in practical application scenarios.

Förderung

  • National Natural Science Foundation of China
  • Nanjing University
  • Research and Application of Key Technologies in Foundational Software for Intelligent Construction of Digital Scenarios

Zitieren

APA

Zhang, G., Zou, W., Zhang, X., Zhang, J., & Xuan, J. (2026). AdaptGen: A Problem-Adaptive Solution Template Generation Technique for Online Programming Platforms. IEEE Transactions on Software Engineering, 52(6), 1823-1841. https://doi.org/10.1109/tse.2026.3692192

Vancouver

Zhang G, Zou W, Zhang X, Zhang J, Xuan J. AdaptGen: A Problem-Adaptive Solution Template Generation Technique for Online Programming Platforms. IEEE Transactions on Software Engineering. 2026;52(6):1823-1841. doi:10.1109/tse.2026.3692192

BibTeX
@article{Zhang2026,
  author = {Zhang, Guowei and Zou, Weiqin and Zhang, Xiaowei and Zhang, Jingxuan and Xuan, Jifeng},
  title = {AdaptGen: A Problem-Adaptive Solution Template Generation Technique for Online Programming Platforms},
  journal = {IEEE Transactions on Software Engineering},
  year = {2026},
  volume = {52},
  number = {6},
  pages = {1823--1841},
  doi = {10.1109/tse.2026.3692192}
}
Kostenlos starten →